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

@DefaultValue doesn't follow JSON Schema standard #8

Open
DrewWeth opened this issue Dec 31, 2018 · 0 comments
Open

@DefaultValue doesn't follow JSON Schema standard #8

DrewWeth opened this issue Dec 31, 2018 · 0 comments

Comments

@DrewWeth
Copy link

DrewWeth commented Dec 31, 2018

The @DefaultValue annotation seems to add a description instead of actually adding a metadata field called default: true

https://json-schema.org/understanding-json-schema/reference/generic.html

Here's the test that doesn't abide by the standard

jsonSchemaOf(classOf[BooleansWithDefault]) should equal("""{"type":"object","properties":{"field":{"type":"boolean","description":"(default value: true)"}},"id":"#booleanswithdefault","additionalProperties":false,"title":"Booleans with default"}""")

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