-
Notifications
You must be signed in to change notification settings - Fork 135
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
Support readOnly and writeOnly keywords #276
Comments
I think OpenAPIParser which Committee is using supports |
I was thinking about making the validation respect readOnly/writeOnly properties like:
OpenAPI does not adapt validation based on readOnly/writeOnly annotations. AFAIK the code line is just about adding an accessor method to read these fields (read_only vs readOnly). |
Currently, openapi_parser can only read readOnly / writeOnly, and we can't use validation based on that properties. The committee validate parameters by these methods. e.g. |
OpenAPI 3 define these (writeOnly too)
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#fixed-fields-20 But OpenAPI 3.1.0.rc1, we can ignore or raise error.
So I think it's better to support option to raise error or ignore these properties bacause easy to migration. |
Would love this feature available as well 😌
|
Spec: http://spec.openapis.org/oas/v3.0.3#fixed-fields-19
In OpenAPI 3.1 this will be taken straight from the json-schema 2019-09 spec: readOnly and writeOnly
Supporting these keywords should be useful to describe readOnly fields.
AFAIK there is no Ruby JSON Schema validator library that supports this at the moment.
The text was updated successfully, but these errors were encountered: