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

Added examples for body parameter #6228

Merged
merged 1 commit into from
Aug 19, 2017

Conversation

ToreJohansson
Copy link
Contributor

Added examples for Body parameter - the reason for this it to be able to auto generate test cases with valid request content. The other option is to manually add x-examples in the specification and use those as input.

@@ -2274,6 +2274,10 @@ public CodegenOperation fromOperation(String path,
} else if (param instanceof BodyParameter) {
bodyParam = p;
bodyParams.add(p.copy());
if(definitions != null)
{
Copy link
Contributor

@wing328 wing328 Aug 14, 2017

Choose a reason for hiding this comment

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

@ToreJohansson Please update to if (definitions != null) { instead to conform to Java style guide.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed via d6c9522

@wing328 wing328 added this to the v2.3.0 milestone Aug 14, 2017
@wing328 wing328 merged commit dabe6b5 into swagger-api:master Aug 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants