I somehow have to generate a swagger doc with addtionalProperties as false
to not allow additional properties. I looked at
https://github.com/swagger-api/swagger-core/blob/master/modules/swagger-models/src/main/java/io/swagger/models/ModelImpl.java
but setAdditionalProperties accept a Property only, how do I set it with a
boolean value?
public void setAdditionalProperties(Property additionalProperties) {
type(OBJECT);
this.additionalProperties = additionalProperties;
}
"TestDTO" : {
> "type" : "object",
> "additionalProperties":false
> "properties" : {
> "property1" : {
> "description" : "This is a test object.",
> "$ref" : "#/definitions/TestDTO"
> },
> "perperty2" : {
> "type" : "string",
> "description" : "this is a property."
> }
> }
> },
>
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.