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

JSON stringify for query parameters #1220

Merged
merged 3 commits into from
Dec 12, 2023

Conversation

luca-vercelli
Copy link

As described in issue #1173, OpenAPI allows query parameters to be JSON objects. However these are not handled correctly in typescript generated code.

With this PR, if we recognize that a query parameter has JSON as content-type, we force a JSON.stringify in generated typescript code, before http call.

This PR requires that a new parameter isJson is created on class CodegenParameter. See swagger-api/swagger-codegen#12289.

@HugoMario HugoMario merged commit a892f5e into swagger-api:master Dec 12, 2023
5 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants