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
Seems like read/write context-aware validators are only implemented for OpenAPI 3.0. Any reason not to implement a similar interface for 3.1?
For some context, I'm leveraging the openapi-core library and noticing that readOnly and writeOnly work great when validating against 3.0 specs, but do nothing with 3.1 specs.
The text was updated successfully, but these errors were encountered:
The answer is very simple, because OpenAPI 3.1 specification doesn't define readonly/writeonly.
the reason can be found here
When discussing the final details of aligning with JSON Schema, we identified there was particularly thorny issues with the readOnly and writeOnly properties that are defined in JSON Schema but described to have slightly different behavior in OpenAPI. In order to achieve our goal of full alignment with JSON Schema, we had to drop the OpenAPI behavior. Technically, this change might “break” some piece of tooling out there. We haven’t found it yet (we’re still looking). Semantic versioning would insist that this change be denoted as 4.0.0. However, this update to the specification is not such a major update, rather there are a few small breaking changes.
Seems like read/write context-aware validators are only implemented for OpenAPI 3.0. Any reason not to implement a similar interface for 3.1?
For some context, I'm leveraging the
openapi-core
library and noticing thatreadOnly
andwriteOnly
work great when validating against 3.0 specs, but do nothing with 3.1 specs.The text was updated successfully, but these errors were encountered: