yii2-openapi
yii2-openapi copied to clipboard
Response Status Codes are not the Codes defined in spec
According to the OAS 3 Spec, status codes that are available are defined in https://tools.ietf.org/html/rfc7231#section-6
The generated code is returning 422 for example. https://github.com/OAI/OpenAPI-Specification/blob/3.0.2/versions/3.0.2.md#httpCodes
These code is not defined in the RFC. If i am correct it should return 400 instead.
Or for duplicate errors: 409
it should return the code you specify in your api description, but currently it simply uses Yii defaults.