-
Notifications
You must be signed in to change notification settings - Fork 534
Supporting change in additionalProperties Boolean and Schema #612
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
Conversation
ArraySchema model = new ArraySchema(); | ||
model.setDescription(description); | ||
model.setExample(example); | ||
model.setItems(object.getAdditionalProperties()); | ||
if (object.getAdditionalProperties() != null && object.getAdditionalProperties() instanceof Schema) { | ||
items = (Schema) object.getAdditionalProperties(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the variable item was created only for assignation, if there's no validation or another use it might be a good idea to delete it and set directly model.setItems((Schema)object.getAdditionalProperties());
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be important to add a test, with a additionalProperties with. boolean values considering it's part of the issue requirement.
This PR depends on swagger-api/swagger-core#2598 |
refs swagger-api/swagger-core#2461
#499 and fixing refs in additionalProperties Resolving RefExternalResolver #342 (in v3)