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

Support "unevaluatedProperties" #122

Open
charjr opened this issue Apr 19, 2023 · 0 comments
Open

Support "unevaluatedProperties" #122

charjr opened this issue Apr 19, 2023 · 0 comments
Milestone

Comments

@charjr
Copy link
Collaborator

charjr commented Apr 19, 2023

unevaluatedProperties is a bit like additionalProperties but it checks against all subSchemas and adjacent schemas.

i.e.

allOf:
  - properties:
    - foo
    - bar
    additionalProperties: false
  - properties:
    - baz
    required:
      - baz

The above will always fail because the second schema requires baz, but the first schema would consider baz to be an additionalProperty.

allOf:
  - properties:
    - foo
    - bar
    unevaluatedProperties: false
  - properties:
    - baz
    required:
      - baz

The above is able to pass, because the second schema evaluates baz.

See the following for more information:
https://json-schema.org/understanding-json-schema/reference/object.html#unevaluated-properties

json-schema-org/json-schema-spec#556

@charjr charjr added this to the OAPI 3.1 milestone Apr 19, 2023
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