You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
The POST and PUT methods in the Swagger UI docs don't use the write Schema properly, fields are missing
How to reproduce
Create an Entity like the one i got from the API-Platform course on Symfonycasts, where I first discovered the bug.
Set a read group (normalizationContext) and a write group (denormalizationContext) and set groups on field an/or a setter method (like in the example, where the write group is set on the setTextDescription-method).
The write-Schema, shown in the Swagger Ui doc shows all fields/properties as intended:
cheeses-Write{
title string
minLength: 2
maxLength: 50
price* integer
description string
writeOnly: true
The description of the cheese as raw text.
}
But under the POST and PUT methods example values, the desctiption field is missing:
{
"title": "string",
"price": 0
}
And whren i click on "Schema", netxt to "Example Value", it says:
cheeses.jsonld-Read{
title string
minLength: 2
maxLength: 50
price* integer
}
First I thought that bevahiour is related to the write-group being set on a method an not on a field, but then i discovered the same behaviour on my User-Entity where I set the wirite group directlyon my password property, but the field is missing in the POST and PUT methods too (but appers in the write-Schema)
Additional Context
Excuse my english, i am not a native speaker
The text was updated successfully, but these errors were encountered:
API Platform version(s) affected: 2.6.4
Description
The POST and PUT methods in the Swagger UI docs don't use the write Schema properly, fields are missing
How to reproduce
Create an Entity like the one i got from the API-Platform course on Symfonycasts, where I first discovered the bug.
Set a read group (normalizationContext) and a write group (denormalizationContext) and set groups on field an/or a setter method (like in the example, where the write group is set on the setTextDescription-method).
The write-Schema, shown in the Swagger Ui doc shows all fields/properties as intended:
But under the POST and PUT methods example values, the desctiption field is missing:
And whren i click on "Schema", netxt to "Example Value", it says:
First I thought that bevahiour is related to the write-group being set on a method an not on a field, but then i discovered the same behaviour on my User-Entity where I set the wirite group directlyon my password property, but the field is missing in the POST and PUT methods too (but appers in the write-Schema)
Additional Context
Excuse my english, i am not a native speaker
The text was updated successfully, but these errors were encountered: