We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Provide JSON schema generation where "additionalProperties" : false will be applied for all classes which I have.
Suppose I have following classes:
class A{ private String s; private B b; public String getS() { return s; } public B getB() { return b; } } class B{ private BigDecimal bd; public BigDecimal getBd() { return bd; } }
Generating schema as following like below code the schema property "additionalProperties" : false was applying only for the class A.
ObjectMapper mapper = new ObjectMapper(); JsonSchemaGenerator schemaGen = new JsonSchemaGenerator(mapper); ObjectSchema schema = schemaGen.generateSchema(A.class).asObjectSchema(); schema.rejectAdditionalProperties(); mapper.writerWithDefaultPrettyPrinter().writeValueAsString(schema);
The text was updated successfully, but these errors were encountered:
This is not a user support for forum for asking questions, but issue tracker.
Sorry, something went wrong.
I made refactor in description.
No branches or pull requests
Provide JSON schema generation where "additionalProperties" : false will be applied for all classes which I have.
Suppose I have following classes:
Generating schema as following like below code the schema property "additionalProperties" : false was applying only for the class A.
The text was updated successfully, but these errors were encountered: