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

Enhancement: Support $defs subschemas in Json #86

Closed
1 task done
jrhok opened this issue Mar 14, 2024 · 3 comments
Closed
1 task done

Enhancement: Support $defs subschemas in Json #86

jrhok opened this issue Mar 14, 2024 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@jrhok
Copy link

jrhok commented Mar 14, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Enhancement description

Hello,

According to the official documentation of JSON Schema , the standardized place to put subschemas should be "$defs", it is not currently supported by the library (it seems to only support "definitions" section)

@jrhok jrhok added the enhancement New feature or request label Mar 14, 2024
@OptimumCode
Copy link
Owner

Hi, @jrhok. The library supports $defs for schema drafts 2019-09 and 2020-12 (draft 7 supports only definitions property). Could you please advise which version of the library you are using and which draft you use for your schema?

@jrhok
Copy link
Author

jrhok commented Mar 14, 2024

Oh ! Sorry, I did not notice that draft 7 did not support $defs, thank you, I close the issue

@jrhok jrhok closed this as completed Mar 14, 2024
@OptimumCode
Copy link
Owner

No worries, you are welcome)
The $defs keyword was added in the draft 2019-09. This is why the library does not support this keyword for drafts before 2019-09.
Also, I would suggest using the latest draft (2020-12) as it is better in some ways than the older drafts (if it is possible in your case of course)

@OptimumCode OptimumCode added question Further information is requested and removed enhancement New feature or request labels Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants