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

Improve display of schemas with mutually-exclusive required properties #79

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

gnidan
Copy link
Member

@gnidan gnidan commented Feb 6, 2024

  • Assume the pattern

    allOf:
      - oneOf:
          - required:
              - ...
          - ...
      - if:
          required:
              - ...
        then:
          ...
      - ...

    to be the canonical form for ethdebug/format schemas to represent the concept of schemas that are defined with different subschemas depending on which set of mutually-exclusive required properties are included

  • Detect this pattern

  • Display it with custom wording instead of the default docusaurus-json-schema-plugin presentation of allOfs and such

Screenshot 2024-02-05 at 23 51 06

- Assume the pattern
  ```yaml
  allOf:
    - oneOf:
        - required:
            - ...
        - ...
    - if:
        required:
            - ...
      then:
        ...
    - ...
  ```
  to be the canonical form for ethdebug/format schemas to represent the
  concept of schemas that are defined with different subschemas
  depending on which set of mutually-exclusive required properties are
  included

- Detect this pattern

- Display it with custom wording instead of the default
  docusaurus-json-schema-plugin presentation of `allOf`s and such
@gnidan gnidan merged commit d767428 into main Feb 6, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

1 participant