Skip to content

[typescript-axios] handle uniqueItems in query and header parameters#8965

Merged
wing328 merged 3 commits into
OpenAPITools:masterfrom
t-h-e:fix_typescript-axios-uniqueitems-parameters
Apr 1, 2021
Merged

[typescript-axios] handle uniqueItems in query and header parameters#8965
wing328 merged 3 commits into
OpenAPITools:masterfrom
t-h-e:fix_typescript-axios-uniqueitems-parameters

Conversation

@t-h-e

@t-h-e t-h-e commented Mar 12, 2021

Copy link
Copy Markdown
Contributor

Fixes #6904
uniqueItems for query and header parameter have not been handled correctly

add endpoint /fake/test-unique-paramters to petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml and typescript-axios config for demonstration

@TiFu @taxpon @sebastianhaas @kenisteward @Vrolijkx @macjohnny @topce @akehir @petejohansonxo @amakhrov

@auto-labeler

auto-labeler Bot commented Mar 12, 2021

Copy link
Copy Markdown

👍 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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure about the comparison here <any>"{{{dataType}}}" !== "Set<string>" as I'm not sure what the comparison in the Array case is supposed to do. If someone can verify that this is correct or let me know what the correct version is supposed to be, I would be grateful 😃

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks correct, I think the idea is to serialize the items of a non-string array/set

@t-h-e

t-h-e commented Mar 12, 2021

Copy link
Copy Markdown
Contributor Author

The commit appears bigger than it actually is due to the generated code from the additional typescript-axios config

@macjohnny macjohnny left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks correct, I think the idea is to serialize the items of a non-string array/set

@macjohnny

Copy link
Copy Markdown
Member

@t-h-e thanks for your contribution. please re-generate the samples

@macjohnny

Copy link
Copy Markdown
Member

note: this PR is similar to #8695

@wing328 wing328 added this to the 5.1.1 milestone Mar 22, 2021
t-h-e and others added 3 commits March 22, 2021 12:36
add endpoint /fake/test-unique-paramters to petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml for demonstration
@t-h-e t-h-e force-pushed the fix_typescript-axios-uniqueitems-parameters branch from 9aa72a5 to ac11813 Compare March 22, 2021 15:31
@wing328 wing328 merged commit 7bf792a into OpenAPITools:master Apr 1, 2021
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.

[BUG] [Typescript-Axios] Sets are treated like Arrays

3 participants