-
Notifications
You must be signed in to change notification settings - Fork 85
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
Implementing additionalProperties to Schema and Boolean #234
Conversation
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.
Possibly part of the issues mentioned inline come from
ExampleBuilder fromProperty
in line 380, which sets the inner example as the example instead of adding to map of output.
Also still I don't understand the example with this key:key
as string
|
||
String str = client.invokeAPI("/mockResponses/additionalPropertiesTest", "GET", queryParams, null, new HashMap<String, String>(), null, "application/json", null, new String[0]); | ||
assertEquals(str, "{\"key\":\"key\",\"value\":\"string\"}"); | ||
} |
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.
doesn't seem right, should be something like "{\"foo\":0,\"additionalPropertyExampleKey\":\"string\"}"
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.
I changed the code, and try not to break the older tests in the process
|
||
String str = client.invokeAPI("/mockResponses/additionalProperties1", "GET", queryParams, null, new HashMap<String, String>(), null, "application/json", null, new String[0]); | ||
assertEquals(str, "{\"key\":\"key\",\"value\":{\"bar\":0}}"); | ||
} |
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.
doesn't seem right, should be something like "{\"foo\":0,\"additionalPropertyExampleKey\":{\"bar\":0}}}"
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.
I changed the code, and try not to break the older tests in the process
|
||
String str = client.invokeAPI("/mockResponses/badAdditionalProperties", "GET", queryParams, null, new HashMap<String, String>(), null, "application/json", null, new String[0]); | ||
assertEquals(str, "{\"foo\":0}"); | ||
} |
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.
why "Bad"? change to "False" or something.
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.
changed
refs swagger-api/swagger-core#2461 - swagger-api/swagger-parser#499