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

Badges are not displayed for properties in subschemas which are part of schema composition ('allOf') #170

Open
pspot2 opened this issue Oct 27, 2022 · 0 comments

Comments

@pspot2
Copy link

pspot2 commented Oct 27, 2022

Please refer to examples in issue #169.

Expectation: test_propertyA and test_propertyB have the Required badge as they are marked as required in their respective 'then' branch of the 'allOf' schema composition. E.g.:

Required Property root > allOf > item 0 > then > test_propertyA

Required Property root > allOf > item 1 > then > test_propertyB

Actual result: badges are not added (and there is no other information in the document that those properties are required).

One could argue that the 'if-then' schema composition is conditional by nature, e.g. it is hard to say something is required there. But this is the perspective of the parent schema. From the perspective of each branch - once that branch is selected - everything that it contains should be rendered accordingly, including the required properties.

In my specific real-life scenario, my schema is quite big with lots of nesting levels. Schema composition branches start very close to the root schema, and as a result I'm not getting any badges for the majority of my tree.

Note: this seems to happen only when schema composition has more than one subschema (more than 1 branch in the current example). If I remove the second branch, badges re-appear in the single remaining one.

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