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

Implementing additionalProperties to Schema and Boolean #234

Merged
merged 8 commits into from
Jan 15, 2018

Conversation

gracekarina
Copy link
Contributor

@gracekarina gracekarina changed the title casting additionalProperties to Schema - Implementing additionalProperties to Schema and Boolean Jan 11, 2018
Copy link
Member

@frantuma frantuma left a 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\"}");
}
Copy link
Member

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\"}"

Copy link
Contributor Author

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}}");
}
Copy link
Member

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}}}"

Copy link
Contributor Author

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}");
}
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

@frantuma frantuma merged commit b11ad06 into 2.0 Jan 15, 2018
@gracekarina gracekarina deleted the ticket-2461_2.0 branch February 16, 2018 00:35
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

Successfully merging this pull request may close these issues.

2 participants