Skip to content

Set isModel property#1275

Merged
wing328 merged 2 commits intoOpenAPITools:masterfrom
wheezil:is-model-property
Oct 23, 2018
Merged

Set isModel property#1275
wing328 merged 2 commits intoOpenAPITools:masterfrom
wheezil:is-model-property

Conversation

@wheezil
Copy link
Copy Markdown
Contributor

@wheezil wheezil commented Oct 19, 2018

PR checklist

  • Read the contribution guidelines.
  • [NA] 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 [master]
  • [NA] Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

Added an attribute isModel available to the mustache-based code generators. This should be set for all parameters and fields that are objects or referenced schemas.

@wing328
Copy link
Copy Markdown
Member

wing328 commented Oct 22, 2018

@wheezil thanks for the PR. I'd a look and I think it' a good start. There will be some enhancements and I"ll do it after merging this PR into master.

@wing328 wing328 added this to the 3.3.2 milestone Oct 22, 2018
@wing328
Copy link
Copy Markdown
Member

wing328 commented Oct 22, 2018

If no further question or feedback, I'll merge it tomorrow.

@wheezil
Copy link
Copy Markdown
Contributor Author

wheezil commented Oct 22, 2018

Thanks William. Much appreciated because I'm using it already :-) Let me know if I've forgotten some cases.

@wing328 wing328 merged commit e06665f into OpenAPITools:master Oct 23, 2018
@wing328
Copy link
Copy Markdown
Member

wing328 commented Oct 31, 2018

Note: this enhancement may be subject to breaking changes in the future as the enhancement is still being worked on (e.g. isModel support in Response object)

@wheezil
Copy link
Copy Markdown
Contributor Author

wheezil commented Oct 31, 2018

Hi William. Do you think that isModel will be replaced by something equivalent in the template? I currently use it only in one place.

@wing328
Copy link
Copy Markdown
Member

wing328 commented Oct 31, 2018

I don't foresee the isModel tag will be removed or renamed to something else.

@wing328
Copy link
Copy Markdown
Member

wing328 commented Oct 31, 2018

A-Joshi pushed a commit to ihsmarkitoss/openapi-generator that referenced this pull request Feb 27, 2019
* Set isModel property

* Replace tab characters
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.

2 participants