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

Fixes the non-working query parameter when it's an Enum #20210

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions bin/configs/typescript-echo-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
generatorName: typescript
outputDir: samples/client/echo_api/typescript/build
inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
templateDir: modules/openapi-generator/src/main/resources/typescript
additionalProperties:
artifactId: echo-api-typescript
hideGenerationTimestamp: "true"
npmVersion: 1.0.0
npmName: '@openapitools/typescript-echo-api'
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ export class {{classname}}RequestFactory extends BaseAPIRequestFactory {
requestContext.setQueryParam("{{baseName}}", ObjectSerializer.serialize({{paramName}}, "{{{dataType}}}", "{{dataFormat}}"));
{{/isPrimitiveType}}
{{^isPrimitiveType}}
{{#isEnumRef}}
requestContext.setQueryParam("{{baseName}}", ObjectSerializer.serialize({{paramName}}, "{{{dataType}}}", "{{dataFormat}}"));
{{/isEnumRef}}
{{^isEnumRef}}
{{#isExplode}}
const serializedParams = ObjectSerializer.serialize({{paramName}}, "{{{dataType}}}", "{{dataFormat}}");
{{#isArray}}
Expand All @@ -86,6 +90,7 @@ export class {{classname}}RequestFactory extends BaseAPIRequestFactory {
{{^isExplode}}
requestContext.setQueryParam("{{baseName}}", ObjectSerializer.serialize({{paramName}}, "{{{dataType}}}", "{{dataFormat}}"));
{{/isExplode}}
{{/isEnumRef}}
{{/isPrimitiveType}}
}
{{/queryParams}}
Expand Down
8 changes: 8 additions & 0 deletions samples/client/echo_api/typescript/build/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions samples/client/echo_api/typescript/build/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions samples/client/echo_api/typescript/build/.openapi-generator-ignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 47 additions & 0 deletions samples/client/echo_api/typescript/build/.openapi-generator/FILES

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

103 changes: 103 additions & 0 deletions samples/client/echo_api/typescript/build/AuthApi.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading