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

Where "extends" property is defined in JSON schema? #1084

Closed
Mingun opened this issue Jan 29, 2020 · 1 comment
Closed

Where "extends" property is defined in JSON schema? #1084

Mingun opened this issue Jan 29, 2020 · 1 comment

Comments

@Mingun
Copy link

Mingun commented Jan 29, 2020

Reference section on http://www.jsonschema2pojo.org/ describes, how extends keyword is translated to Java. There is also a mention of some part of the JSON schema specification(?):

Note: the extends rule in JSON schema accepts a schema or an array of schemas - jsonschema2pojo only supports the single schema variant.

But, according to the json-schema-org/json-schema-spec#348 (comment), JSON schema doesn't support inheritance and I can not find any mention of extends keyword on the official site

Where extends keyword is defined in JSON schema and what values it can have?

@joelittlejohn
Copy link
Owner

extends is a legacy keyword that existing in JSON Schema draft00/draft01/draft02/draft03 but was removed in draft04.

We can't easily support 'allOf' with Java's type system so a lot of people still prefer to use extends.

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

2 participants