-
Notifications
You must be signed in to change notification settings - Fork 101
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
OpenAPI 3 lost schema properties required list. #90
Comments
This sounds like a very reasonable suggestion. No idea why we did not do it from the beginning. Any doubts @ozscheyge? |
Yeah, looks like an error, in the generation of the openapi 2 spec, we do exactly this! |
Strange - we use the same JsonSchema generator for openApi 2 and 3. |
At the moment the required property in the schema is set by introspecting bean validation constraints - https://github.com/ePages-de/restdocs-api-spec#documenting-bean-validation-constraints We do not look at the optional field in the field descriptor. The question is, if we should do this. |
Here is the snippet from
require.json
:But convert to openapi3.yaml lost the
optional
field:OpenAPI 3 has
required
property list. See: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#schema-objectI hope
optional
fromresource.json
could render torequired
toopenapi3.yaml
.The text was updated successfully, but these errors were encountered: