Skip to content
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

Ability to handle Schema objects FIXED FIELDs eg readOnly, writeOnly #90

Open
jojobrem opened this issue Jul 24, 2024 · 4 comments
Open
Labels
enhancement New feature or request

Comments

@jojobrem
Copy link

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?

@daveshanley daveshanley added the enhancement New feature or request label Aug 2, 2024
@daveshanley
Copy link
Member

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

@JemDay
Copy link
Contributor

JemDay commented Sep 3, 2024

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

@daveshanley
Copy link
Member

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.

@JemDay
Copy link
Contributor

JemDay commented Sep 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants