Skip to content

[typescript] Don't hardcode the date type if user has mapped it#5266

Merged
macjohnny merged 6 commits intoOpenAPITools:masterfrom
asmundg:asmundg/respect-date-type-mapping
Feb 12, 2020
Merged

[typescript] Don't hardcode the date type if user has mapped it#5266
macjohnny merged 6 commits intoOpenAPITools:masterfrom
asmundg:asmundg/respect-date-type-mapping

Conversation

@asmundg
Copy link
Copy Markdown
Contributor

@asmundg asmundg commented Feb 10, 2020

If the user has set --type-mappings Date=foo, respect this setting
instead of hardcoding the date type.

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project before.
  • Run the shell script(s) under ./bin/ (or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc).
  • File the PR against the correct branch: master, 4.3.x, 5.0.x. Default: master.
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

If the user has set --type-mappings Date=foo, respect this setting
instead of hardcoding the date type.
@auto-labeler
Copy link
Copy Markdown

auto-labeler Bot commented Feb 10, 2020

👍 Thanks for opening this issue!
🏷 I have applied any labels matching special text in your issue.

The team will review the labels and make any necessary changes.

@asmundg asmundg requested a review from macjohnny February 10, 2020 18:46
@asmundg
Copy link
Copy Markdown
Contributor Author

asmundg commented Feb 10, 2020

cc @amakhrov @macjohnny

@macjohnny
Copy link
Copy Markdown
Member

@macjohnny macjohnny added this to the 4.3.0 milestone Feb 12, 2020
@macjohnny macjohnny merged commit e157b05 into OpenAPITools:master Feb 12, 2020
wing328 pushed a commit that referenced this pull request Mar 3, 2020
* Add failing tests for typescript type declaration

* Refactor array and map child type string fallback

* Add unaliasSchema to typescript getTypeDeclaration

* TypeScriptRxjs: Use Blob as file type declaration

This was inadvertantly changed in
#5266
MikailBag pushed a commit to MikailBag/openapi-generator that referenced this pull request Mar 23, 2020
…APITools#5266)

* [typescript] Don't hardcode the date type if user has mapped it

If the user has set --type-mappings Date=foo, respect this setting
instead of hardcoding the date type.

* Use default type mappings for date/date-time

* Use typeMapping mechanism correctly

* Add default mapping for angular and node to preserve behavior

* One more change to keep current behavior

* Add default type mappings to the other TS generators
MikailBag pushed a commit to MikailBag/openapi-generator that referenced this pull request Mar 23, 2020
* Add failing tests for typescript type declaration

* Refactor array and map child type string fallback

* Add unaliasSchema to typescript getTypeDeclaration

* TypeScriptRxjs: Use Blob as file type declaration

This was inadvertantly changed in
OpenAPITools#5266
@wing328
Copy link
Copy Markdown
Member

wing328 commented Mar 27, 2020