typescript-rxjs: fix query parameters type#4160
Merged
macjohnny merged 3 commits intoOpenAPITools:masterfrom Oct 16, 2019
macjohnny:bugfix/4159-typescript-rxjs-query-parameters-type
Merged
typescript-rxjs: fix query parameters type#4160macjohnny merged 3 commits intoOpenAPITools:masterfrom macjohnny:bugfix/4159-typescript-rxjs-query-parameters-type
macjohnny merged 3 commits intoOpenAPITools:masterfrom
macjohnny:bugfix/4159-typescript-rxjs-query-parameters-type
Conversation
…ipt-rxjs-query-parameters-type
Contributor
|
I would have preferred the |
Contributor
|
Or even cleaner would be extending the definition of Then the generated controllers would not be affected at all. |
Member
Author
|
@denyo will you file a PR to make the changeS? |
Contributor
|
I can't before next week. |
Member
Author
|
with type HttpQuery = { [key: string]: string | number | null | boolean | Array<string | number | null | boolean> } | {};the type-safety is lost, i.e. const bla: HttpQuery = { bla: new SomeObject()}; |
Contributor
|
The problem is this: type HttpQuery = ... | {};If type HttpQuery = Partial<{ [key: string]: string | number | null | boolean | Array<string | number | null | boolean> }>;See a working example: TS Playground |
5 tasks
Member
|
@macjohnny thanks for the PR, which has been included in v4.2.0 release: https://twitter.com/oas_generator/status/1189824932345069569 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #4159
cc @akehir @denyo