Skip to content

Conversation

@ackintosh
Copy link
Contributor

@ackintosh ackintosh commented Jan 8, 2019

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: master, 3.4.x, 4.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

This PR fixes #1782

@ackintosh ackintosh added this to the 4.0.0 milestone Jan 8, 2019
@ackintosh
Copy link
Contributor Author

( I think it's better that swagger-models supports deep copy. 🤔 )

@wing328
Copy link
Member

wing328 commented Jan 8, 2019

( I think it's better that swagger-models supports deep copy. 🤔 )

Agreed

@wing328
Copy link
Member

wing328 commented Jan 8, 2019

Looks like the fix causes some changes in the samples, e.g.

--- a/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml
+++ b/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml
@@ -91,6 +91,7 @@ components:
         '*/*':
           schema:
             $ref: '#/components/schemas/inline_object'
+      required: true
   schemas:
     additionalPropertiesObject:
       additionalProperties:

./bin/utils/ensure-up-to-date
@wing328
Copy link
Member

wing328 commented Jan 12, 2019

I'll have a look this afternoon (Sat)

@ackintosh
Copy link
Contributor Author

The ton of weird changes on samples folder in this PR was fixed via #1863 😄💦

./bin/utils/ensure-up-to-date
Copy link
Member

@wing328 wing328 left a comment

Choose a reason for hiding this comment

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

LGTM

@wing328 wing328 merged commit 7674d11 into OpenAPITools:master Jan 14, 2019
@ackintosh ackintosh deleted the fix-issue-1782 branch January 14, 2019 04:39
A-Joshi pushed a commit to ihsmarkitoss/openapi-generator that referenced this pull request Feb 27, 2019
…#1847)

* Add test case that reproduce the issue OpenAPITools#1782

* Fix missing RequestBody.required

* Update samples

./bin/utils/ensure-up-to-date

* Run ensure-up-to-date script

./bin/utils/ensure-up-to-date
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.

[KOTLIN][SPRING] Required requestBody should not be optional

2 participants