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

[Ada] by defining x-is-model-type when property is local to the YML file #7655

Merged
merged 10 commits into from
Feb 22, 2018
Merged

[Ada] by defining x-is-model-type when property is local to the YML file #7655

merged 10 commits into from
Feb 22, 2018

Conversation

michelealbano
Copy link
Contributor

@michelealbano michelealbano commented Feb 14, 2018

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: 3.0.0 branch for changes related to OpenAPI spec 3.0. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

WIth these changes, postProcessModels method of AbstractAdaCodegen class adds "x-is-model-type true" to all the properties of a model that are related to models defined in the same YML file. The change was done to Fix #7569.

Tests were done against both the YML file in issue 7569, and against 2 quite complex YML files. One of the YML specifications was previously processed correctly, and still is. The other one was not correctly processed, and now produces correct code.

Please Stephane verify my changes, since I am not sure why you had a "List d" in method postProcessModels.

@wing328
Copy link
Contributor

wing328 commented Feb 22, 2018

@micheleISEP thanks for the PR.

cc @stcarrez to review

@stcarrez
Copy link
Contributor

It took me time to look at it but yes, this is truly correct!
Thanks!

@wing328 wing328 merged commit edf6be8 into swagger-api:master Feb 22, 2018
@wing328 wing328 changed the title [Ada] Fix #7569 by defining x-is-model-type when property is local to the YML file [Ada] by defining x-is-model-type when property is local to the YML file Feb 22, 2018
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.

3 participants