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

Add inheritance to generated JSON schema #126

Closed
tonysviews opened this issue Aug 18, 2020 · 1 comment
Closed

Add inheritance to generated JSON schema #126

tonysviews opened this issue Aug 18, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@tonysviews
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
When validating data using the JSON schema generated when a CET is created/updated, the validation is incomplete when the entity inherits some of its properties from a parent entity.

Describe the solution you'd like
The generated JSON schema should reflect the inheritance of properties between child and parent entities.

Describe alternatives you've considered
The JSON Schema standard does not define inheritance Explain why inheritance isn't the right model

However, it is possible to validate a schema using the allOf property, which could be enough for our purposes of doing validation of data from the frontend: How to do inheritance?

Additional context
N/A

@tonysviews tonysviews added the enhancement New feature or request label Aug 18, 2020
@tonysviews tonysviews added this to the Meveo 6.10 milestone Aug 18, 2020
ClementBareth pushed a commit that referenced this issue Aug 18, 2020
Make RootObjectSchema extends CombinedObjectSchema and in CombinedObjectSchema#describePropertiesTo don't fail if the combinedSchema is null
@ClementBareth
Copy link
Collaborator

@tonysviews I let you test

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

No branches or pull requests

4 participants