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

Use anyOf when @allow-other = 'yes' in JSON Schema #360

Closed
wants to merge 3 commits into from

Commits on May 3, 2023

  1. Use anyOf when @allow-other = 'yes' in JSON Schema

    When there is a type and an enumeration in JSON Schema, using `allOf`
    means that a value must satisfy _both_ types. This is appropriate when
    `@allow-other = 'no'` because it effectively limits the permitted values
    to the enumeration; however, when `@allow-other = 'yes'`, that
    limitation means that you are not able to use 'locally defined' values.
    In this case, `anyOf` is preferable, this allows values in the
    enumeration and otherwise any value that matches the schema for the
    type.
    
    A check is added explicitly for `@allow-other = 'yes'` as
    `@allow-other = 'no'` is the default and matches the existing behavior.
    laurelmay committed May 3, 2023
    Configuration menu
    Copy the full SHA
    6fb8a74 View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2023

  1. Adjusting code based on code review

    Co-authored-by: A.J. Stein <[email protected]>
    david-waltermire and aj-stein-nist authored Jun 8, 2023
    Configuration menu
    Copy the full SHA
    46dd65c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dec6cb6 View commit details
    Browse the repository at this point in the history