diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java index be33bd25485a..5d9c7091ad49 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java @@ -1206,6 +1206,7 @@ public boolean isDateTimeType() { public ExtendedCodegenParameter(CodegenParameter cp) { super(); + this.isDeprecated = cp.isDeprecated; this.isFormParam = cp.isFormParam; this.isQueryParam = cp.isQueryParam; this.isPathParam = cp.isPathParam; diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache index 161f153b8363..97fb15df5253 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache @@ -25,6 +25,12 @@ import { {{#allParams.0}} export interface {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}Request { {{#allParams}} + /** + * {{#lambda.indented_star_4}}{{{unescapedDescription}}}{{/lambda.indented_star_4}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + */ {{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{#hasReadOnly}}Omit<{{{dataType}}}, {{#readOnlyVars}}'{{name}}'{{^-last}}|{{/-last}}{{/readOnlyVars}}>{{/hasReadOnly}}{{^hasReadOnly}}{{{dataType}}}{{/hasReadOnly}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}; {{/allParams}} } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchClientCodegenTest.java index d590def020d3..0ba3cd8a5305 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchClientCodegenTest.java @@ -93,6 +93,35 @@ public void testModelsWithoutPaths() throws IOException { TestUtils.assertFileExists(Paths.get(output + "/models/index.ts")); } + @Test + public void testDeprecatedParameter() throws IOException { + File output = Files.createTempDirectory("test").toFile(); + output.deleteOnExit(); + + Map properties = new HashMap<>(); + // bundle parameters into a request interface so per-parameter JSDoc is emitted + properties.put("useSingleRequestParameter", true); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("typescript-fetch") + .setInputSpec("src/test/resources/3_0/typescript/deprecated-parameter.yaml") + .setAdditionalProperties(properties) + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + Generator generator = new DefaultGenerator(); + List files = generator.opts(configurator.toClientOptInput()).generate(); + files.forEach(File::deleteOnExit); + + // the deprecated `name` query parameter must carry an @deprecated JSDoc tag in the + // generated request-parameter interface + Path file = Paths.get(output + "/apis/DefaultApi.ts"); + TestUtils.assertFileContains(file, "* @deprecated"); + + // only the single deprecated parameter is tagged (the operation is not deprecated) + String content = Files.readString(file); + Assert.assertEquals(TestUtils.countOccurrences(content, "@deprecated"), 1); + } + @Test public void testWithoutSnapshotVersion() { OpenAPI api = TestUtils.createOpenAPI(); diff --git a/samples/client/others/typescript-fetch/additional-properties-in-multipart-issue/apis/FileApi.ts b/samples/client/others/typescript-fetch/additional-properties-in-multipart-issue/apis/FileApi.ts index 6d9934e38431..86f9d2729a80 100644 --- a/samples/client/others/typescript-fetch/additional-properties-in-multipart-issue/apis/FileApi.ts +++ b/samples/client/others/typescript-fetch/additional-properties-in-multipart-issue/apis/FileApi.ts @@ -20,9 +20,21 @@ import { } from '../models/StructuredType'; export interface CreateFileRequest { + /** + * + */ documentBytes: Blob; + /** + * + */ documentType: string; + /** + * + */ properties: { [key: string]: string; }; + /** + * + */ structured?: StructuredType; } diff --git a/samples/client/others/typescript-fetch/multipart-file-array/apis/DefaultApi.ts b/samples/client/others/typescript-fetch/multipart-file-array/apis/DefaultApi.ts index 88ceccf52fa7..13e8aa7d9647 100644 --- a/samples/client/others/typescript-fetch/multipart-file-array/apis/DefaultApi.ts +++ b/samples/client/others/typescript-fetch/multipart-file-array/apis/DefaultApi.ts @@ -15,7 +15,13 @@ import * as runtime from '../runtime'; export interface UploadFilesRequest { + /** + * + */ files: Array; + /** + * + */ metadata?: string; } diff --git a/samples/client/petstore/typescript-fetch/builds/allOf-nullable/apis/DefaultApi.ts b/samples/client/petstore/typescript-fetch/builds/allOf-nullable/apis/DefaultApi.ts index 24f9cd02260f..d4f7b1e1fa9a 100644 --- a/samples/client/petstore/typescript-fetch/builds/allOf-nullable/apis/DefaultApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/allOf-nullable/apis/DefaultApi.ts @@ -20,6 +20,9 @@ import { } from '../models/Club'; export interface ListRequest { + /** + * The id of the person to retrieve + */ personId: string; } diff --git a/samples/client/petstore/typescript-fetch/builds/allOf-readonly/apis/DefaultApi.ts b/samples/client/petstore/typescript-fetch/builds/allOf-readonly/apis/DefaultApi.ts index 24f9cd02260f..d4f7b1e1fa9a 100644 --- a/samples/client/petstore/typescript-fetch/builds/allOf-readonly/apis/DefaultApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/allOf-readonly/apis/DefaultApi.ts @@ -20,6 +20,9 @@ import { } from '../models/Club'; export interface ListRequest { + /** + * The id of the person to retrieve + */ personId: string; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/AnotherFakeApi.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/AnotherFakeApi.ts index 49ca65c4d256..cb6f1f2ad35d 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/AnotherFakeApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/AnotherFakeApi.ts @@ -20,6 +20,9 @@ import { } from '../models/Client'; export interface 123testSpecialTagsRequest { + /** + * + */ client: Client; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeApi.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeApi.ts index dd32c4808dbb..e54629f53eca 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeApi.ts @@ -70,118 +70,286 @@ import { } from '../models/User'; export interface FakeHttpSignatureTestRequest { + /** + * + */ pet: Pet; + /** + * query parameter + */ query1?: string; + /** + * header parameter + */ header1?: string; } export interface FakeOuterBooleanSerializeRequest { + /** + * + */ body?: boolean; } export interface FakeOuterCompositeSerializeRequest { + /** + * + */ outerComposite?: OuterComposite; } export interface FakeOuterNumberSerializeRequest { + /** + * + */ body?: number; } export interface FakeOuterStringSerializeRequest { + /** + * + */ body?: string; } export interface FakePropertyEnumIntegerSerializeRequest { + /** + * + */ outerObjectWithEnumProperty: OuterObjectWithEnumProperty; } export interface TestAdditionalPropertiesReferenceRequest { + /** + * + */ requestBody: { [key: string]: any; }; } export interface TestBodyWithBinaryRequest { + /** + * + */ body: Blob | null; } export interface TestBodyWithFileSchemaRequest { + /** + * + */ fileSchemaTestClass: FileSchemaTestClass; } export interface TestBodyWithQueryParamsRequest { + /** + * + */ query: string; + /** + * + */ user: User; } export interface TestClientModelRequest { + /** + * + */ client: Client; } export interface TestEndpointParametersRequest { + /** + * None + */ number: number; + /** + * None + */ _double: number; + /** + * None + */ patternWithoutDelimiter: string; + /** + * None + */ _byte: string; + /** + * None + */ integer?: number; + /** + * None + */ int32?: number; + /** + * None + */ int64?: number; + /** + * None + */ _float?: number; + /** + * None + */ string?: string; + /** + * None + */ binary?: Blob; + /** + * None + */ date?: Date; + /** + * None + */ dateTime?: Date; + /** + * None + */ password?: string; + /** + * None + */ callback?: string; } export interface TestEnumParametersRequest { + /** + * Header parameter enum test (string array) + */ enumHeaderStringArray?: Array; + /** + * Header parameter enum test (string) + */ enumHeaderString?: TestEnumParametersEnumHeaderStringEnum; + /** + * Query parameter enum test (string array) + */ enumQueryStringArray?: Array; + /** + * Query parameter enum test (string) + */ enumQueryString?: TestEnumParametersEnumQueryStringEnum; + /** + * Query parameter enum test (double) + */ enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum; + /** + * Query parameter enum test (double) + */ enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum; + /** + * + */ enumQueryModelArray?: Array; + /** + * Form parameter enum test (string array) + */ enumFormStringArray?: Array; + /** + * Form parameter enum test (string) + */ enumFormString?: TestEnumParametersEnumFormStringEnum; } export interface TestGroupParametersRequest { + /** + * Required String in group parameters + */ requiredStringGroup: number; + /** + * Required Boolean in group parameters + */ requiredBooleanGroup: boolean; + /** + * Required Integer in group parameters + */ requiredInt64Group: number; + /** + * String in group parameters + */ stringGroup?: number; + /** + * Boolean in group parameters + */ booleanGroup?: boolean; + /** + * Integer in group parameters + */ int64Group?: number; } export interface TestInlineAdditionalPropertiesRequest { + /** + * + */ requestBody: { [key: string]: string; }; } export interface TestInlineFreeformAdditionalPropertiesOperationRequest { + /** + * + */ testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest; } export interface TestJsonFormDataRequest { + /** + * field1 + */ param: string; + /** + * field2 + */ param2: string; } export interface TestNullableRequest { + /** + * + */ childWithNullable: ChildWithNullable; } export interface TestQueryParameterCollectionFormatRequest { + /** + * + */ pipe: Array; + /** + * + */ ioutil: Array; + /** + * + */ http: Array; + /** + * + */ url: Array; + /** + * + */ context: Array; + /** + * + */ allowEmpty: string; + /** + * + */ language?: { [key: string]: string; }; } export interface TestStringMapReferenceRequest { + /** + * + */ requestBody: { [key: string]: string; }; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeClassnameTags123Api.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeClassnameTags123Api.ts index 27b3690a9829..73ea32dd8b15 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeClassnameTags123Api.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeClassnameTags123Api.ts @@ -20,6 +20,9 @@ import { } from '../models/Client'; export interface TestClassnameRequest { + /** + * + */ client: Client; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/PetApi.ts index 89c3f62b69b2..16bcd6ed6b0b 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/PetApi.ts @@ -25,45 +25,94 @@ import { } from '../models/Pet'; export interface AddPetRequest { + /** + * + */ pet: Pet; } export interface DeletePetRequest { + /** + * Pet id to delete + */ petId: number; + /** + * + */ apiKey?: string; } export interface FindPetsByStatusRequest { + /** + * Status values that need to be considered for filter + * @deprecated + */ status: Array; } export interface FindPetsByTagsRequest { + /** + * Tags to filter by + */ tags: Set; } export interface GetPetByIdRequest { + /** + * ID of pet to return + */ petId: number; } export interface UpdatePetRequest { + /** + * + */ pet: Pet; } export interface UpdatePetWithFormRequest { + /** + * ID of pet that needs to be updated + */ petId: number; + /** + * Updated name of the pet + */ name?: string; + /** + * Updated status of the pet + */ status?: string; } export interface UploadFileRequest { + /** + * ID of pet to update + */ petId: number; + /** + * Additional data to pass to server + */ additionalMetadata?: string; + /** + * file to upload + */ file?: Blob; } export interface UploadFileWithRequiredFileRequest { + /** + * ID of pet to update + */ petId: number; + /** + * file to upload + */ requiredFile: Blob; + /** + * Additional data to pass to server + */ additionalMetadata?: string; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/StoreApi.ts index 13e0222ecafe..97fc9123716c 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/StoreApi.ts @@ -20,14 +20,23 @@ import { } from '../models/Order'; export interface DeleteOrderRequest { + /** + * ID of the order that needs to be deleted + */ orderId: string; } export interface GetOrderByIdRequest { + /** + * ID of pet that needs to be fetched + */ orderId: number; } export interface PlaceOrderRequest { + /** + * + */ order: Order; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/UserApi.ts index 2d3f3b42b464..9ccdec2d6745 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/UserApi.ts @@ -20,32 +20,59 @@ import { } from '../models/User'; export interface CreateUserRequest { + /** + * + */ user: User; } export interface CreateUsersWithArrayInputRequest { + /** + * + */ user: Array; } export interface CreateUsersWithListInputRequest { + /** + * + */ user: Array; } export interface DeleteUserRequest { + /** + * The name that needs to be deleted + */ username: string; } export interface GetUserByNameRequest { + /** + * The name that needs to be fetched. Use user1 for testing. + */ username: string; } export interface LoginUserRequest { + /** + * The user name for login + */ username: string; + /** + * The password for login in clear text + */ password: string; } export interface UpdateUserRequest { + /** + * name that need to be deleted + */ username: string; + /** + * + */ user: User; } diff --git a/samples/client/petstore/typescript-fetch/builds/default/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/default/apis/PetApi.ts index ddf2b4ca52ed..c4dbaa469281 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/apis/PetApi.ts @@ -25,39 +25,78 @@ import { } from '../models/Pet'; export interface AddPetRequest { + /** + * + */ body: Pet; } export interface DeletePetRequest { + /** + * Pet id to delete + */ petId: number; + /** + * + */ apiKey?: string; } export interface FindPetsByStatusRequest { + /** + * Status values that need to be considered for filter + */ status: Array; } export interface FindPetsByTagsRequest { + /** + * Tags to filter by + */ tags: Array; } export interface GetPetByIdRequest { + /** + * ID of pet to return + */ petId: number; } export interface UpdatePetRequest { + /** + * + */ body: Pet; } export interface UpdatePetWithFormRequest { + /** + * ID of pet that needs to be updated + */ petId: number; + /** + * Updated name of the pet + */ name?: string; + /** + * Updated status of the pet + */ status?: string; } export interface UploadFileRequest { + /** + * ID of pet to update + */ petId: number; + /** + * Additional data to pass to server + */ additionalMetadata?: string; + /** + * file to upload + */ file?: Blob; } diff --git a/samples/client/petstore/typescript-fetch/builds/default/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/default/apis/StoreApi.ts index 03872c75773a..6ca4b778ee7b 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/apis/StoreApi.ts @@ -20,14 +20,23 @@ import { } from '../models/Order'; export interface DeleteOrderRequest { + /** + * ID of the order that needs to be deleted + */ orderId: string; } export interface GetOrderByIdRequest { + /** + * ID of pet that needs to be fetched + */ orderId: number; } export interface PlaceOrderRequest { + /** + * + */ body: Order; } diff --git a/samples/client/petstore/typescript-fetch/builds/default/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/default/apis/UserApi.ts index 6b6be45400bb..973e383f071b 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/apis/UserApi.ts @@ -20,32 +20,59 @@ import { } from '../models/User'; export interface CreateUserRequest { + /** + * + */ body: User; } export interface CreateUsersWithArrayInputRequest { + /** + * + */ body: Array; } export interface CreateUsersWithListInputRequest { + /** + * + */ body: Array; } export interface DeleteUserRequest { + /** + * The name that needs to be deleted + */ username: string; } export interface GetUserByNameRequest { + /** + * The name that needs to be fetched. Use user1 for testing. + */ username: string; } export interface LoginUserRequest { + /** + * The user name for login + */ username: string; + /** + * The password for login in clear text + */ password: string; } export interface UpdateUserRequest { + /** + * name that need to be deleted + */ username: string; + /** + * + */ body: User; } diff --git a/samples/client/petstore/typescript-fetch/builds/enum/apis/DefaultApi.ts b/samples/client/petstore/typescript-fetch/builds/enum/apis/DefaultApi.ts index c0717a0c9b5d..21b890818e10 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/apis/DefaultApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/apis/DefaultApi.ts @@ -35,24 +35,54 @@ import { } from '../models/StringEnum'; export interface FakeEnumRequestGetInlineRequest { + /** + * + */ stringEnum?: FakeEnumRequestGetInlineStringEnumEnum; + /** + * + */ nullableStringEnum?: FakeEnumRequestGetInlineNullableStringEnumEnum; + /** + * + */ numberEnum?: FakeEnumRequestGetInlineNumberEnumEnum; + /** + * + */ nullableNumberEnum?: FakeEnumRequestGetInlineNullableNumberEnumEnum; } export interface FakeEnumRequestGetRefRequest { + /** + * + */ stringEnum?: StringEnum; + /** + * + */ nullableStringEnum?: StringEnum | null; + /** + * + */ numberEnum?: NumberEnum; + /** + * + */ nullableNumberEnum?: NumberEnum | null; } export interface FakeEnumRequestPostInlineRequest { + /** + * + */ fakeEnumRequestGetInline200Response?: FakeEnumRequestGetInline200Response; } export interface FakeEnumRequestPostRefRequest { + /** + * + */ enumPatternObject?: EnumPatternObject; } diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/PetApi.ts index ddf2b4ca52ed..c4dbaa469281 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/PetApi.ts @@ -25,39 +25,78 @@ import { } from '../models/Pet'; export interface AddPetRequest { + /** + * + */ body: Pet; } export interface DeletePetRequest { + /** + * Pet id to delete + */ petId: number; + /** + * + */ apiKey?: string; } export interface FindPetsByStatusRequest { + /** + * Status values that need to be considered for filter + */ status: Array; } export interface FindPetsByTagsRequest { + /** + * Tags to filter by + */ tags: Array; } export interface GetPetByIdRequest { + /** + * ID of pet to return + */ petId: number; } export interface UpdatePetRequest { + /** + * + */ body: Pet; } export interface UpdatePetWithFormRequest { + /** + * ID of pet that needs to be updated + */ petId: number; + /** + * Updated name of the pet + */ name?: string; + /** + * Updated status of the pet + */ status?: string; } export interface UploadFileRequest { + /** + * ID of pet to update + */ petId: number; + /** + * Additional data to pass to server + */ additionalMetadata?: string; + /** + * file to upload + */ file?: Blob; } diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/StoreApi.ts index 03872c75773a..6ca4b778ee7b 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/StoreApi.ts @@ -20,14 +20,23 @@ import { } from '../models/Order'; export interface DeleteOrderRequest { + /** + * ID of the order that needs to be deleted + */ orderId: string; } export interface GetOrderByIdRequest { + /** + * ID of pet that needs to be fetched + */ orderId: number; } export interface PlaceOrderRequest { + /** + * + */ body: Order; } diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/UserApi.ts index 6b6be45400bb..973e383f071b 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/UserApi.ts @@ -20,32 +20,59 @@ import { } from '../models/User'; export interface CreateUserRequest { + /** + * + */ body: User; } export interface CreateUsersWithArrayInputRequest { + /** + * + */ body: Array; } export interface CreateUsersWithListInputRequest { + /** + * + */ body: Array; } export interface DeleteUserRequest { + /** + * The name that needs to be deleted + */ username: string; } export interface GetUserByNameRequest { + /** + * The name that needs to be fetched. Use user1 for testing. + */ username: string; } export interface LoginUserRequest { + /** + * The user name for login + */ username: string; + /** + * The password for login in clear text + */ password: string; } export interface UpdateUserRequest { + /** + * name that need to be deleted + */ username: string; + /** + * + */ body: User; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/another-fake-api.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/another-fake-api.ts index 43528ff7c7da..81593279cf15 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/another-fake-api.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/another-fake-api.ts @@ -20,6 +20,9 @@ import { } from '../models/client'; export interface 123testSpecialTagsRequest { + /** + * + */ client: Client; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/fake-api.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/fake-api.ts index 0f47628e21d0..f62eb520f8d1 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/fake-api.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/fake-api.ts @@ -70,118 +70,286 @@ import { } from '../models/user'; export interface FakeHttpSignatureTestRequest { + /** + * + */ pet: Pet; + /** + * query parameter + */ query1?: string; + /** + * header parameter + */ header1?: string; } export interface FakeOuterBooleanSerializeRequest { + /** + * + */ body?: boolean; } export interface FakeOuterCompositeSerializeRequest { + /** + * + */ outerComposite?: OuterComposite; } export interface FakeOuterNumberSerializeRequest { + /** + * + */ body?: number; } export interface FakeOuterStringSerializeRequest { + /** + * + */ body?: string; } export interface FakePropertyEnumIntegerSerializeRequest { + /** + * + */ outerObjectWithEnumProperty: OuterObjectWithEnumProperty; } export interface TestAdditionalPropertiesReferenceRequest { + /** + * + */ requestBody: { [key: string]: any; }; } export interface TestBodyWithBinaryRequest { + /** + * + */ body: Blob | null; } export interface TestBodyWithFileSchemaRequest { + /** + * + */ fileSchemaTestClass: FileSchemaTestClass; } export interface TestBodyWithQueryParamsRequest { + /** + * + */ query: string; + /** + * + */ user: User; } export interface TestClientModelRequest { + /** + * + */ client: Client; } export interface TestEndpointParametersRequest { + /** + * None + */ number: number; + /** + * None + */ _double: number; + /** + * None + */ patternWithoutDelimiter: string; + /** + * None + */ _byte: string; + /** + * None + */ integer?: number; + /** + * None + */ int32?: number; + /** + * None + */ int64?: number; + /** + * None + */ _float?: number; + /** + * None + */ string?: string; + /** + * None + */ binary?: Blob; + /** + * None + */ date?: Date; + /** + * None + */ dateTime?: Date; + /** + * None + */ password?: string; + /** + * None + */ callback?: string; } export interface TestEnumParametersRequest { + /** + * Header parameter enum test (string array) + */ enumHeaderStringArray?: Array; + /** + * Header parameter enum test (string) + */ enumHeaderString?: TestEnumParametersEnumHeaderStringEnum; + /** + * Query parameter enum test (string array) + */ enumQueryStringArray?: Array; + /** + * Query parameter enum test (string) + */ enumQueryString?: TestEnumParametersEnumQueryStringEnum; + /** + * Query parameter enum test (double) + */ enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum; + /** + * Query parameter enum test (double) + */ enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum; + /** + * + */ enumQueryModelArray?: Array; + /** + * Form parameter enum test (string array) + */ enumFormStringArray?: Array; + /** + * Form parameter enum test (string) + */ enumFormString?: TestEnumParametersEnumFormStringEnum; } export interface TestGroupParametersRequest { + /** + * Required String in group parameters + */ requiredStringGroup: number; + /** + * Required Boolean in group parameters + */ requiredBooleanGroup: boolean; + /** + * Required Integer in group parameters + */ requiredInt64Group: number; + /** + * String in group parameters + */ stringGroup?: number; + /** + * Boolean in group parameters + */ booleanGroup?: boolean; + /** + * Integer in group parameters + */ int64Group?: number; } export interface TestInlineAdditionalPropertiesRequest { + /** + * + */ requestBody: { [key: string]: string; }; } export interface TestInlineFreeformAdditionalPropertiesOperationRequest { + /** + * + */ testInlineFreeformAdditionalPropertiesRequest: TestInlineFreeformAdditionalPropertiesRequest; } export interface TestJsonFormDataRequest { + /** + * field1 + */ param: string; + /** + * field2 + */ param2: string; } export interface TestNullableRequest { + /** + * + */ childWithNullable: ChildWithNullable; } export interface TestQueryParameterCollectionFormatRequest { + /** + * + */ pipe: Array; + /** + * + */ ioutil: Array; + /** + * + */ http: Array; + /** + * + */ url: Array; + /** + * + */ context: Array; + /** + * + */ allowEmpty: string; + /** + * + */ language?: { [key: string]: string; }; } export interface TestStringMapReferenceRequest { + /** + * + */ requestBody: { [key: string]: string; }; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/fake-classname-tags123-api.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/fake-classname-tags123-api.ts index 498566a7b6ac..ba644a53139b 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/fake-classname-tags123-api.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/fake-classname-tags123-api.ts @@ -20,6 +20,9 @@ import { } from '../models/client'; export interface TestClassnameRequest { + /** + * + */ client: Client; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/pet-api.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/pet-api.ts index ee481189d650..36fd402605f9 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/pet-api.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/pet-api.ts @@ -25,45 +25,94 @@ import { } from '../models/pet'; export interface AddPetRequest { + /** + * + */ pet: Pet; } export interface DeletePetRequest { + /** + * Pet id to delete + */ petId: number; + /** + * + */ apiKey?: string; } export interface FindPetsByStatusRequest { + /** + * Status values that need to be considered for filter + * @deprecated + */ status: Array; } export interface FindPetsByTagsRequest { + /** + * Tags to filter by + */ tags: Set; } export interface GetPetByIdRequest { + /** + * ID of pet to return + */ petId: number; } export interface UpdatePetRequest { + /** + * + */ pet: Pet; } export interface UpdatePetWithFormRequest { + /** + * ID of pet that needs to be updated + */ petId: number; + /** + * Updated name of the pet + */ name?: string; + /** + * Updated status of the pet + */ status?: string; } export interface UploadFileRequest { + /** + * ID of pet to update + */ petId: number; + /** + * Additional data to pass to server + */ additionalMetadata?: string; + /** + * file to upload + */ file?: Blob; } export interface UploadFileWithRequiredFileRequest { + /** + * ID of pet to update + */ petId: number; + /** + * file to upload + */ requiredFile: Blob; + /** + * Additional data to pass to server + */ additionalMetadata?: string; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/store-api.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/store-api.ts index c5ac0c6732d8..18861ba50f3a 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/store-api.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/store-api.ts @@ -20,14 +20,23 @@ import { } from '../models/order'; export interface DeleteOrderRequest { + /** + * ID of the order that needs to be deleted + */ orderId: string; } export interface GetOrderByIdRequest { + /** + * ID of pet that needs to be fetched + */ orderId: number; } export interface PlaceOrderRequest { + /** + * + */ order: Order; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/user-api.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/user-api.ts index 606f33655398..133845c9e970 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/user-api.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/apis/user-api.ts @@ -20,32 +20,59 @@ import { } from '../models/user'; export interface CreateUserRequest { + /** + * + */ user: User; } export interface CreateUsersWithArrayInputRequest { + /** + * + */ user: Array; } export interface CreateUsersWithListInputRequest { + /** + * + */ user: Array; } export interface DeleteUserRequest { + /** + * The name that needs to be deleted + */ username: string; } export interface GetUserByNameRequest { + /** + * The name that needs to be fetched. Use user1 for testing. + */ username: string; } export interface LoginUserRequest { + /** + * The user name for login + */ username: string; + /** + * The password for login in clear text + */ password: string; } export interface UpdateUserRequest { + /** + * name that need to be deleted + */ username: string; + /** + * + */ user: User; } diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/PetApi.ts index 39d323da8131..2ec1b3d4cc57 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/PetApi.ts @@ -25,39 +25,78 @@ import { } from '../models/Pet'; export interface AddPetRequest { + /** + * + */ body: Pet; } export interface DeletePetRequest { + /** + * Pet id to delete + */ petId: number; + /** + * + */ apiKey?: string; } export interface FindPetsByStatusRequest { + /** + * Status values that need to be considered for filter + */ status: Array; } export interface FindPetsByTagsRequest { + /** + * Tags to filter by + */ tags: Array; } export interface GetPetByIdRequest { + /** + * ID of pet to return + */ petId: number; } export interface UpdatePetRequest { + /** + * + */ body: Pet; } export interface UpdatePetWithFormRequest { + /** + * ID of pet that needs to be updated + */ petId: number; + /** + * Updated name of the pet + */ name?: string; + /** + * Updated status of the pet + */ status?: string; } export interface UploadFileRequest { + /** + * ID of pet to update + */ petId: number; + /** + * Additional data to pass to server + */ additionalMetadata?: string; + /** + * file to upload + */ file?: Blob; } diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/StoreApi.ts index 427755498a64..7ad41c7209c4 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/StoreApi.ts @@ -20,14 +20,23 @@ import { } from '../models/Order'; export interface DeleteOrderRequest { + /** + * ID of the order that needs to be deleted + */ orderId: string; } export interface GetOrderByIdRequest { + /** + * ID of pet that needs to be fetched + */ orderId: number; } export interface PlaceOrderRequest { + /** + * + */ body: Order; } diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/UserApi.ts index 68c1227ad1b4..e16cdb11331f 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/UserApi.ts @@ -20,32 +20,59 @@ import { } from '../models/User'; export interface CreateUserRequest { + /** + * + */ body: User; } export interface CreateUsersWithArrayInputRequest { + /** + * + */ body: Array; } export interface CreateUsersWithListInputRequest { + /** + * + */ body: Array; } export interface DeleteUserRequest { + /** + * The name that needs to be deleted + */ username: string; } export interface GetUserByNameRequest { + /** + * The name that needs to be fetched. Use user1 for testing. + */ username: string; } export interface LoginUserRequest { + /** + * The user name for login + */ username: string; + /** + * The password for login in clear text + */ password: string; } export interface UpdateUserRequest { + /** + * name that need to be deleted + */ username: string; + /** + * + */ body: User; } diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/PetApi.ts index 303c15449e35..a5dca0be772b 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/PetApi.ts @@ -25,39 +25,78 @@ import { } from '../models/Pet'; export interface PetApiAddPetRequest { + /** + * + */ body: Pet; } export interface PetApiDeletePetRequest { + /** + * Pet id to delete + */ petId: number; + /** + * + */ apiKey?: string; } export interface PetApiFindPetsByStatusRequest { + /** + * Status values that need to be considered for filter + */ status: Array; } export interface PetApiFindPetsByTagsRequest { + /** + * Tags to filter by + */ tags: Array; } export interface PetApiGetPetByIdRequest { + /** + * ID of pet to return + */ petId: number; } export interface PetApiUpdatePetRequest { + /** + * + */ body: Pet; } export interface PetApiUpdatePetWithFormRequest { + /** + * ID of pet that needs to be updated + */ petId: number; + /** + * Updated name of the pet + */ name?: string; + /** + * Updated status of the pet + */ status?: string; } export interface PetApiUploadFileRequest { + /** + * ID of pet to update + */ petId: number; + /** + * Additional data to pass to server + */ additionalMetadata?: string; + /** + * file to upload + */ file?: Blob; } diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/StoreApi.ts index c5b353126579..e11aaccd0617 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/StoreApi.ts @@ -20,14 +20,23 @@ import { } from '../models/Order'; export interface StoreApiDeleteOrderRequest { + /** + * ID of the order that needs to be deleted + */ orderId: string; } export interface StoreApiGetOrderByIdRequest { + /** + * ID of pet that needs to be fetched + */ orderId: number; } export interface StoreApiPlaceOrderRequest { + /** + * + */ body: Order; } diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/UserApi.ts index c8dfbffeb6e2..dd7c0a9b9138 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/UserApi.ts @@ -20,32 +20,59 @@ import { } from '../models/User'; export interface UserApiCreateUserRequest { + /** + * + */ body: User; } export interface UserApiCreateUsersWithArrayInputRequest { + /** + * + */ body: Array; } export interface UserApiCreateUsersWithListInputRequest { + /** + * + */ body: Array; } export interface UserApiDeleteUserRequest { + /** + * The name that needs to be deleted + */ username: string; } export interface UserApiGetUserByNameRequest { + /** + * The name that needs to be fetched. Use user1 for testing. + */ username: string; } export interface UserApiLoginUserRequest { + /** + * The user name for login + */ username: string; + /** + * The password for login in clear text + */ password: string; } export interface UserApiUpdateUserRequest { + /** + * name that need to be deleted + */ username: string; + /** + * + */ body: User; } diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/BehaviorApi.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/BehaviorApi.ts index 3e5141e500e6..86bf721bd4a3 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/BehaviorApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/BehaviorApi.ts @@ -25,10 +25,16 @@ import { } from '../models/GetBehaviorTypeResponse'; export interface GetBehaviorPermissionsRequest { + /** + * + */ behaviorId: number; } export interface GetBehaviorTypeRequest { + /** + * + */ behaviorId: number; } diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/PetApi.ts index f15da374c4b7..1fa82dbf26ab 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/PetApi.ts @@ -45,56 +45,110 @@ import { } from '../models/PetRegionsResponse'; export interface AddPetRequest { + /** + * + */ dummyCat: Category; } export interface DeletePetRequest { + /** + * Pet id to delete + */ petId: number; + /** + * + */ apiKey?: string; } export interface FindPetsByIdsRequest { + /** + * Ids to filter by + */ ids: Array; } export interface FindPetsByStatusRequest { + /** + * Status values that need to be considered for filter + */ status: Array; } export interface FindPetsByTagsRequest { + /** + * Tags to filter by + */ tags: Array; } export interface FindPetsByUserIdsRequest { + /** + * Ids to filter by + */ ids: Array; } export interface GetPetByIdRequest { + /** + * ID of pet to return + */ petId: number; } export interface GetPetRegionsRequest { + /** + * ID of pet + */ petId: number; } export interface UpdatePetRequest { + /** + * + */ body: Pet; } export interface UpdatePetRegionsRequest { + /** + * ID of pet + */ petId: number; + /** + * + */ newRegions: Array>; } export interface UpdatePetWithFormRequest { + /** + * ID of pet that needs to be updated + */ petId: number; + /** + * Updated name of the pet + */ name?: string; + /** + * Updated status of the pet + */ status?: string; } export interface UploadFileRequest { + /** + * ID of pet to update + */ petId: number; + /** + * Additional data to pass to server + */ additionalMetadata?: string; + /** + * file to upload + */ file?: Blob; } diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/PetPartApi.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/PetPartApi.ts index 4cca2a59baca..27e0d64c145f 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/PetPartApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/PetPartApi.ts @@ -25,15 +25,36 @@ import { } from '../models/GetPetPartTypeResponse'; export interface GetFakePetPartTypeRequest { + /** + * + */ fakePetPartId: number; } export interface GetMatchingPartsRequest { + /** + * + */ fakePetPartId: number; + /** + * + */ _long: boolean; + /** + * + */ smooth: boolean; + /** + * + */ _short: boolean; + /** + * + */ name?: string; + /** + * + */ connectedPart?: string; } diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/StoreApi.ts index 427755498a64..7ad41c7209c4 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/StoreApi.ts @@ -20,14 +20,23 @@ import { } from '../models/Order'; export interface DeleteOrderRequest { + /** + * ID of the order that needs to be deleted + */ orderId: string; } export interface GetOrderByIdRequest { + /** + * ID of pet that needs to be fetched + */ orderId: number; } export interface PlaceOrderRequest { + /** + * + */ body: Order; } diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/UserApi.ts index 7886e34637ba..8f11d7ea40c5 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/UserApi.ts @@ -25,32 +25,59 @@ import { } from '../models/User'; export interface CreateUserRequest { + /** + * + */ body: User; } export interface CreateUsersWithArrayInputRequest { + /** + * + */ body: Array; } export interface CreateUsersWithListInputRequest { + /** + * + */ body: Array; } export interface DeleteUserRequest { + /** + * The name that needs to be deleted + */ username: string; } export interface GetUserByNameRequest { + /** + * The name that needs to be fetched. Use user1 for testing. + */ username: string; } export interface LoginUserRequest { + /** + * The user name for login + */ username: string; + /** + * The password for login in clear text + */ password: string; } export interface UpdateUserRequest { + /** + * name that need to be deleted + */ username: string; + /** + * + */ body: User; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/AnotherFakeApi.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/AnotherFakeApi.ts index 49ca65c4d256..cb6f1f2ad35d 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/AnotherFakeApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/AnotherFakeApi.ts @@ -20,6 +20,9 @@ import { } from '../models/Client'; export interface 123testSpecialTagsRequest { + /** + * + */ client: Client; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/FakeApi.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/FakeApi.ts index a3d509cd3d78..9514b1d2ab5a 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/FakeApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/FakeApi.ts @@ -60,102 +60,258 @@ import { } from '../models/User'; export interface FakeHttpSignatureTestRequest { + /** + * + */ pet: Pet; + /** + * query parameter + */ query1?: string; + /** + * header parameter + */ header1?: string; } export interface FakeOuterBooleanSerializeRequest { + /** + * + */ body?: boolean; } export interface FakeOuterCompositeSerializeRequest { + /** + * + */ outerComposite?: OuterComposite; } export interface FakeOuterNumberSerializeRequest { + /** + * + */ body?: number; } export interface FakeOuterStringSerializeRequest { + /** + * + */ body?: string; } export interface FakePropertyEnumIntegerSerializeRequest { + /** + * + */ outerObjectWithEnumProperty: OuterObjectWithEnumProperty; } export interface TestBodyWithBinaryRequest { + /** + * + */ body: Blob | null; } export interface TestBodyWithFileSchemaRequest { + /** + * + */ fileSchemaTestClass: FileSchemaTestClass; } export interface TestBodyWithQueryParamsRequest { + /** + * + */ query: string; + /** + * + */ user: User; } export interface TestClientModelRequest { + /** + * + */ client: Client; } export interface TestEndpointParametersRequest { + /** + * None + */ number: number; + /** + * None + */ _double: number; + /** + * None + */ patternWithoutDelimiter: string; + /** + * None + */ _byte: string; + /** + * None + */ integer?: number; + /** + * None + */ int32?: number; + /** + * None + */ int64?: number; + /** + * None + */ _float?: number; + /** + * None + */ string?: string; + /** + * None + */ binary?: Blob; + /** + * None + */ date?: Date; + /** + * None + */ dateTime?: Date; + /** + * None + */ password?: string; + /** + * None + */ callback?: string; } export interface TestEnumParametersRequest { + /** + * Header parameter enum test (string array) + */ enumHeaderStringArray?: Array; + /** + * Header parameter enum test (string) + */ enumHeaderString?: TestEnumParametersEnumHeaderStringEnum; + /** + * Query parameter enum test (string array) + */ enumQueryStringArray?: Array; + /** + * Query parameter enum test (string) + */ enumQueryString?: TestEnumParametersEnumQueryStringEnum; + /** + * Query parameter enum test (double) + */ enumQueryInteger?: TestEnumParametersEnumQueryIntegerEnum; + /** + * Query parameter enum test (double) + */ enumQueryDouble?: TestEnumParametersEnumQueryDoubleEnum; + /** + * + */ enumQueryModelArray?: Array; + /** + * Form parameter enum test (string array) + */ enumFormStringArray?: Array; + /** + * Form parameter enum test (string) + */ enumFormString?: TestEnumParametersEnumFormStringEnum; } export interface TestGroupParametersRequest { + /** + * Required String in group parameters + */ requiredStringGroup: number; + /** + * Required Boolean in group parameters + */ requiredBooleanGroup: boolean; + /** + * Required Integer in group parameters + */ requiredInt64Group: number; + /** + * String in group parameters + */ stringGroup?: number; + /** + * Boolean in group parameters + */ booleanGroup?: boolean; + /** + * Integer in group parameters + */ int64Group?: number; } export interface TestInlineAdditionalPropertiesRequest { + /** + * + */ requestBody: { [key: string]: string; }; } export interface TestJsonFormDataRequest { + /** + * field1 + */ param: string; + /** + * field2 + */ param2: string; } export interface TestQueryParameterCollectionFormatRequest { + /** + * + */ pipe: Array; + /** + * + */ ioutil: Array; + /** + * + */ http: Array; + /** + * + */ url: Array; + /** + * + */ context: Array; + /** + * + */ allowEmpty: string; + /** + * + */ language?: { [key: string]: string; }; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/FakeClassnameTags123Api.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/FakeClassnameTags123Api.ts index 27b3690a9829..73ea32dd8b15 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/FakeClassnameTags123Api.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/FakeClassnameTags123Api.ts @@ -20,6 +20,9 @@ import { } from '../models/Client'; export interface TestClassnameRequest { + /** + * + */ client: Client; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/PetApi.ts index 89c3f62b69b2..16bcd6ed6b0b 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/PetApi.ts @@ -25,45 +25,94 @@ import { } from '../models/Pet'; export interface AddPetRequest { + /** + * + */ pet: Pet; } export interface DeletePetRequest { + /** + * Pet id to delete + */ petId: number; + /** + * + */ apiKey?: string; } export interface FindPetsByStatusRequest { + /** + * Status values that need to be considered for filter + * @deprecated + */ status: Array; } export interface FindPetsByTagsRequest { + /** + * Tags to filter by + */ tags: Set; } export interface GetPetByIdRequest { + /** + * ID of pet to return + */ petId: number; } export interface UpdatePetRequest { + /** + * + */ pet: Pet; } export interface UpdatePetWithFormRequest { + /** + * ID of pet that needs to be updated + */ petId: number; + /** + * Updated name of the pet + */ name?: string; + /** + * Updated status of the pet + */ status?: string; } export interface UploadFileRequest { + /** + * ID of pet to update + */ petId: number; + /** + * Additional data to pass to server + */ additionalMetadata?: string; + /** + * file to upload + */ file?: Blob; } export interface UploadFileWithRequiredFileRequest { + /** + * ID of pet to update + */ petId: number; + /** + * file to upload + */ requiredFile: Blob; + /** + * Additional data to pass to server + */ additionalMetadata?: string; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/StoreApi.ts index 13e0222ecafe..97fc9123716c 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/StoreApi.ts @@ -20,14 +20,23 @@ import { } from '../models/Order'; export interface DeleteOrderRequest { + /** + * ID of the order that needs to be deleted + */ orderId: string; } export interface GetOrderByIdRequest { + /** + * ID of pet that needs to be fetched + */ orderId: number; } export interface PlaceOrderRequest { + /** + * + */ order: Order; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/UserApi.ts index 2d3f3b42b464..9ccdec2d6745 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/apis/UserApi.ts @@ -20,32 +20,59 @@ import { } from '../models/User'; export interface CreateUserRequest { + /** + * + */ user: User; } export interface CreateUsersWithArrayInputRequest { + /** + * + */ user: Array; } export interface CreateUsersWithListInputRequest { + /** + * + */ user: Array; } export interface DeleteUserRequest { + /** + * The name that needs to be deleted + */ username: string; } export interface GetUserByNameRequest { + /** + * The name that needs to be fetched. Use user1 for testing. + */ username: string; } export interface LoginUserRequest { + /** + * The user name for login + */ username: string; + /** + * The password for login in clear text + */ password: string; } export interface UpdateUserRequest { + /** + * name that need to be deleted + */ username: string; + /** + * + */ user: User; } diff --git a/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/PetApi.ts index 36143cd9643b..b51ca27fe3b4 100644 --- a/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/PetApi.ts @@ -25,39 +25,79 @@ import { } from '../models/Pet'; export interface AddPetRequest { + /** + * + */ pet: Pet; } export interface DeletePetRequest { + /** + * Pet id to delete + */ petId: number; + /** + * + */ apiKey?: string; } export interface FindPetsByStatusRequest { + /** + * Status values that need to be considered for filter + * @deprecated + */ status: Array; } export interface FindPetsByTagsRequest { + /** + * Tags to filter by + */ tags: Array; } export interface GetPetByIdRequest { + /** + * ID of pet to return + */ petId: number; } export interface UpdatePetRequest { + /** + * + */ pet: Pet; } export interface UpdatePetWithFormRequest { + /** + * ID of pet that needs to be updated + */ petId: number; + /** + * Updated name of the pet + */ name?: string; + /** + * Updated status of the pet + */ status?: string; } export interface UploadFileRequest { + /** + * ID of pet to update + */ petId: number; + /** + * Additional data to pass to server + */ additionalMetadata?: string; + /** + * file to upload + */ file?: Blob; } diff --git a/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/StoreApi.ts index 63b40817398b..43ea23daf8d7 100644 --- a/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/StoreApi.ts @@ -20,14 +20,23 @@ import { } from '../models/Order'; export interface DeleteOrderRequest { + /** + * ID of the order that needs to be deleted + */ orderId: string; } export interface GetOrderByIdRequest { + /** + * ID of pet that needs to be fetched + */ orderId: number; } export interface PlaceOrderRequest { + /** + * + */ order: Order; } diff --git a/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/UserApi.ts index 55808c4938ff..4dc95623fc17 100644 --- a/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/validation-attributes/apis/UserApi.ts @@ -20,32 +20,59 @@ import { } from '../models/User'; export interface CreateUserRequest { + /** + * + */ user: User; } export interface CreateUsersWithArrayInputRequest { + /** + * + */ user: Array; } export interface CreateUsersWithListInputRequest { + /** + * + */ user: Array; } export interface DeleteUserRequest { + /** + * The name that needs to be deleted + */ username: string; } export interface GetUserByNameRequest { + /** + * The name that needs to be fetched. Use user1 for testing. + */ username: string; } export interface LoginUserRequest { + /** + * The user name for login + */ username: string; + /** + * The password for login in clear text + */ password: string; } export interface UpdateUserRequest { + /** + * name that need to be deleted + */ username: string; + /** + * + */ user: User; } diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/PetApi.ts index 4aef89fdd1e6..dd68a19f9f3b 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/PetApi.ts @@ -25,39 +25,78 @@ import { } from '../models/Pet'; export interface AddPetRequest { + /** + * + */ body: Pet; } export interface DeletePetRequest { + /** + * Pet id to delete + */ petId: number; + /** + * + */ apiKey?: string; } export interface FindPetsByStatusRequest { + /** + * Status values that need to be considered for filter + */ status: Array; } export interface FindPetsByTagsRequest { + /** + * Tags to filter by + */ tags: Array; } export interface GetPetByIdRequest { + /** + * ID of pet to return + */ petId: number; } export interface UpdatePetRequest { + /** + * + */ body: Pet; } export interface UpdatePetWithFormRequest { + /** + * ID of pet that needs to be updated + */ petId: number; + /** + * Updated name of the pet + */ name?: string; + /** + * Updated status of the pet + */ status?: string; } export interface UploadFileRequest { + /** + * ID of pet to update + */ petId: number; + /** + * Additional data to pass to server + */ additionalMetadata?: string; + /** + * file to upload + */ file?: Blob; } diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/StoreApi.ts index f46a13128413..c38e5f11bb74 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/StoreApi.ts @@ -20,14 +20,23 @@ import { } from '../models/Order'; export interface DeleteOrderRequest { + /** + * ID of the order that needs to be deleted + */ orderId: string; } export interface GetOrderByIdRequest { + /** + * ID of pet that needs to be fetched + */ orderId: number; } export interface PlaceOrderRequest { + /** + * + */ body: Order; } diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/UserApi.ts index d22803507e49..ed89e6b4ec62 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/UserApi.ts @@ -20,32 +20,59 @@ import { } from '../models/User'; export interface CreateUserRequest { + /** + * + */ body: User; } export interface CreateUsersWithArrayInputRequest { + /** + * + */ body: Array; } export interface CreateUsersWithListInputRequest { + /** + * + */ body: Array; } export interface DeleteUserRequest { + /** + * The name that needs to be deleted + */ username: string; } export interface GetUserByNameRequest { + /** + * The name that needs to be fetched. Use user1 for testing. + */ username: string; } export interface LoginUserRequest { + /** + * The user name for login + */ username: string; + /** + * The password for login in clear text + */ password: string; } export interface UpdateUserRequest { + /** + * name that need to be deleted + */ username: string; + /** + * + */ body: User; } diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/PetApi.ts index ddf2b4ca52ed..c4dbaa469281 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/PetApi.ts @@ -25,39 +25,78 @@ import { } from '../models/Pet'; export interface AddPetRequest { + /** + * + */ body: Pet; } export interface DeletePetRequest { + /** + * Pet id to delete + */ petId: number; + /** + * + */ apiKey?: string; } export interface FindPetsByStatusRequest { + /** + * Status values that need to be considered for filter + */ status: Array; } export interface FindPetsByTagsRequest { + /** + * Tags to filter by + */ tags: Array; } export interface GetPetByIdRequest { + /** + * ID of pet to return + */ petId: number; } export interface UpdatePetRequest { + /** + * + */ body: Pet; } export interface UpdatePetWithFormRequest { + /** + * ID of pet that needs to be updated + */ petId: number; + /** + * Updated name of the pet + */ name?: string; + /** + * Updated status of the pet + */ status?: string; } export interface UploadFileRequest { + /** + * ID of pet to update + */ petId: number; + /** + * Additional data to pass to server + */ additionalMetadata?: string; + /** + * file to upload + */ file?: Blob; } diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/StoreApi.ts index 03872c75773a..6ca4b778ee7b 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/StoreApi.ts @@ -20,14 +20,23 @@ import { } from '../models/Order'; export interface DeleteOrderRequest { + /** + * ID of the order that needs to be deleted + */ orderId: string; } export interface GetOrderByIdRequest { + /** + * ID of pet that needs to be fetched + */ orderId: number; } export interface PlaceOrderRequest { + /** + * + */ body: Order; } diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/UserApi.ts index 6b6be45400bb..973e383f071b 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/UserApi.ts @@ -20,32 +20,59 @@ import { } from '../models/User'; export interface CreateUserRequest { + /** + * + */ body: User; } export interface CreateUsersWithArrayInputRequest { + /** + * + */ body: Array; } export interface CreateUsersWithListInputRequest { + /** + * + */ body: Array; } export interface DeleteUserRequest { + /** + * The name that needs to be deleted + */ username: string; } export interface GetUserByNameRequest { + /** + * The name that needs to be fetched. Use user1 for testing. + */ username: string; } export interface LoginUserRequest { + /** + * The user name for login + */ username: string; + /** + * The password for login in clear text + */ password: string; } export interface UpdateUserRequest { + /** + * name that need to be deleted + */ username: string; + /** + * + */ body: User; } diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/apis/DefaultApi.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/apis/DefaultApi.ts index a419cba4b8a8..5efd9454bc33 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-string-enums/apis/DefaultApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/apis/DefaultApi.ts @@ -35,24 +35,54 @@ import { } from '../models/StringEnum'; export interface FakeEnumRequestGetInlineRequest { + /** + * + */ stringEnum?: FakeEnumRequestGetInlineStringEnumEnum; + /** + * + */ nullableStringEnum?: FakeEnumRequestGetInlineNullableStringEnumEnum; + /** + * + */ numberEnum?: FakeEnumRequestGetInlineNumberEnumEnum; + /** + * + */ nullableNumberEnum?: FakeEnumRequestGetInlineNullableNumberEnumEnum; } export interface FakeEnumRequestGetRefRequest { + /** + * + */ stringEnum?: StringEnum; + /** + * + */ nullableStringEnum?: StringEnum | null; + /** + * + */ numberEnum?: NumberEnum; + /** + * + */ nullableNumberEnum?: NumberEnum | null; } export interface FakeEnumRequestPostInlineRequest { + /** + * + */ fakeEnumRequestGetInline200Response?: FakeEnumRequestGetInline200Response; } export interface FakeEnumRequestPostRefRequest { + /** + * + */ enumPatternObject?: EnumPatternObject; } diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/PetApi.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/PetApi.ts index cbc154ae42cc..fabc4247a731 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/PetApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/PetApi.ts @@ -19,39 +19,78 @@ import type { } from '../models/index'; export interface AddPetRequest { + /** + * + */ body: Pet; } export interface DeletePetRequest { + /** + * Pet id to delete + */ petId: number; + /** + * + */ apiKey?: string; } export interface FindPetsByStatusRequest { + /** + * Status values that need to be considered for filter + */ status: Array; } export interface FindPetsByTagsRequest { + /** + * Tags to filter by + */ tags: Array; } export interface GetPetByIdRequest { + /** + * ID of pet to return + */ petId: number; } export interface UpdatePetRequest { + /** + * + */ body: Pet; } export interface UpdatePetWithFormRequest { + /** + * ID of pet that needs to be updated + */ petId: number; + /** + * Updated name of the pet + */ name?: string; + /** + * Updated status of the pet + */ status?: string; } export interface UploadFileRequest { + /** + * ID of pet to update + */ petId: number; + /** + * Additional data to pass to server + */ additionalMetadata?: string; + /** + * file to upload + */ file?: Blob; } diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/StoreApi.ts index 420e3de04cfc..957a127aaff8 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/StoreApi.ts @@ -18,14 +18,23 @@ import type { } from '../models/index'; export interface DeleteOrderRequest { + /** + * ID of the order that needs to be deleted + */ orderId: string; } export interface GetOrderByIdRequest { + /** + * ID of pet that needs to be fetched + */ orderId: number; } export interface PlaceOrderRequest { + /** + * + */ body: Order; } diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/UserApi.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/UserApi.ts index 1e919938405d..8b482792e462 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/UserApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/UserApi.ts @@ -18,32 +18,59 @@ import type { } from '../models/index'; export interface CreateUserRequest { + /** + * + */ body: User; } export interface CreateUsersWithArrayInputRequest { + /** + * + */ body: Array; } export interface CreateUsersWithListInputRequest { + /** + * + */ body: Array; } export interface DeleteUserRequest { + /** + * The name that needs to be deleted + */ username: string; } export interface GetUserByNameRequest { + /** + * The name that needs to be fetched. Use user1 for testing. + */ username: string; } export interface LoginUserRequest { + /** + * The user name for login + */ username: string; + /** + * The password for login in clear text + */ password: string; } export interface UpdateUserRequest { + /** + * name that need to be deleted + */ username: string; + /** + * + */ body: User; }