pb33f/libopenapi-validator

Ability to handle Schema objects FIXED FIELDs eg readOnly, writeOnly

jojobrem opened this issue · 4 comments

libopenapi-validator currently is unable to handle fixed fields in schema objects, an example being writeOnly. This property specifies that the schema object may appear in a request but not to come back in the response, as noted https://spec.openapis.org/oas/v3.0.3#fixed-fields-19
However libopenapi-validator has no reference to these fields and this behaviour.
Is there a plan to implement this?

You found a gap! Nice. This needs to be added.

Hi @daveshanley - Any thoughts on this? my fear is that this may may be an issue with the underlying jsonschema module....

I have not looked any deeper into this yet. It may be a gap down there, or it could be something that can be controlled by libopenapi I don't know yet.

I have not looked any deeper into this yet. It may be a gap down there, or it could be something that can be controlled by libopenapi I don't know yet.

Thanks - the support of this construct is spotty across a variety of tools (eg Spectral gets tripped up as well). It would seem to me that at a very basic level when a payload is checked against a schema it needs to be in the context of a request or a response, without that the schema validator couldn't assess readOnly/writeOnly.