From ca378b424abddd0a2a4da747d3e3d4fd82daa877 Mon Sep 17 00:00:00 2001 From: Hidetoshi Date: Thu, 12 Sep 2024 13:59:40 +0900 Subject: [PATCH] [typescript-axios] fix: enum datatype jsdoc (#19570) (#19571) * fix: enum dataType JSDoc * chore: generate samples --- .../src/main/resources/typescript-axios/modelEnum.mustache | 2 +- .../petstore/typescript-axios/builds/test-petstore/api.ts | 4 ++-- .../api.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/modelEnum.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/modelEnum.mustache index e18f5c09859..9f5b6b3323e 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/modelEnum.mustache @@ -1,7 +1,7 @@ /** * {{{description}}} * @export - * @enum {string} + * @enum {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> */ {{#isBoolean}} export type {{classname}} = {{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}} | {{/-last}}{{/enumVars}}{{/allowableValues}} diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts index 9e6fbd62d62..8849fa8f81d 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts @@ -1322,7 +1322,7 @@ export type OuterEnumDefaultValue = typeof OuterEnumDefaultValue[keyof typeof Ou /** * * @export - * @enum {string} + * @enum {number} */ export const OuterEnumInteger = { @@ -1337,7 +1337,7 @@ export type OuterEnumInteger = typeof OuterEnumInteger[keyof typeof OuterEnumInt /** * * @export - * @enum {string} + * @enum {number} */ export const OuterEnumIntegerDefaultValue = { diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts index 84e27a4c705..23003c21683 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts @@ -1009,7 +1009,7 @@ export type OuterEnumDefaultValue = typeof OuterEnumDefaultValue[keyof typeof Ou /** * * @export - * @enum {string} + * @enum {number} */ export const OuterEnumInteger = { @@ -1024,7 +1024,7 @@ export type OuterEnumInteger = typeof OuterEnumInteger[keyof typeof OuterEnumInt /** * * @export - * @enum {string} + * @enum {number} */ export const OuterEnumIntegerDefaultValue = {