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

Fixes an issue where code generator for Java produces not compileable code #1357

Merged
merged 1 commit into from
Nov 9, 2018

Conversation

eivinhb
Copy link
Contributor

@eivinhb eivinhb commented Oct 31, 2018

Fixes: #436

... if the yml-definition does not have any type definitions. This
is normal if the api only uses simple datatypes (Int, String) for
input/output.

I have not updated the pet-store-clients for this PR. The reason is that the change does not affect the pet store api in any way, since this is fix is for apis with no model definitions.

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

(details of the change, additional tests that have been done, reference to the issue for tracking, etc)

code if the yml-definition does not have any type definitions. This
is normal if the api only uses simple datatypes (Int, String) for
inout/output.
@eivinhb
Copy link
Contributor Author

eivinhb commented Oct 31, 2018

@jeff9finger

@wing328 wing328 added this to the 3.3.3 milestone Nov 3, 2018
@wing328
Copy link
Member

wing328 commented Nov 9, 2018

@eivinhb I think we can go with this fix and I may have a better fix using a new tag (e.g. hasModel) for this particular case in which there's no model defined in the spec

@wing328 wing328 merged commit 93e2fc6 into OpenAPITools:master Nov 9, 2018
@wing328
Copy link
Member

wing328 commented Nov 11, 2018

@eivinhb I've enhanced your fix using {{models.0}} instead. Please pull the latest master to give it a try.

Ref: https://github.com/OpenAPITools/openapi-generator/pull/1414/files#diff-182b20fc349b4d91549801f58acbfcedR28

@wing328
Copy link
Member

wing328 commented Nov 15, 2018

@eivinhb the fix has been included in the v3.3.3 release: https://twitter.com/oas_generator/status/1062929948191510528

A-Joshi pushed a commit to ihsmarkitoss/openapi-generator that referenced this pull request Feb 27, 2019
…OpenAPITools#1357)

code if the yml-definition does not have any type definitions. This
is normal if the api only uses simple datatypes (Int, String) for
inout/output.
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.

[JaxRS] compile error with spec without models
2 participants