API Platform version(s) affected: 2.6.4
Description
I'm trying to use denormalization context as I used in previous versions and it does not work. Swagger doesn't recognize in the payload example the group of the denormalization context
App\Entity\User: attributes: id: groups: [user_read] name: groups: [user_read, user_register, user_update, movement_read] email: groups: [user_read, user_register] password: groups: [user_register] avatar: groups: [user_read] active: groups: [user_read] token: groups: [user_activate] createdAt: groups: [user_read] updatedAt: groups: [user_read]
Now in the collection operations:
register:
method: POST
path: /users/register
controller: App\Api\Action\User\Register
denormalization_context:
groups: [user_register]
openapi_context:
summary: Register a user in the API
(i'm using yaml for the resources and serialization)
Now, in the api docs, in this endpoint the data required in the payload is:
"name": "string",
"email": "string",
"avatar": "string",
"active": true,
"createdAt": "2019-08-24T14:15:22Z"
It should be just name and email, because that's the fields in the user_register group
How to reproduce
Possible Solution
Additional Context
API Platform version(s) affected: 2.6.4
Description
I'm trying to use denormalization context as I used in previous versions and it does not work. Swagger doesn't recognize in the payload example the group of the denormalization context
App\Entity\User: attributes: id: groups: [user_read] name: groups: [user_read, user_register, user_update, movement_read] email: groups: [user_read, user_register] password: groups: [user_register] avatar: groups: [user_read] active: groups: [user_read] token: groups: [user_activate] createdAt: groups: [user_read] updatedAt: groups: [user_read]Now in the collection operations:
register:
method: POST
path: /users/register
controller: App\Api\Action\User\Register
denormalization_context:
groups: [user_register]
openapi_context:
summary: Register a user in the API
(i'm using yaml for the resources and serialization)
Now, in the api docs, in this endpoint the data required in the payload is:
It should be just name and email, because that's the fields in the user_register group
How to reproduce
Possible Solution
Additional Context