Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of property class on APIResource Tag #2679

Open
acoloma-edu opened this issue Mar 28, 2024 · 0 comments
Open

Use of property class on APIResource Tag #2679

acoloma-edu opened this issue Mar 28, 2024 · 0 comments

Comments

@acoloma-edu
Copy link

API Platform version(s) affected: 3.2

Description
If you use atribute class APIResource Tag, Serialization Groups are not used to render API Documentation response Examples.

#[ApiResource(
shortName: 'Modules',
operations: [
new GetCollection(
uriTemplate: "/module",
class: Module::class,
normalizationContext: ['groups' => ['module']]
),
]
)]
class ReadModuleResource
{
}

Additional Context

Captura de pantalla 2024-03-28 a las 21 38 31

class Module
{
....
#[ORM\ManyToMany(targetEntity: Cycle::class, mappedBy: 'modules')]
#[Groups(['module:cycles'])]
private Collection $cycles;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant