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

oneOf check if only one schema applies should sometimes be ignored if a custom type format is missing #178

Open
pjordaan opened this issue Sep 8, 2022 · 0 comments

Comments

@pjordaan
Copy link

pjordaan commented Sep 8, 2022

Imagine an OpenAPI schema with a oneOf linking to 2 string definitions and a custom format:

schema:
  oneOf:
    -
      type: string
      format: custom-format
    -
      type: string
      format: another-custom-format

With the OpenAPI PSR7 validator this will invalidate that 2 schemas are matched unless I provided a custom format validator (as written in the documentation https://github.com/thephpleague/openapi-psr7-validator#custom-type-formats). Shouldn't this be ignored if no custom type format is provided? Or maybe some warning/configurable setting?

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

No branches or pull requests

1 participant