Open
Description
API Platform version(s) affected: 4.1.1
Description
I found that two new schemas were added: Error and ConstraintViolation. The actual errors do not seem to match:
ConstraintViolation:
The property "instance" exists on OpenApi but not on the actual violation, while "code" and "hint" exist on the actual "violations" but not on OpenApi.
OpenApi:
Actual:
`{
"status": 422,
"violations": [
{
"propertyPath": "societe",
"message": "This value should be of type App\\Entity\\Societe.",
"code": "ba785a8c-82cb-4283-967c-3cf342181b40",
"hint": "Item not found for \"/api/lecture/societes/038757282\"."
}
],
"detail": "societe: This value should be of type App\\Entity\\Societe.",
"type": "/validation_errors/ba785a8c-82cb-4283-967c-3cf342181b40",
"title": "An error occurred"
}`
Error
On error the property "instance" exists on OpenApi but not on the actual response:
OpenApi:
Actual:
`{
"title": "An error occurred",
"detail": "Societe inexistante.",
"status": 400,
"type": "/errors/400"
}`
How to reproduce
Possible Solution
Additional Context