From eca9eec0e2fe5b2e97b9e7df6bf14001b5a6b997 Mon Sep 17 00:00:00 2001 From: fangd1997 <847487277@qq.com> Date: Tue, 4 Aug 2026 00:36:10 +0800 Subject: [PATCH 1/3] fix(typescript-fetch): correct ToJSON/ToJSONTyped type signatures Fix the incorrect parameter and return types in the generated ToJSON and ToJSONTyped functions for typescript-fetch models. - modelGeneric/mustache, modelOneOf.mustache: Fix ToJSON signature from (json: any): Model to (value?: Model | null): any - modelEnum.mustache: Fix ToJSONTyped signature from (value: any, ignoreDiscriminator: boolean): Enum to (value?: Enum | null, ignoreDiscriminator: boolean): any Also make ToJSON delegate to ToJSONTyped instead of a raw cast Fixes #21005 --- .../src/main/resources/typescript-fetch/modelEnum.mustache | 4 ++-- .../src/main/resources/typescript-fetch/modelGeneric.mustache | 4 ++-- .../src/main/resources/typescript-fetch/modelOneOf.mustache | 4 ++-- .../models/StructuredType.ts | 4 ++-- .../infinite-recursion-issue/models/ExtendDto.ts | 4 ++-- .../infinite-recursion-issue/models/TestBaseDto.ts | 4 ++-- .../infinite-recursion-issue/models/TestObjectType.ts | 4 ++-- .../self-import-issue/models/AbstractUserDto.ts | 4 ++-- .../typescript-fetch/self-import-issue/models/BranchDto.ts | 4 ++-- .../self-import-issue/models/InternalAuthenticatedUserDto.ts | 4 ++-- .../self-import-issue/models/RemoteAuthenticatedUserDto.ts | 4 ++-- .../typescript-fetch/builds/allOf-nullable/models/Club.ts | 4 ++-- .../typescript-fetch/builds/allOf-nullable/models/Owner.ts | 4 ++-- .../typescript-fetch/builds/allOf-readonly/models/Club.ts | 4 ++-- .../typescript-fetch/builds/allOf-readonly/models/Owner.ts | 4 ++-- .../builds/default-v3.0/models/AdditionalPropertiesClass.ts | 4 ++-- .../builds/default-v3.0/models/AllOfWithSingleRef.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/Animal.ts | 4 ++-- .../builds/default-v3.0/models/ArrayOfArrayOfNumberOnly.ts | 4 ++-- .../builds/default-v3.0/models/ArrayOfNumberOnly.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/ArrayTest.ts | 4 ++-- .../builds/default-v3.0/models/Capitalization.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/Cat.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/Category.ts | 4 ++-- .../builds/default-v3.0/models/ChildWithNullable.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/ClassModel.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/Client.ts | 4 ++-- .../builds/default-v3.0/models/DeprecatedObject.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/Dog.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/EnumArrays.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/EnumClass.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/EnumTest.ts | 4 ++-- .../default-v3.0/models/FakeBigDecimalMap200Response.ts | 4 ++-- .../builds/default-v3.0/models/FileSchemaTestClass.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/Foo.ts | 4 ++-- .../builds/default-v3.0/models/FooGetDefaultResponse.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/FormatTest.ts | 4 ++-- .../builds/default-v3.0/models/HasOnlyReadOnly.ts | 4 ++-- .../builds/default-v3.0/models/HealthCheckResult.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/List.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/MapTest.ts | 4 ++-- .../models/MixedPropertiesAndAdditionalPropertiesClass.ts | 4 ++-- .../builds/default-v3.0/models/Model200Response.ts | 4 ++-- .../builds/default-v3.0/models/ModelApiResponse.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/ModelFile.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/Name.ts | 4 ++-- .../builds/default-v3.0/models/NullableClass.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/NumberOnly.ts | 4 ++-- .../builds/default-v3.0/models/ObjectWithDeprecatedFields.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/Order.ts | 4 ++-- .../builds/default-v3.0/models/OuterComposite.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/OuterEnum.ts | 4 ++-- .../builds/default-v3.0/models/OuterEnumDefaultValue.ts | 4 ++-- .../builds/default-v3.0/models/OuterEnumInteger.ts | 4 ++-- .../default-v3.0/models/OuterEnumIntegerDefaultValue.ts | 4 ++-- .../builds/default-v3.0/models/OuterObjectWithEnumProperty.ts | 4 ++-- .../builds/default-v3.0/models/ParentWithNullable.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/Pet.ts | 4 ++-- .../builds/default-v3.0/models/ReadOnlyFirst.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/Return.ts | 4 ++-- .../builds/default-v3.0/models/SingleRefType.ts | 4 ++-- .../builds/default-v3.0/models/SpecialModelName.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/Tag.ts | 4 ++-- .../models/TestInlineFreeformAdditionalPropertiesRequest.ts | 4 ++-- .../typescript-fetch/builds/default-v3.0/models/User.ts | 4 ++-- .../typescript-fetch/builds/default/models/Category.ts | 4 ++-- .../builds/default/models/ModelApiResponse.ts | 4 ++-- .../petstore/typescript-fetch/builds/default/models/Order.ts | 4 ++-- .../petstore/typescript-fetch/builds/default/models/Pet.ts | 4 ++-- .../petstore/typescript-fetch/builds/default/models/Tag.ts | 4 ++-- .../petstore/typescript-fetch/builds/default/models/User.ts | 4 ++-- .../typescript-fetch/builds/enum/models/EnumPatternObject.ts | 4 ++-- .../builds/enum/models/FakeEnumRequestGetInline200Response.ts | 4 ++-- .../typescript-fetch/builds/enum/models/NumberEnum.ts | 4 ++-- .../typescript-fetch/builds/enum/models/StringEnum.ts | 4 ++-- .../typescript-fetch/builds/es6-target/src/models/Category.ts | 4 ++-- .../builds/es6-target/src/models/ModelApiResponse.ts | 4 ++-- .../typescript-fetch/builds/es6-target/src/models/Order.ts | 4 ++-- .../typescript-fetch/builds/es6-target/src/models/Pet.ts | 4 ++-- .../typescript-fetch/builds/es6-target/src/models/Tag.ts | 4 ++-- .../typescript-fetch/builds/es6-target/src/models/User.ts | 4 ++-- .../builds/kebab-case/models/additional-properties-class.ts | 4 ++-- .../builds/kebab-case/models/all-of-with-single-ref.ts | 4 ++-- .../typescript-fetch/builds/kebab-case/models/animal.ts | 4 ++-- .../builds/kebab-case/models/array-of-array-of-number-only.ts | 4 ++-- .../builds/kebab-case/models/array-of-number-only.ts | 4 ++-- .../typescript-fetch/builds/kebab-case/models/array-test.ts | 4 ++-- .../builds/kebab-case/models/capitalization.ts | 4 ++-- .../petstore/typescript-fetch/builds/kebab-case/models/cat.ts | 4 ++-- .../typescript-fetch/builds/kebab-case/models/category.ts | 4 ++-- .../builds/kebab-case/models/child-with-nullable.ts | 4 ++-- .../typescript-fetch/builds/kebab-case/models/class-model.ts | 4 ++-- .../typescript-fetch/builds/kebab-case/models/client.ts | 4 ++-- .../builds/kebab-case/models/deprecated-object.ts | 4 ++-- .../petstore/typescript-fetch/builds/kebab-case/models/dog.ts | 4 ++-- .../typescript-fetch/builds/kebab-case/models/enum-arrays.ts | 4 ++-- .../typescript-fetch/builds/kebab-case/models/enum-class.ts | 4 ++-- .../typescript-fetch/builds/kebab-case/models/enum-test.ts | 4 ++-- .../kebab-case/models/fake-big-decimal-map200-response.ts | 4 ++-- .../builds/kebab-case/models/file-schema-test-class.ts | 4 ++-- .../builds/kebab-case/models/foo-get-default-response.ts | 4 ++-- .../petstore/typescript-fetch/builds/kebab-case/models/foo.ts | 4 ++-- .../typescript-fetch/builds/kebab-case/models/format-test.ts | 4 ++-- .../builds/kebab-case/models/has-only-read-only.ts | 4 ++-- .../builds/kebab-case/models/health-check-result.ts | 4 ++-- .../typescript-fetch/builds/kebab-case/models/list.ts | 4 ++-- .../typescript-fetch/builds/kebab-case/models/map-test.ts | 4 ++-- .../mixed-properties-and-additional-properties-class.ts | 4 ++-- .../builds/kebab-case/models/model-api-response.ts | 4 ++-- .../typescript-fetch/builds/kebab-case/models/model-file.ts | 4 ++-- .../builds/kebab-case/models/model200-response.ts | 4 ++-- .../typescript-fetch/builds/kebab-case/models/name.ts | 4 ++-- .../builds/kebab-case/models/nullable-class.ts | 4 ++-- .../typescript-fetch/builds/kebab-case/models/number-only.ts | 4 ++-- .../builds/kebab-case/models/object-with-deprecated-fields.ts | 4 ++-- .../typescript-fetch/builds/kebab-case/models/order.ts | 4 ++-- .../builds/kebab-case/models/outer-composite.ts | 4 ++-- .../builds/kebab-case/models/outer-enum-default-value.ts | 4 ++-- .../kebab-case/models/outer-enum-integer-default-value.ts | 4 ++-- .../builds/kebab-case/models/outer-enum-integer.ts | 4 ++-- .../typescript-fetch/builds/kebab-case/models/outer-enum.ts | 4 ++-- .../kebab-case/models/outer-object-with-enum-property.ts | 4 ++-- .../builds/kebab-case/models/parent-with-nullable.ts | 4 ++-- .../petstore/typescript-fetch/builds/kebab-case/models/pet.ts | 4 ++-- .../builds/kebab-case/models/read-only-first.ts | 4 ++-- .../typescript-fetch/builds/kebab-case/models/return.ts | 4 ++-- .../builds/kebab-case/models/single-ref-type.ts | 4 ++-- .../builds/kebab-case/models/special-model-name.ts | 4 ++-- .../petstore/typescript-fetch/builds/kebab-case/models/tag.ts | 4 ++-- .../test-inline-freeform-additional-properties-request.ts | 4 ++-- .../typescript-fetch/builds/kebab-case/models/user.ts | 4 ++-- .../builds/multiple-parameters/models/Category.ts | 4 ++-- .../builds/multiple-parameters/models/ModelApiResponse.ts | 4 ++-- .../builds/multiple-parameters/models/Order.ts | 4 ++-- .../typescript-fetch/builds/multiple-parameters/models/Pet.ts | 4 ++-- .../typescript-fetch/builds/multiple-parameters/models/Tag.ts | 4 ++-- .../builds/multiple-parameters/models/User.ts | 4 ++-- .../typescript-fetch/builds/oneOf/models/DashedOptionOne.ts | 4 ++-- .../typescript-fetch/builds/oneOf/models/DashedOptionTwo.ts | 4 ++-- .../builds/oneOf/models/NumericSingletonEnumModel.ts | 4 ++-- .../typescript-fetch/builds/oneOf/models/OptionOne.ts | 4 ++-- .../typescript-fetch/builds/oneOf/models/OptionTwo.ts | 4 ++-- .../typescript-fetch/builds/oneOf/models/SnakeOptionOne.ts | 4 ++-- .../typescript-fetch/builds/oneOf/models/SnakeOptionTwo.ts | 4 ++-- .../petstore/typescript-fetch/builds/oneOf/models/TestA.ts | 4 ++-- .../typescript-fetch/builds/oneOf/models/TestArrayResponse.ts | 4 ++-- .../petstore/typescript-fetch/builds/oneOf/models/TestB.ts | 4 ++-- .../builds/oneOf/models/TestDashedDiscriminatorResponse.ts | 4 ++-- .../builds/oneOf/models/TestDiscriminatorResponse.ts | 4 ++-- .../typescript-fetch/builds/oneOf/models/TestResponse.ts | 4 ++-- .../builds/oneOf/models/TestSnakeCaseDiscriminatorResponse.ts | 4 ++-- .../builds/prefix-parameter-interfaces/src/models/Category.ts | 4 ++-- .../src/models/ModelApiResponse.ts | 4 ++-- .../builds/prefix-parameter-interfaces/src/models/Order.ts | 4 ++-- .../builds/prefix-parameter-interfaces/src/models/Pet.ts | 4 ++-- .../builds/prefix-parameter-interfaces/src/models/Tag.ts | 4 ++-- .../builds/prefix-parameter-interfaces/src/models/User.ts | 4 ++-- .../builds/sagas-and-records/src/models/BehaviorType.ts | 4 ++-- .../builds/sagas-and-records/src/models/Category.ts | 4 ++-- .../sagas-and-records/src/models/DefaultMetaOnlyResponse.ts | 4 ++-- .../sagas-and-records/src/models/DeploymentRequestStatus.ts | 4 ++-- .../builds/sagas-and-records/src/models/ErrorCode.ts | 4 ++-- .../sagas-and-records/src/models/FindPetsByStatusResponse.ts | 4 ++-- .../sagas-and-records/src/models/FindPetsByUserResponse.ts | 4 ++-- .../src/models/GetBehaviorPermissionsResponse.ts | 4 ++-- .../sagas-and-records/src/models/GetBehaviorTypeResponse.ts | 4 ++-- .../sagas-and-records/src/models/GetMatchingPartsResponse.ts | 4 ++-- .../sagas-and-records/src/models/GetPetPartTypeResponse.ts | 4 ++-- .../builds/sagas-and-records/src/models/ItemId.ts | 4 ++-- .../builds/sagas-and-records/src/models/MatchingParts.ts | 4 ++-- .../builds/sagas-and-records/src/models/ModelApiResponse.ts | 4 ++-- .../builds/sagas-and-records/src/models/ModelError.ts | 4 ++-- .../builds/sagas-and-records/src/models/Order.ts | 4 ++-- .../builds/sagas-and-records/src/models/Part.ts | 4 ++-- .../builds/sagas-and-records/src/models/Pet.ts | 4 ++-- .../builds/sagas-and-records/src/models/PetPartType.ts | 4 ++-- .../builds/sagas-and-records/src/models/PetRegionsResponse.ts | 4 ++-- .../builds/sagas-and-records/src/models/ResponseMeta.ts | 4 ++-- .../builds/sagas-and-records/src/models/Tag.ts | 4 ++-- .../builds/sagas-and-records/src/models/User.ts | 4 ++-- .../builds/sagas-and-records/src/models/WarningCode.ts | 4 ++-- .../models/AdditionalPropertiesClass.ts | 4 ++-- .../snakecase-discriminator/models/AllOfWithSingleRef.ts | 4 ++-- .../builds/snakecase-discriminator/models/Animal.ts | 4 ++-- .../models/ArrayOfArrayOfNumberOnly.ts | 4 ++-- .../snakecase-discriminator/models/ArrayOfNumberOnly.ts | 4 ++-- .../builds/snakecase-discriminator/models/ArrayTest.ts | 4 ++-- .../builds/snakecase-discriminator/models/Capitalization.ts | 4 ++-- .../builds/snakecase-discriminator/models/Cat.ts | 4 ++-- .../builds/snakecase-discriminator/models/Category.ts | 4 ++-- .../builds/snakecase-discriminator/models/ClassModel.ts | 4 ++-- .../builds/snakecase-discriminator/models/Client.ts | 4 ++-- .../builds/snakecase-discriminator/models/DeprecatedObject.ts | 4 ++-- .../builds/snakecase-discriminator/models/Dog.ts | 4 ++-- .../builds/snakecase-discriminator/models/EnumArrays.ts | 4 ++-- .../builds/snakecase-discriminator/models/EnumClass.ts | 4 ++-- .../builds/snakecase-discriminator/models/EnumTest.ts | 4 ++-- .../models/FakeBigDecimalMap200Response.ts | 4 ++-- .../snakecase-discriminator/models/FileSchemaTestClass.ts | 4 ++-- .../builds/snakecase-discriminator/models/Foo.ts | 4 ++-- .../snakecase-discriminator/models/FooGetDefaultResponse.ts | 4 ++-- .../builds/snakecase-discriminator/models/FormatTest.ts | 4 ++-- .../builds/snakecase-discriminator/models/HasOnlyReadOnly.ts | 4 ++-- .../snakecase-discriminator/models/HealthCheckResult.ts | 4 ++-- .../builds/snakecase-discriminator/models/List.ts | 4 ++-- .../builds/snakecase-discriminator/models/MapTest.ts | 4 ++-- .../models/MixedPropertiesAndAdditionalPropertiesClass.ts | 4 ++-- .../builds/snakecase-discriminator/models/Model200Response.ts | 4 ++-- .../builds/snakecase-discriminator/models/ModelApiResponse.ts | 4 ++-- .../builds/snakecase-discriminator/models/ModelFile.ts | 4 ++-- .../builds/snakecase-discriminator/models/Name.ts | 4 ++-- .../builds/snakecase-discriminator/models/NullableClass.ts | 4 ++-- .../builds/snakecase-discriminator/models/NumberOnly.ts | 4 ++-- .../models/ObjectWithDeprecatedFields.ts | 4 ++-- .../builds/snakecase-discriminator/models/Order.ts | 4 ++-- .../builds/snakecase-discriminator/models/OuterComposite.ts | 4 ++-- .../builds/snakecase-discriminator/models/OuterEnum.ts | 4 ++-- .../snakecase-discriminator/models/OuterEnumDefaultValue.ts | 4 ++-- .../builds/snakecase-discriminator/models/OuterEnumInteger.ts | 4 ++-- .../models/OuterEnumIntegerDefaultValue.ts | 4 ++-- .../models/OuterObjectWithEnumProperty.ts | 4 ++-- .../builds/snakecase-discriminator/models/Pet.ts | 4 ++-- .../builds/snakecase-discriminator/models/ReadOnlyFirst.ts | 4 ++-- .../builds/snakecase-discriminator/models/Return.ts | 4 ++-- .../builds/snakecase-discriminator/models/SingleRefType.ts | 4 ++-- .../builds/snakecase-discriminator/models/SpecialModelName.ts | 4 ++-- .../builds/snakecase-discriminator/models/Tag.ts | 4 ++-- .../builds/snakecase-discriminator/models/User.ts | 4 ++-- .../builds/validation-attributes/models/Category.ts | 4 ++-- .../builds/validation-attributes/models/ModelApiResponse.ts | 4 ++-- .../builds/validation-attributes/models/Order.ts | 4 ++-- .../builds/validation-attributes/models/Pet.ts | 4 ++-- .../builds/validation-attributes/models/Tag.ts | 4 ++-- .../builds/validation-attributes/models/User.ts | 4 ++-- .../builds/with-interfaces/models/Category.ts | 4 ++-- .../builds/with-interfaces/models/ModelApiResponse.ts | 4 ++-- .../typescript-fetch/builds/with-interfaces/models/Order.ts | 4 ++-- .../typescript-fetch/builds/with-interfaces/models/Pet.ts | 4 ++-- .../typescript-fetch/builds/with-interfaces/models/Tag.ts | 4 ++-- .../typescript-fetch/builds/with-interfaces/models/User.ts | 4 ++-- .../builds/with-npm-version/src/models/Category.ts | 4 ++-- .../builds/with-npm-version/src/models/ModelApiResponse.ts | 4 ++-- .../builds/with-npm-version/src/models/Order.ts | 4 ++-- .../builds/with-npm-version/src/models/Pet.ts | 4 ++-- .../builds/with-npm-version/src/models/Tag.ts | 4 ++-- .../builds/with-npm-version/src/models/User.ts | 4 ++-- .../builds/with-string-enums/models/EnumPatternObject.ts | 4 ++-- .../models/FakeEnumRequestGetInline200Response.ts | 4 ++-- .../builds/with-string-enums/models/NumberEnum.ts | 4 ++-- .../builds/with-string-enums/models/StringEnum.ts | 4 ++-- 250 files changed, 500 insertions(+), 500 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/modelEnum.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/modelEnum.mustache index 35e0303d986a..507d89f2b34e 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/modelEnum.mustache @@ -20,9 +20,9 @@ export function {{classname}}FromJSONTyped(json: any, ignoreDiscriminator: boole } export function {{classname}}ToJSON(value?: {{classname}} | null): any { - return value as any; + return {{classname}}ToJSONTyped(value, false); } -export function {{classname}}ToJSONTyped(value: any, ignoreDiscriminator: boolean): {{classname}} { +export function {{classname}}ToJSONTyped(value?: {{classname}} | null, ignoreDiscriminator: boolean): any { return value as {{classname}}; } diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache index 5f4c379724b1..117331eb3cd4 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache @@ -141,8 +141,8 @@ export function {{classname}}FromJSONTyped(json: any, ignoreDiscriminator: boole {{/hasVars}} } -export function {{classname}}ToJSON(json: any): {{classname}} { - return {{classname}}ToJSONTyped(json, false); +export function {{classname}}ToJSON(value?: {{classname}} | null): any { + return {{classname}}ToJSONTyped(value, false); } export function {{classname}}ToJSONTyped(value?: {{#hasReadOnly}}Omit<{{classname}}, {{#readOnlyVars}}'{{name}}'{{^-last}}|{{/-last}}{{/readOnlyVars}}>{{/hasReadOnly}}{{^hasReadOnly}}{{classname}}{{/hasReadOnly}} | null, ignoreDiscriminator: boolean = false): any { diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/modelOneOf.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/modelOneOf.mustache index 7017451090f8..5811f0c6d072 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/modelOneOf.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/modelOneOf.mustache @@ -147,8 +147,8 @@ export function {{classname}}FromJSONTyped(json: any, ignoreDiscriminator: boole {{/discriminator}} } -export function {{classname}}ToJSON(json: any): any { - return {{classname}}ToJSONTyped(json, false); +export function {{classname}}ToJSON(value?: {{classname}} | null): any { + return {{classname}}ToJSONTyped(value, false); } export function {{classname}}ToJSONTyped(value?: {{classname}} | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/others/typescript-fetch/additional-properties-in-multipart-issue/models/StructuredType.ts b/samples/client/others/typescript-fetch/additional-properties-in-multipart-issue/models/StructuredType.ts index 94b6f81cb4f8..3f19326519c6 100644 --- a/samples/client/others/typescript-fetch/additional-properties-in-multipart-issue/models/StructuredType.ts +++ b/samples/client/others/typescript-fetch/additional-properties-in-multipart-issue/models/StructuredType.ts @@ -46,8 +46,8 @@ export function StructuredTypeFromJSONTyped(json: any, ignoreDiscriminator: bool }; } -export function StructuredTypeToJSON(json: any): StructuredType { - return StructuredTypeToJSONTyped(json, false); +export function StructuredTypeToJSON(value?: StructuredType | null): any { + return StructuredTypeToJSONTyped(value, false); } export function StructuredTypeToJSONTyped(value?: StructuredType | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/others/typescript-fetch/infinite-recursion-issue/models/ExtendDto.ts b/samples/client/others/typescript-fetch/infinite-recursion-issue/models/ExtendDto.ts index bb02cb69bb26..24affbdb216a 100644 --- a/samples/client/others/typescript-fetch/infinite-recursion-issue/models/ExtendDto.ts +++ b/samples/client/others/typescript-fetch/infinite-recursion-issue/models/ExtendDto.ts @@ -63,8 +63,8 @@ export function ExtendDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function ExtendDtoToJSON(json: any): ExtendDto { - return ExtendDtoToJSONTyped(json, false); +export function ExtendDtoToJSON(value?: ExtendDto | null): any { + return ExtendDtoToJSONTyped(value, false); } export function ExtendDtoToJSONTyped(value?: ExtendDto | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/others/typescript-fetch/infinite-recursion-issue/models/TestBaseDto.ts b/samples/client/others/typescript-fetch/infinite-recursion-issue/models/TestBaseDto.ts index e2db40b1d1fb..ff527737af67 100644 --- a/samples/client/others/typescript-fetch/infinite-recursion-issue/models/TestBaseDto.ts +++ b/samples/client/others/typescript-fetch/infinite-recursion-issue/models/TestBaseDto.ts @@ -71,8 +71,8 @@ export function TestBaseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean }; } -export function TestBaseDtoToJSON(json: any): TestBaseDto { - return TestBaseDtoToJSONTyped(json, false); +export function TestBaseDtoToJSON(value?: TestBaseDto | null): any { + return TestBaseDtoToJSONTyped(value, false); } export function TestBaseDtoToJSONTyped(value?: TestBaseDto | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/others/typescript-fetch/infinite-recursion-issue/models/TestObjectType.ts b/samples/client/others/typescript-fetch/infinite-recursion-issue/models/TestObjectType.ts index f3fc7cdfe944..8d51169a9aba 100644 --- a/samples/client/others/typescript-fetch/infinite-recursion-issue/models/TestObjectType.ts +++ b/samples/client/others/typescript-fetch/infinite-recursion-issue/models/TestObjectType.ts @@ -45,10 +45,10 @@ export function TestObjectTypeFromJSONTyped(json: any, ignoreDiscriminator: bool } export function TestObjectTypeToJSON(value?: TestObjectType | null): any { - return value as any; + return TestObjectTypeToJSONTyped(value, false); } -export function TestObjectTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): TestObjectType { +export function TestObjectTypeToJSONTyped(value?: TestObjectType | null, ignoreDiscriminator: boolean): any { return value as TestObjectType; } diff --git a/samples/client/others/typescript-fetch/self-import-issue/models/AbstractUserDto.ts b/samples/client/others/typescript-fetch/self-import-issue/models/AbstractUserDto.ts index 23066259cb7f..89f4e90ef36c 100644 --- a/samples/client/others/typescript-fetch/self-import-issue/models/AbstractUserDto.ts +++ b/samples/client/others/typescript-fetch/self-import-issue/models/AbstractUserDto.ts @@ -75,8 +75,8 @@ export function AbstractUserDtoFromJSONTyped(json: any, ignoreDiscriminator: boo }; } -export function AbstractUserDtoToJSON(json: any): AbstractUserDto { - return AbstractUserDtoToJSONTyped(json, false); +export function AbstractUserDtoToJSON(value?: AbstractUserDto | null): any { + return AbstractUserDtoToJSONTyped(value, false); } export function AbstractUserDtoToJSONTyped(value?: AbstractUserDto | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/others/typescript-fetch/self-import-issue/models/BranchDto.ts b/samples/client/others/typescript-fetch/self-import-issue/models/BranchDto.ts index 4d13f44c2bc1..400162d902ca 100644 --- a/samples/client/others/typescript-fetch/self-import-issue/models/BranchDto.ts +++ b/samples/client/others/typescript-fetch/self-import-issue/models/BranchDto.ts @@ -46,8 +46,8 @@ export function BranchDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function BranchDtoToJSON(json: any): BranchDto { - return BranchDtoToJSONTyped(json, false); +export function BranchDtoToJSON(value?: BranchDto | null): any { + return BranchDtoToJSONTyped(value, false); } export function BranchDtoToJSONTyped(value?: BranchDto | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/others/typescript-fetch/self-import-issue/models/InternalAuthenticatedUserDto.ts b/samples/client/others/typescript-fetch/self-import-issue/models/InternalAuthenticatedUserDto.ts index 7a8e69f01231..6758fd5feb10 100644 --- a/samples/client/others/typescript-fetch/self-import-issue/models/InternalAuthenticatedUserDto.ts +++ b/samples/client/others/typescript-fetch/self-import-issue/models/InternalAuthenticatedUserDto.ts @@ -51,8 +51,8 @@ export function InternalAuthenticatedUserDtoFromJSONTyped(json: any, ignoreDiscr return json; } -export function InternalAuthenticatedUserDtoToJSON(json: any): InternalAuthenticatedUserDto { - return InternalAuthenticatedUserDtoToJSONTyped(json, false); +export function InternalAuthenticatedUserDtoToJSON(value?: InternalAuthenticatedUserDto | null): any { + return InternalAuthenticatedUserDtoToJSONTyped(value, false); } export function InternalAuthenticatedUserDtoToJSONTyped(value?: InternalAuthenticatedUserDto | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/others/typescript-fetch/self-import-issue/models/RemoteAuthenticatedUserDto.ts b/samples/client/others/typescript-fetch/self-import-issue/models/RemoteAuthenticatedUserDto.ts index 4fb8c1916e9d..fe4e07638796 100644 --- a/samples/client/others/typescript-fetch/self-import-issue/models/RemoteAuthenticatedUserDto.ts +++ b/samples/client/others/typescript-fetch/self-import-issue/models/RemoteAuthenticatedUserDto.ts @@ -51,8 +51,8 @@ export function RemoteAuthenticatedUserDtoFromJSONTyped(json: any, ignoreDiscrim return json; } -export function RemoteAuthenticatedUserDtoToJSON(json: any): RemoteAuthenticatedUserDto { - return RemoteAuthenticatedUserDtoToJSONTyped(json, false); +export function RemoteAuthenticatedUserDtoToJSON(value?: RemoteAuthenticatedUserDto | null): any { + return RemoteAuthenticatedUserDtoToJSONTyped(value, false); } export function RemoteAuthenticatedUserDtoToJSONTyped(value?: RemoteAuthenticatedUserDto | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/allOf-nullable/models/Club.ts b/samples/client/petstore/typescript-fetch/builds/allOf-nullable/models/Club.ts index 579fd800b866..5a36287f9ebe 100644 --- a/samples/client/petstore/typescript-fetch/builds/allOf-nullable/models/Club.ts +++ b/samples/client/petstore/typescript-fetch/builds/allOf-nullable/models/Club.ts @@ -54,8 +54,8 @@ export function ClubFromJSONTyped(json: any, ignoreDiscriminator: boolean): Club }; } -export function ClubToJSON(json: any): Club { - return ClubToJSONTyped(json, false); +export function ClubToJSON(value?: Club | null): any { + return ClubToJSONTyped(value, false); } export function ClubToJSONTyped(value?: Club | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/allOf-nullable/models/Owner.ts b/samples/client/petstore/typescript-fetch/builds/allOf-nullable/models/Owner.ts index 941eecf56afd..a921f05aa277 100644 --- a/samples/client/petstore/typescript-fetch/builds/allOf-nullable/models/Owner.ts +++ b/samples/client/petstore/typescript-fetch/builds/allOf-nullable/models/Owner.ts @@ -46,8 +46,8 @@ export function OwnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): Own }; } -export function OwnerToJSON(json: any): Owner { - return OwnerToJSONTyped(json, false); +export function OwnerToJSON(value?: Owner | null): any { + return OwnerToJSONTyped(value, false); } export function OwnerToJSONTyped(value?: Owner | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/allOf-readonly/models/Club.ts b/samples/client/petstore/typescript-fetch/builds/allOf-readonly/models/Club.ts index c1b72486407c..ba329ca1a8ab 100644 --- a/samples/client/petstore/typescript-fetch/builds/allOf-readonly/models/Club.ts +++ b/samples/client/petstore/typescript-fetch/builds/allOf-readonly/models/Club.ts @@ -54,8 +54,8 @@ export function ClubFromJSONTyped(json: any, ignoreDiscriminator: boolean): Club }; } -export function ClubToJSON(json: any): Club { - return ClubToJSONTyped(json, false); +export function ClubToJSON(value?: Club | null): any { + return ClubToJSONTyped(value, false); } export function ClubToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/allOf-readonly/models/Owner.ts b/samples/client/petstore/typescript-fetch/builds/allOf-readonly/models/Owner.ts index 941eecf56afd..a921f05aa277 100644 --- a/samples/client/petstore/typescript-fetch/builds/allOf-readonly/models/Owner.ts +++ b/samples/client/petstore/typescript-fetch/builds/allOf-readonly/models/Owner.ts @@ -46,8 +46,8 @@ export function OwnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): Own }; } -export function OwnerToJSON(json: any): Owner { - return OwnerToJSONTyped(json, false); +export function OwnerToJSON(value?: Owner | null): any { + return OwnerToJSONTyped(value, false); } export function OwnerToJSONTyped(value?: Owner | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/AdditionalPropertiesClass.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/AdditionalPropertiesClass.ts index 1db920000504..19da6d22c1d6 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/AdditionalPropertiesClass.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/AdditionalPropertiesClass.ts @@ -51,8 +51,8 @@ export function AdditionalPropertiesClassFromJSONTyped(json: any, ignoreDiscrimi }; } -export function AdditionalPropertiesClassToJSON(json: any): AdditionalPropertiesClass { - return AdditionalPropertiesClassToJSONTyped(json, false); +export function AdditionalPropertiesClassToJSON(value?: AdditionalPropertiesClass | null): any { + return AdditionalPropertiesClassToJSONTyped(value, false); } export function AdditionalPropertiesClassToJSONTyped(value?: AdditionalPropertiesClass | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/AllOfWithSingleRef.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/AllOfWithSingleRef.ts index 743b9141a1af..d85fd493ea77 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/AllOfWithSingleRef.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/AllOfWithSingleRef.ts @@ -61,8 +61,8 @@ export function AllOfWithSingleRefFromJSONTyped(json: any, ignoreDiscriminator: }; } -export function AllOfWithSingleRefToJSON(json: any): AllOfWithSingleRef { - return AllOfWithSingleRefToJSONTyped(json, false); +export function AllOfWithSingleRefToJSON(value?: AllOfWithSingleRef | null): any { + return AllOfWithSingleRefToJSONTyped(value, false); } export function AllOfWithSingleRefToJSONTyped(value?: AllOfWithSingleRef | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Animal.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Animal.ts index 2a8b126041f7..f2d93d87bc5a 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Animal.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Animal.ts @@ -63,8 +63,8 @@ export function AnimalFromJSONTyped(json: any, ignoreDiscriminator: boolean): An }; } -export function AnimalToJSON(json: any): Animal { - return AnimalToJSONTyped(json, false); +export function AnimalToJSON(value?: Animal | null): any { + return AnimalToJSONTyped(value, false); } export function AnimalToJSONTyped(value?: Animal | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayOfArrayOfNumberOnly.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayOfArrayOfNumberOnly.ts index bce79e8d3b63..9a12b6b11247 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayOfArrayOfNumberOnly.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayOfArrayOfNumberOnly.ts @@ -46,8 +46,8 @@ export function ArrayOfArrayOfNumberOnlyFromJSONTyped(json: any, ignoreDiscrimin }; } -export function ArrayOfArrayOfNumberOnlyToJSON(json: any): ArrayOfArrayOfNumberOnly { - return ArrayOfArrayOfNumberOnlyToJSONTyped(json, false); +export function ArrayOfArrayOfNumberOnlyToJSON(value?: ArrayOfArrayOfNumberOnly | null): any { + return ArrayOfArrayOfNumberOnlyToJSONTyped(value, false); } export function ArrayOfArrayOfNumberOnlyToJSONTyped(value?: ArrayOfArrayOfNumberOnly | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayOfNumberOnly.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayOfNumberOnly.ts index 8640a0d74aa5..cd015cb0f705 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayOfNumberOnly.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayOfNumberOnly.ts @@ -46,8 +46,8 @@ export function ArrayOfNumberOnlyFromJSONTyped(json: any, ignoreDiscriminator: b }; } -export function ArrayOfNumberOnlyToJSON(json: any): ArrayOfNumberOnly { - return ArrayOfNumberOnlyToJSONTyped(json, false); +export function ArrayOfNumberOnlyToJSON(value?: ArrayOfNumberOnly | null): any { + return ArrayOfNumberOnlyToJSONTyped(value, false); } export function ArrayOfNumberOnlyToJSONTyped(value?: ArrayOfNumberOnly | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayTest.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayTest.ts index 002052b417d3..3667da3dd23c 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayTest.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayTest.ts @@ -64,8 +64,8 @@ export function ArrayTestFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function ArrayTestToJSON(json: any): ArrayTest { - return ArrayTestToJSONTyped(json, false); +export function ArrayTestToJSON(value?: ArrayTest | null): any { + return ArrayTestToJSONTyped(value, false); } export function ArrayTestToJSONTyped(value?: ArrayTest | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Capitalization.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Capitalization.ts index de75ac5926d6..2d3e2b74cae6 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Capitalization.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Capitalization.ts @@ -72,8 +72,8 @@ export function CapitalizationFromJSONTyped(json: any, ignoreDiscriminator: bool }; } -export function CapitalizationToJSON(json: any): Capitalization { - return CapitalizationToJSONTyped(json, false); +export function CapitalizationToJSON(value?: Capitalization | null): any { + return CapitalizationToJSONTyped(value, false); } export function CapitalizationToJSONTyped(value?: Capitalization | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Cat.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Cat.ts index 33efae9ddcf9..53498d199a09 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Cat.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Cat.ts @@ -54,8 +54,8 @@ export function CatFromJSONTyped(json: any, ignoreDiscriminator: boolean): Cat { }; } -export function CatToJSON(json: any): Cat { - return CatToJSONTyped(json, false); +export function CatToJSON(value?: Cat | null): any { + return CatToJSONTyped(value, false); } export function CatToJSONTyped(value?: Cat | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Category.ts index 04cd593f2dce..23c61531dc15 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Category.ts @@ -52,8 +52,8 @@ export function CategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function CategoryToJSON(json: any): Category { - return CategoryToJSONTyped(json, false); +export function CategoryToJSON(value?: Category | null): any { + return CategoryToJSONTyped(value, false); } export function CategoryToJSONTyped(value?: Category | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ChildWithNullable.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ChildWithNullable.ts index aa6dc996a500..a058da79e83d 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ChildWithNullable.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ChildWithNullable.ts @@ -56,8 +56,8 @@ export function ChildWithNullableFromJSONTyped(json: any, ignoreDiscriminator: b }; } -export function ChildWithNullableToJSON(json: any): ChildWithNullable { - return ChildWithNullableToJSONTyped(json, false); +export function ChildWithNullableToJSON(value?: ChildWithNullable | null): any { + return ChildWithNullableToJSONTyped(value, false); } export function ChildWithNullableToJSONTyped(value?: ChildWithNullable | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ClassModel.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ClassModel.ts index cef4c58640ce..74e4c38e231f 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ClassModel.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ClassModel.ts @@ -46,8 +46,8 @@ export function ClassModelFromJSONTyped(json: any, ignoreDiscriminator: boolean) }; } -export function ClassModelToJSON(json: any): ClassModel { - return ClassModelToJSONTyped(json, false); +export function ClassModelToJSON(value?: ClassModel | null): any { + return ClassModelToJSONTyped(value, false); } export function ClassModelToJSONTyped(value?: ClassModel | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Client.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Client.ts index 7f353720b90d..31e75cc33894 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Client.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Client.ts @@ -46,8 +46,8 @@ export function ClientFromJSONTyped(json: any, ignoreDiscriminator: boolean): Cl }; } -export function ClientToJSON(json: any): Client { - return ClientToJSONTyped(json, false); +export function ClientToJSON(value?: Client | null): any { + return ClientToJSONTyped(value, false); } export function ClientToJSONTyped(value?: Client | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/DeprecatedObject.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/DeprecatedObject.ts index 14623160e258..85b6a332d0d4 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/DeprecatedObject.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/DeprecatedObject.ts @@ -46,8 +46,8 @@ export function DeprecatedObjectFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function DeprecatedObjectToJSON(json: any): DeprecatedObject { - return DeprecatedObjectToJSONTyped(json, false); +export function DeprecatedObjectToJSON(value?: DeprecatedObject | null): any { + return DeprecatedObjectToJSONTyped(value, false); } export function DeprecatedObjectToJSONTyped(value?: DeprecatedObject | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Dog.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Dog.ts index 967f5cf772f2..76718733e13d 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Dog.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Dog.ts @@ -54,8 +54,8 @@ export function DogFromJSONTyped(json: any, ignoreDiscriminator: boolean): Dog { }; } -export function DogToJSON(json: any): Dog { - return DogToJSONTyped(json, false); +export function DogToJSON(value?: Dog | null): any { + return DogToJSONTyped(value, false); } export function DogToJSONTyped(value?: Dog | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumArrays.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumArrays.ts index 84cd87dd1408..5bdb73afb842 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumArrays.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumArrays.ts @@ -71,8 +71,8 @@ export function EnumArraysFromJSONTyped(json: any, ignoreDiscriminator: boolean) }; } -export function EnumArraysToJSON(json: any): EnumArrays { - return EnumArraysToJSONTyped(json, false); +export function EnumArraysToJSON(value?: EnumArrays | null): any { + return EnumArraysToJSONTyped(value, false); } export function EnumArraysToJSONTyped(value?: EnumArrays | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumClass.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumClass.ts index 6878b8591431..273d379ae560 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumClass.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumClass.ts @@ -45,10 +45,10 @@ export function EnumClassFromJSONTyped(json: any, ignoreDiscriminator: boolean): } export function EnumClassToJSON(value?: EnumClass | null): any { - return value as any; + return EnumClassToJSONTyped(value, false); } -export function EnumClassToJSONTyped(value: any, ignoreDiscriminator: boolean): EnumClass { +export function EnumClassToJSONTyped(value?: EnumClass | null, ignoreDiscriminator: boolean): any { return value as EnumClass; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumTest.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumTest.ts index 4c27767e593c..6b2c4e554beb 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumTest.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumTest.ts @@ -151,8 +151,8 @@ export function EnumTestFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function EnumTestToJSON(json: any): EnumTest { - return EnumTestToJSONTyped(json, false); +export function EnumTestToJSON(value?: EnumTest | null): any { + return EnumTestToJSONTyped(value, false); } export function EnumTestToJSONTyped(value?: EnumTest | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FakeBigDecimalMap200Response.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FakeBigDecimalMap200Response.ts index ed87ea529d3d..e54459654338 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FakeBigDecimalMap200Response.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FakeBigDecimalMap200Response.ts @@ -51,8 +51,8 @@ export function FakeBigDecimalMap200ResponseFromJSONTyped(json: any, ignoreDiscr }; } -export function FakeBigDecimalMap200ResponseToJSON(json: any): FakeBigDecimalMap200Response { - return FakeBigDecimalMap200ResponseToJSONTyped(json, false); +export function FakeBigDecimalMap200ResponseToJSON(value?: FakeBigDecimalMap200Response | null): any { + return FakeBigDecimalMap200ResponseToJSONTyped(value, false); } export function FakeBigDecimalMap200ResponseToJSONTyped(value?: FakeBigDecimalMap200Response | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FileSchemaTestClass.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FileSchemaTestClass.ts index 4dcd0b2ed2c4..8659c90dd9e0 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FileSchemaTestClass.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FileSchemaTestClass.ts @@ -51,8 +51,8 @@ export function FileSchemaTestClassFromJSONTyped(json: any, ignoreDiscriminator: }; } -export function FileSchemaTestClassToJSON(json: any): FileSchemaTestClass { - return FileSchemaTestClassToJSONTyped(json, false); +export function FileSchemaTestClassToJSON(value?: FileSchemaTestClass | null): any { + return FileSchemaTestClassToJSONTyped(value, false); } export function FileSchemaTestClassToJSONTyped(value?: FileSchemaTestClass | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Foo.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Foo.ts index 843b44d30811..df3ebe8ab6a4 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Foo.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Foo.ts @@ -46,8 +46,8 @@ export function FooFromJSONTyped(json: any, ignoreDiscriminator: boolean): Foo { }; } -export function FooToJSON(json: any): Foo { - return FooToJSONTyped(json, false); +export function FooToJSON(value?: Foo | null): any { + return FooToJSONTyped(value, false); } export function FooToJSONTyped(value?: Foo | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FooGetDefaultResponse.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FooGetDefaultResponse.ts index d12c4924c2f3..581d47f74802 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FooGetDefaultResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FooGetDefaultResponse.ts @@ -54,8 +54,8 @@ export function FooGetDefaultResponseFromJSONTyped(json: any, ignoreDiscriminato }; } -export function FooGetDefaultResponseToJSON(json: any): FooGetDefaultResponse { - return FooGetDefaultResponseToJSONTyped(json, false); +export function FooGetDefaultResponseToJSON(value?: FooGetDefaultResponse | null): any { + return FooGetDefaultResponseToJSONTyped(value, false); } export function FooGetDefaultResponseToJSONTyped(value?: FooGetDefaultResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FormatTest.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FormatTest.ts index 047bde78c359..30ac6d577bb7 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FormatTest.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FormatTest.ts @@ -125,8 +125,8 @@ export function FormatTestFromJSONTyped(json: any, ignoreDiscriminator: boolean) }; } -export function FormatTestToJSON(json: any): FormatTest { - return FormatTestToJSONTyped(json, false); +export function FormatTestToJSON(value?: FormatTest | null): any { + return FormatTestToJSONTyped(value, false); } export function FormatTestToJSONTyped(value?: FormatTest | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/HasOnlyReadOnly.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/HasOnlyReadOnly.ts index b81e989b86d4..a604d76c7065 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/HasOnlyReadOnly.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/HasOnlyReadOnly.ts @@ -51,8 +51,8 @@ export function HasOnlyReadOnlyFromJSONTyped(json: any, ignoreDiscriminator: boo }; } -export function HasOnlyReadOnlyToJSON(json: any): HasOnlyReadOnly { - return HasOnlyReadOnlyToJSONTyped(json, false); +export function HasOnlyReadOnlyToJSON(value?: HasOnlyReadOnly | null): any { + return HasOnlyReadOnlyToJSONTyped(value, false); } export function HasOnlyReadOnlyToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/HealthCheckResult.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/HealthCheckResult.ts index 520e91e780bd..56d910433f97 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/HealthCheckResult.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/HealthCheckResult.ts @@ -46,8 +46,8 @@ export function HealthCheckResultFromJSONTyped(json: any, ignoreDiscriminator: b }; } -export function HealthCheckResultToJSON(json: any): HealthCheckResult { - return HealthCheckResultToJSONTyped(json, false); +export function HealthCheckResultToJSON(value?: HealthCheckResult | null): any { + return HealthCheckResultToJSONTyped(value, false); } export function HealthCheckResultToJSONTyped(value?: HealthCheckResult | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/List.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/List.ts index a51be9f76c2c..c130073e74ba 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/List.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/List.ts @@ -46,8 +46,8 @@ export function ListFromJSONTyped(json: any, ignoreDiscriminator: boolean): List }; } -export function ListToJSON(json: any): List { - return ListToJSONTyped(json, false); +export function ListToJSON(value?: List | null): any { + return ListToJSONTyped(value, false); } export function ListToJSONTyped(value?: List | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/MapTest.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/MapTest.ts index 18ea456c8951..5bfe9c02b1d4 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/MapTest.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/MapTest.ts @@ -72,8 +72,8 @@ export function MapTestFromJSONTyped(json: any, ignoreDiscriminator: boolean): M }; } -export function MapTestToJSON(json: any): MapTest { - return MapTestToJSONTyped(json, false); +export function MapTestToJSON(value?: MapTest | null): any { + return MapTestToJSONTyped(value, false); } export function MapTestToJSONTyped(value?: MapTest | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/MixedPropertiesAndAdditionalPropertiesClass.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/MixedPropertiesAndAdditionalPropertiesClass.ts index cb7a2989f0c9..a853f8a1b72c 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/MixedPropertiesAndAdditionalPropertiesClass.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/MixedPropertiesAndAdditionalPropertiesClass.ts @@ -64,8 +64,8 @@ export function MixedPropertiesAndAdditionalPropertiesClassFromJSONTyped(json: a }; } -export function MixedPropertiesAndAdditionalPropertiesClassToJSON(json: any): MixedPropertiesAndAdditionalPropertiesClass { - return MixedPropertiesAndAdditionalPropertiesClassToJSONTyped(json, false); +export function MixedPropertiesAndAdditionalPropertiesClassToJSON(value?: MixedPropertiesAndAdditionalPropertiesClass | null): any { + return MixedPropertiesAndAdditionalPropertiesClassToJSONTyped(value, false); } export function MixedPropertiesAndAdditionalPropertiesClassToJSONTyped(value?: MixedPropertiesAndAdditionalPropertiesClass | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Model200Response.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Model200Response.ts index 62f11d4d4e5a..494b8b5cd30c 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Model200Response.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Model200Response.ts @@ -51,8 +51,8 @@ export function Model200ResponseFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function Model200ResponseToJSON(json: any): Model200Response { - return Model200ResponseToJSONTyped(json, false); +export function Model200ResponseToJSON(value?: Model200Response | null): any { + return Model200ResponseToJSONTyped(value, false); } export function Model200ResponseToJSONTyped(value?: Model200Response | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ModelApiResponse.ts index 8e8b92dc4228..58f9169c3d22 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ModelApiResponse.ts @@ -56,8 +56,8 @@ export function ModelApiResponseFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function ModelApiResponseToJSON(json: any): ModelApiResponse { - return ModelApiResponseToJSONTyped(json, false); +export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { + return ModelApiResponseToJSONTyped(value, false); } export function ModelApiResponseToJSONTyped(value?: ModelApiResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ModelFile.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ModelFile.ts index e823e6cd03cc..7405256c805e 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ModelFile.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ModelFile.ts @@ -46,8 +46,8 @@ export function ModelFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function ModelFileToJSON(json: any): ModelFile { - return ModelFileToJSONTyped(json, false); +export function ModelFileToJSON(value?: ModelFile | null): any { + return ModelFileToJSONTyped(value, false); } export function ModelFileToJSONTyped(value?: ModelFile | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Name.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Name.ts index 4b7ed42911fb..1b839915e3d5 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Name.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Name.ts @@ -62,8 +62,8 @@ export function NameFromJSONTyped(json: any, ignoreDiscriminator: boolean): Name }; } -export function NameToJSON(json: any): Name { - return NameToJSONTyped(json, false); +export function NameToJSON(value?: Name | null): any { + return NameToJSONTyped(value, false); } export function NameToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/NullableClass.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/NullableClass.ts index 2899b9f6f3d6..030d8419d517 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/NullableClass.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/NullableClass.ts @@ -103,8 +103,8 @@ export function NullableClassFromJSONTyped(json: any, ignoreDiscriminator: boole }; } -export function NullableClassToJSON(json: any): NullableClass { - return NullableClassToJSONTyped(json, false); +export function NullableClassToJSON(value?: NullableClass | null): any { + return NullableClassToJSONTyped(value, false); } export function NullableClassToJSONTyped(value?: NullableClass | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/NumberOnly.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/NumberOnly.ts index b899ac447f22..f8691bac9488 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/NumberOnly.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/NumberOnly.ts @@ -46,8 +46,8 @@ export function NumberOnlyFromJSONTyped(json: any, ignoreDiscriminator: boolean) }; } -export function NumberOnlyToJSON(json: any): NumberOnly { - return NumberOnlyToJSONTyped(json, false); +export function NumberOnlyToJSON(value?: NumberOnly | null): any { + return NumberOnlyToJSONTyped(value, false); } export function NumberOnlyToJSONTyped(value?: NumberOnly | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ObjectWithDeprecatedFields.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ObjectWithDeprecatedFields.ts index 73a8eb403427..e80025077768 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ObjectWithDeprecatedFields.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ObjectWithDeprecatedFields.ts @@ -72,8 +72,8 @@ export function ObjectWithDeprecatedFieldsFromJSONTyped(json: any, ignoreDiscrim }; } -export function ObjectWithDeprecatedFieldsToJSON(json: any): ObjectWithDeprecatedFields { - return ObjectWithDeprecatedFieldsToJSONTyped(json, false); +export function ObjectWithDeprecatedFieldsToJSON(value?: ObjectWithDeprecatedFields | null): any { + return ObjectWithDeprecatedFieldsToJSONTyped(value, false); } export function ObjectWithDeprecatedFieldsToJSONTyped(value?: ObjectWithDeprecatedFields | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Order.ts index 1d32da2609f6..1ed4fcf634c0 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Order.ts @@ -83,8 +83,8 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord }; } -export function OrderToJSON(json: any): Order { - return OrderToJSONTyped(json, false); +export function OrderToJSON(value?: Order | null): any { + return OrderToJSONTyped(value, false); } export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterComposite.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterComposite.ts index f3375c3124f7..1a5e57caf2cb 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterComposite.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterComposite.ts @@ -56,8 +56,8 @@ export function OuterCompositeFromJSONTyped(json: any, ignoreDiscriminator: bool }; } -export function OuterCompositeToJSON(json: any): OuterComposite { - return OuterCompositeToJSONTyped(json, false); +export function OuterCompositeToJSON(value?: OuterComposite | null): any { + return OuterCompositeToJSONTyped(value, false); } export function OuterCompositeToJSONTyped(value?: OuterComposite | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnum.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnum.ts index 4be9edeac589..b4aca38af101 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnum.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnum.ts @@ -45,10 +45,10 @@ export function OuterEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): } export function OuterEnumToJSON(value?: OuterEnum | null): any { - return value as any; + return OuterEnumToJSONTyped(value, false); } -export function OuterEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): OuterEnum { +export function OuterEnumToJSONTyped(value?: OuterEnum | null, ignoreDiscriminator: boolean): any { return value as OuterEnum; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumDefaultValue.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumDefaultValue.ts index de44a7878120..45332ed0d7f9 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumDefaultValue.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumDefaultValue.ts @@ -45,10 +45,10 @@ export function OuterEnumDefaultValueFromJSONTyped(json: any, ignoreDiscriminato } export function OuterEnumDefaultValueToJSON(value?: OuterEnumDefaultValue | null): any { - return value as any; + return OuterEnumDefaultValueToJSONTyped(value, false); } -export function OuterEnumDefaultValueToJSONTyped(value: any, ignoreDiscriminator: boolean): OuterEnumDefaultValue { +export function OuterEnumDefaultValueToJSONTyped(value?: OuterEnumDefaultValue | null, ignoreDiscriminator: boolean): any { return value as OuterEnumDefaultValue; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumInteger.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumInteger.ts index b899dc358ea0..46caa611b086 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumInteger.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumInteger.ts @@ -45,10 +45,10 @@ export function OuterEnumIntegerFromJSONTyped(json: any, ignoreDiscriminator: bo } export function OuterEnumIntegerToJSON(value?: OuterEnumInteger | null): any { - return value as any; + return OuterEnumIntegerToJSONTyped(value, false); } -export function OuterEnumIntegerToJSONTyped(value: any, ignoreDiscriminator: boolean): OuterEnumInteger { +export function OuterEnumIntegerToJSONTyped(value?: OuterEnumInteger | null, ignoreDiscriminator: boolean): any { return value as OuterEnumInteger; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumIntegerDefaultValue.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumIntegerDefaultValue.ts index 1a6941699214..ad18b0b13b56 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumIntegerDefaultValue.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumIntegerDefaultValue.ts @@ -45,10 +45,10 @@ export function OuterEnumIntegerDefaultValueFromJSONTyped(json: any, ignoreDiscr } export function OuterEnumIntegerDefaultValueToJSON(value?: OuterEnumIntegerDefaultValue | null): any { - return value as any; + return OuterEnumIntegerDefaultValueToJSONTyped(value, false); } -export function OuterEnumIntegerDefaultValueToJSONTyped(value: any, ignoreDiscriminator: boolean): OuterEnumIntegerDefaultValue { +export function OuterEnumIntegerDefaultValueToJSONTyped(value?: OuterEnumIntegerDefaultValue | null, ignoreDiscriminator: boolean): any { return value as OuterEnumIntegerDefaultValue; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterObjectWithEnumProperty.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterObjectWithEnumProperty.ts index 420c964cd78b..c9e3ba43d8f5 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterObjectWithEnumProperty.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterObjectWithEnumProperty.ts @@ -57,8 +57,8 @@ export function OuterObjectWithEnumPropertyFromJSONTyped(json: any, ignoreDiscri }; } -export function OuterObjectWithEnumPropertyToJSON(json: any): OuterObjectWithEnumProperty { - return OuterObjectWithEnumPropertyToJSONTyped(json, false); +export function OuterObjectWithEnumPropertyToJSON(value?: OuterObjectWithEnumProperty | null): any { + return OuterObjectWithEnumPropertyToJSONTyped(value, false); } export function OuterObjectWithEnumPropertyToJSONTyped(value?: OuterObjectWithEnumProperty | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ParentWithNullable.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ParentWithNullable.ts index 0eedf046f63c..24baf7b68c9c 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ParentWithNullable.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ParentWithNullable.ts @@ -68,8 +68,8 @@ export function ParentWithNullableFromJSONTyped(json: any, ignoreDiscriminator: }; } -export function ParentWithNullableToJSON(json: any): ParentWithNullable { - return ParentWithNullableToJSONTyped(json, false); +export function ParentWithNullableToJSON(value?: ParentWithNullable | null): any { + return ParentWithNullableToJSONTyped(value, false); } export function ParentWithNullableToJSONTyped(value?: ParentWithNullable | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Pet.ts index 20d21e2f1aad..9b9d90757ff8 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Pet.ts @@ -100,8 +100,8 @@ export function PetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Pet { }; } -export function PetToJSON(json: any): Pet { - return PetToJSONTyped(json, false); +export function PetToJSON(value?: Pet | null): any { + return PetToJSONTyped(value, false); } export function PetToJSONTyped(value?: Pet | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ReadOnlyFirst.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ReadOnlyFirst.ts index 3a80d04b6d6d..5e60b46426ee 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ReadOnlyFirst.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ReadOnlyFirst.ts @@ -51,8 +51,8 @@ export function ReadOnlyFirstFromJSONTyped(json: any, ignoreDiscriminator: boole }; } -export function ReadOnlyFirstToJSON(json: any): ReadOnlyFirst { - return ReadOnlyFirstToJSONTyped(json, false); +export function ReadOnlyFirstToJSON(value?: ReadOnlyFirst | null): any { + return ReadOnlyFirstToJSONTyped(value, false); } export function ReadOnlyFirstToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Return.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Return.ts index c0b3275a6ed8..607b7f559c55 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Return.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Return.ts @@ -46,8 +46,8 @@ export function ReturnFromJSONTyped(json: any, ignoreDiscriminator: boolean): Re }; } -export function ReturnToJSON(json: any): Return { - return ReturnToJSONTyped(json, false); +export function ReturnToJSON(value?: Return | null): any { + return ReturnToJSONTyped(value, false); } export function ReturnToJSONTyped(value?: Return | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SingleRefType.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SingleRefType.ts index 8247fdf99d23..1a9dd87cabc4 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SingleRefType.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SingleRefType.ts @@ -44,10 +44,10 @@ export function SingleRefTypeFromJSONTyped(json: any, ignoreDiscriminator: boole } export function SingleRefTypeToJSON(value?: SingleRefType | null): any { - return value as any; + return SingleRefTypeToJSONTyped(value, false); } -export function SingleRefTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): SingleRefType { +export function SingleRefTypeToJSONTyped(value?: SingleRefType | null, ignoreDiscriminator: boolean): any { return value as SingleRefType; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SpecialModelName.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SpecialModelName.ts index d13618509744..3e5d93c0ae5f 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SpecialModelName.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SpecialModelName.ts @@ -46,8 +46,8 @@ export function SpecialModelNameFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function SpecialModelNameToJSON(json: any): SpecialModelName { - return SpecialModelNameToJSONTyped(json, false); +export function SpecialModelNameToJSON(value?: SpecialModelName | null): any { + return SpecialModelNameToJSONTyped(value, false); } export function SpecialModelNameToJSONTyped(value?: SpecialModelName | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Tag.ts index a0caf8140a38..bdce73a2fc53 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Tag.ts @@ -51,8 +51,8 @@ export function TagFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tag { }; } -export function TagToJSON(json: any): Tag { - return TagToJSONTyped(json, false); +export function TagToJSON(value?: Tag | null): any { + return TagToJSONTyped(value, false); } export function TagToJSONTyped(value?: Tag | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/TestInlineFreeformAdditionalPropertiesRequest.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/TestInlineFreeformAdditionalPropertiesRequest.ts index b11489089d02..21a4b22fd0b9 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/TestInlineFreeformAdditionalPropertiesRequest.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/TestInlineFreeformAdditionalPropertiesRequest.ts @@ -48,8 +48,8 @@ export function TestInlineFreeformAdditionalPropertiesRequestFromJSONTyped(json: }; } -export function TestInlineFreeformAdditionalPropertiesRequestToJSON(json: any): TestInlineFreeformAdditionalPropertiesRequest { - return TestInlineFreeformAdditionalPropertiesRequestToJSONTyped(json, false); +export function TestInlineFreeformAdditionalPropertiesRequestToJSON(value?: TestInlineFreeformAdditionalPropertiesRequest | null): any { + return TestInlineFreeformAdditionalPropertiesRequestToJSONTyped(value, false); } export function TestInlineFreeformAdditionalPropertiesRequestToJSONTyped(value?: TestInlineFreeformAdditionalPropertiesRequest | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/User.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/User.ts index 207ad34596fc..ff94ea078e52 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/User.ts @@ -81,8 +81,8 @@ export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User }; } -export function UserToJSON(json: any): User { - return UserToJSONTyped(json, false); +export function UserToJSON(value?: User | null): any { + return UserToJSONTyped(value, false); } export function UserToJSONTyped(value?: User | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/default/models/Category.ts index cdffe07db910..8cc26245bcfa 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/Category.ts @@ -51,8 +51,8 @@ export function CategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function CategoryToJSON(json: any): Category { - return CategoryToJSONTyped(json, false); +export function CategoryToJSON(value?: Category | null): any { + return CategoryToJSONTyped(value, false); } export function CategoryToJSONTyped(value?: Category | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/default/models/ModelApiResponse.ts index f89423073868..8c96852c3f93 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/ModelApiResponse.ts @@ -56,8 +56,8 @@ export function ModelApiResponseFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function ModelApiResponseToJSON(json: any): ModelApiResponse { - return ModelApiResponseToJSONTyped(json, false); +export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { + return ModelApiResponseToJSONTyped(value, false); } export function ModelApiResponseToJSONTyped(value?: ModelApiResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts index cb6b5c016de6..9d7d64d485ab 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts @@ -83,8 +83,8 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord }; } -export function OrderToJSON(json: any): Order { - return OrderToJSONTyped(json, false); +export function OrderToJSON(value?: Order | null): any { + return OrderToJSONTyped(value, false); } export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/default/models/Pet.ts index 4c0cb6e73685..9cad3038ebd6 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/Pet.ts @@ -100,8 +100,8 @@ export function PetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Pet { }; } -export function PetToJSON(json: any): Pet { - return PetToJSONTyped(json, false); +export function PetToJSON(value?: Pet | null): any { + return PetToJSONTyped(value, false); } export function PetToJSONTyped(value?: Pet | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/default/models/Tag.ts index 80126e24919e..c18fa753e17e 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/Tag.ts @@ -51,8 +51,8 @@ export function TagFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tag { }; } -export function TagToJSON(json: any): Tag { - return TagToJSONTyped(json, false); +export function TagToJSON(value?: Tag | null): any { + return TagToJSONTyped(value, false); } export function TagToJSONTyped(value?: Tag | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/User.ts b/samples/client/petstore/typescript-fetch/builds/default/models/User.ts index 68e240e4afb3..2203c82ee95f 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/User.ts @@ -81,8 +81,8 @@ export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User }; } -export function UserToJSON(json: any): User { - return UserToJSONTyped(json, false); +export function UserToJSON(value?: User | null): any { + return UserToJSONTyped(value, false); } export function UserToJSONTyped(value?: User | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/enum/models/EnumPatternObject.ts b/samples/client/petstore/typescript-fetch/builds/enum/models/EnumPatternObject.ts index 0ad7eb19c7df..4693bd87f4ef 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/models/EnumPatternObject.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/models/EnumPatternObject.ts @@ -78,8 +78,8 @@ export function EnumPatternObjectFromJSONTyped(json: any, ignoreDiscriminator: b }; } -export function EnumPatternObjectToJSON(json: any): EnumPatternObject { - return EnumPatternObjectToJSONTyped(json, false); +export function EnumPatternObjectToJSON(value?: EnumPatternObject | null): any { + return EnumPatternObjectToJSONTyped(value, false); } export function EnumPatternObjectToJSONTyped(value?: EnumPatternObject | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/enum/models/FakeEnumRequestGetInline200Response.ts b/samples/client/petstore/typescript-fetch/builds/enum/models/FakeEnumRequestGetInline200Response.ts index 50912880cb8f..9d35388aa42b 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/models/FakeEnumRequestGetInline200Response.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/models/FakeEnumRequestGetInline200Response.ts @@ -103,8 +103,8 @@ export function FakeEnumRequestGetInline200ResponseFromJSONTyped(json: any, igno }; } -export function FakeEnumRequestGetInline200ResponseToJSON(json: any): FakeEnumRequestGetInline200Response { - return FakeEnumRequestGetInline200ResponseToJSONTyped(json, false); +export function FakeEnumRequestGetInline200ResponseToJSON(value?: FakeEnumRequestGetInline200Response | null): any { + return FakeEnumRequestGetInline200ResponseToJSONTyped(value, false); } export function FakeEnumRequestGetInline200ResponseToJSONTyped(value?: FakeEnumRequestGetInline200Response | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/enum/models/NumberEnum.ts b/samples/client/petstore/typescript-fetch/builds/enum/models/NumberEnum.ts index d893f1143456..2f314d64f837 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/models/NumberEnum.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/models/NumberEnum.ts @@ -45,10 +45,10 @@ export function NumberEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean) } export function NumberEnumToJSON(value?: NumberEnum | null): any { - return value as any; + return NumberEnumToJSONTyped(value, false); } -export function NumberEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): NumberEnum { +export function NumberEnumToJSONTyped(value?: NumberEnum | null, ignoreDiscriminator: boolean): any { return value as NumberEnum; } diff --git a/samples/client/petstore/typescript-fetch/builds/enum/models/StringEnum.ts b/samples/client/petstore/typescript-fetch/builds/enum/models/StringEnum.ts index 172e15ef52d4..1d3206c1156c 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/models/StringEnum.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/models/StringEnum.ts @@ -45,10 +45,10 @@ export function StringEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean) } export function StringEnumToJSON(value?: StringEnum | null): any { - return value as any; + return StringEnumToJSONTyped(value, false); } -export function StringEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): StringEnum { +export function StringEnumToJSONTyped(value?: StringEnum | null, ignoreDiscriminator: boolean): any { return value as StringEnum; } diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Category.ts index cdffe07db910..8cc26245bcfa 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Category.ts @@ -51,8 +51,8 @@ export function CategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function CategoryToJSON(json: any): Category { - return CategoryToJSONTyped(json, false); +export function CategoryToJSON(value?: Category | null): any { + return CategoryToJSONTyped(value, false); } export function CategoryToJSONTyped(value?: Category | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/ModelApiResponse.ts index f89423073868..8c96852c3f93 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/ModelApiResponse.ts @@ -56,8 +56,8 @@ export function ModelApiResponseFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function ModelApiResponseToJSON(json: any): ModelApiResponse { - return ModelApiResponseToJSONTyped(json, false); +export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { + return ModelApiResponseToJSONTyped(value, false); } export function ModelApiResponseToJSONTyped(value?: ModelApiResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Order.ts index cb6b5c016de6..9d7d64d485ab 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Order.ts @@ -83,8 +83,8 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord }; } -export function OrderToJSON(json: any): Order { - return OrderToJSONTyped(json, false); +export function OrderToJSON(value?: Order | null): any { + return OrderToJSONTyped(value, false); } export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Pet.ts index 4c0cb6e73685..9cad3038ebd6 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Pet.ts @@ -100,8 +100,8 @@ export function PetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Pet { }; } -export function PetToJSON(json: any): Pet { - return PetToJSONTyped(json, false); +export function PetToJSON(value?: Pet | null): any { + return PetToJSONTyped(value, false); } export function PetToJSONTyped(value?: Pet | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Tag.ts index 80126e24919e..c18fa753e17e 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Tag.ts @@ -51,8 +51,8 @@ export function TagFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tag { }; } -export function TagToJSON(json: any): Tag { - return TagToJSONTyped(json, false); +export function TagToJSON(value?: Tag | null): any { + return TagToJSONTyped(value, false); } export function TagToJSONTyped(value?: Tag | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/User.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/User.ts index 68e240e4afb3..2203c82ee95f 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/User.ts @@ -81,8 +81,8 @@ export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User }; } -export function UserToJSON(json: any): User { - return UserToJSONTyped(json, false); +export function UserToJSON(value?: User | null): any { + return UserToJSONTyped(value, false); } export function UserToJSONTyped(value?: User | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/additional-properties-class.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/additional-properties-class.ts index 1db920000504..19da6d22c1d6 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/additional-properties-class.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/additional-properties-class.ts @@ -51,8 +51,8 @@ export function AdditionalPropertiesClassFromJSONTyped(json: any, ignoreDiscrimi }; } -export function AdditionalPropertiesClassToJSON(json: any): AdditionalPropertiesClass { - return AdditionalPropertiesClassToJSONTyped(json, false); +export function AdditionalPropertiesClassToJSON(value?: AdditionalPropertiesClass | null): any { + return AdditionalPropertiesClassToJSONTyped(value, false); } export function AdditionalPropertiesClassToJSONTyped(value?: AdditionalPropertiesClass | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/all-of-with-single-ref.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/all-of-with-single-ref.ts index aa782062bc3d..a28d3b865ea0 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/all-of-with-single-ref.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/all-of-with-single-ref.ts @@ -61,8 +61,8 @@ export function AllOfWithSingleRefFromJSONTyped(json: any, ignoreDiscriminator: }; } -export function AllOfWithSingleRefToJSON(json: any): AllOfWithSingleRef { - return AllOfWithSingleRefToJSONTyped(json, false); +export function AllOfWithSingleRefToJSON(value?: AllOfWithSingleRef | null): any { + return AllOfWithSingleRefToJSONTyped(value, false); } export function AllOfWithSingleRefToJSONTyped(value?: AllOfWithSingleRef | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/animal.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/animal.ts index 2a8b126041f7..f2d93d87bc5a 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/animal.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/animal.ts @@ -63,8 +63,8 @@ export function AnimalFromJSONTyped(json: any, ignoreDiscriminator: boolean): An }; } -export function AnimalToJSON(json: any): Animal { - return AnimalToJSONTyped(json, false); +export function AnimalToJSON(value?: Animal | null): any { + return AnimalToJSONTyped(value, false); } export function AnimalToJSONTyped(value?: Animal | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/array-of-array-of-number-only.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/array-of-array-of-number-only.ts index bce79e8d3b63..9a12b6b11247 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/array-of-array-of-number-only.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/array-of-array-of-number-only.ts @@ -46,8 +46,8 @@ export function ArrayOfArrayOfNumberOnlyFromJSONTyped(json: any, ignoreDiscrimin }; } -export function ArrayOfArrayOfNumberOnlyToJSON(json: any): ArrayOfArrayOfNumberOnly { - return ArrayOfArrayOfNumberOnlyToJSONTyped(json, false); +export function ArrayOfArrayOfNumberOnlyToJSON(value?: ArrayOfArrayOfNumberOnly | null): any { + return ArrayOfArrayOfNumberOnlyToJSONTyped(value, false); } export function ArrayOfArrayOfNumberOnlyToJSONTyped(value?: ArrayOfArrayOfNumberOnly | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/array-of-number-only.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/array-of-number-only.ts index 8640a0d74aa5..cd015cb0f705 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/array-of-number-only.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/array-of-number-only.ts @@ -46,8 +46,8 @@ export function ArrayOfNumberOnlyFromJSONTyped(json: any, ignoreDiscriminator: b }; } -export function ArrayOfNumberOnlyToJSON(json: any): ArrayOfNumberOnly { - return ArrayOfNumberOnlyToJSONTyped(json, false); +export function ArrayOfNumberOnlyToJSON(value?: ArrayOfNumberOnly | null): any { + return ArrayOfNumberOnlyToJSONTyped(value, false); } export function ArrayOfNumberOnlyToJSONTyped(value?: ArrayOfNumberOnly | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/array-test.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/array-test.ts index a41776f9d876..aa97bcce2c7c 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/array-test.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/array-test.ts @@ -64,8 +64,8 @@ export function ArrayTestFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function ArrayTestToJSON(json: any): ArrayTest { - return ArrayTestToJSONTyped(json, false); +export function ArrayTestToJSON(value?: ArrayTest | null): any { + return ArrayTestToJSONTyped(value, false); } export function ArrayTestToJSONTyped(value?: ArrayTest | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/capitalization.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/capitalization.ts index de75ac5926d6..2d3e2b74cae6 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/capitalization.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/capitalization.ts @@ -72,8 +72,8 @@ export function CapitalizationFromJSONTyped(json: any, ignoreDiscriminator: bool }; } -export function CapitalizationToJSON(json: any): Capitalization { - return CapitalizationToJSONTyped(json, false); +export function CapitalizationToJSON(value?: Capitalization | null): any { + return CapitalizationToJSONTyped(value, false); } export function CapitalizationToJSONTyped(value?: Capitalization | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/cat.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/cat.ts index 05327a0a2074..542d700a5c5d 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/cat.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/cat.ts @@ -54,8 +54,8 @@ export function CatFromJSONTyped(json: any, ignoreDiscriminator: boolean): Cat { }; } -export function CatToJSON(json: any): Cat { - return CatToJSONTyped(json, false); +export function CatToJSON(value?: Cat | null): any { + return CatToJSONTyped(value, false); } export function CatToJSONTyped(value?: Cat | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/category.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/category.ts index 04cd593f2dce..23c61531dc15 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/category.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/category.ts @@ -52,8 +52,8 @@ export function CategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function CategoryToJSON(json: any): Category { - return CategoryToJSONTyped(json, false); +export function CategoryToJSON(value?: Category | null): any { + return CategoryToJSONTyped(value, false); } export function CategoryToJSONTyped(value?: Category | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/child-with-nullable.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/child-with-nullable.ts index 0581ad6f5e92..85ed2efb9c91 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/child-with-nullable.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/child-with-nullable.ts @@ -56,8 +56,8 @@ export function ChildWithNullableFromJSONTyped(json: any, ignoreDiscriminator: b }; } -export function ChildWithNullableToJSON(json: any): ChildWithNullable { - return ChildWithNullableToJSONTyped(json, false); +export function ChildWithNullableToJSON(value?: ChildWithNullable | null): any { + return ChildWithNullableToJSONTyped(value, false); } export function ChildWithNullableToJSONTyped(value?: ChildWithNullable | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/class-model.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/class-model.ts index cef4c58640ce..74e4c38e231f 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/class-model.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/class-model.ts @@ -46,8 +46,8 @@ export function ClassModelFromJSONTyped(json: any, ignoreDiscriminator: boolean) }; } -export function ClassModelToJSON(json: any): ClassModel { - return ClassModelToJSONTyped(json, false); +export function ClassModelToJSON(value?: ClassModel | null): any { + return ClassModelToJSONTyped(value, false); } export function ClassModelToJSONTyped(value?: ClassModel | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/client.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/client.ts index 7f353720b90d..31e75cc33894 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/client.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/client.ts @@ -46,8 +46,8 @@ export function ClientFromJSONTyped(json: any, ignoreDiscriminator: boolean): Cl }; } -export function ClientToJSON(json: any): Client { - return ClientToJSONTyped(json, false); +export function ClientToJSON(value?: Client | null): any { + return ClientToJSONTyped(value, false); } export function ClientToJSONTyped(value?: Client | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/deprecated-object.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/deprecated-object.ts index 14623160e258..85b6a332d0d4 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/deprecated-object.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/deprecated-object.ts @@ -46,8 +46,8 @@ export function DeprecatedObjectFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function DeprecatedObjectToJSON(json: any): DeprecatedObject { - return DeprecatedObjectToJSONTyped(json, false); +export function DeprecatedObjectToJSON(value?: DeprecatedObject | null): any { + return DeprecatedObjectToJSONTyped(value, false); } export function DeprecatedObjectToJSONTyped(value?: DeprecatedObject | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/dog.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/dog.ts index 8eae2e8bd755..ab867c6ee1f6 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/dog.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/dog.ts @@ -54,8 +54,8 @@ export function DogFromJSONTyped(json: any, ignoreDiscriminator: boolean): Dog { }; } -export function DogToJSON(json: any): Dog { - return DogToJSONTyped(json, false); +export function DogToJSON(value?: Dog | null): any { + return DogToJSONTyped(value, false); } export function DogToJSONTyped(value?: Dog | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/enum-arrays.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/enum-arrays.ts index 84cd87dd1408..5bdb73afb842 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/enum-arrays.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/enum-arrays.ts @@ -71,8 +71,8 @@ export function EnumArraysFromJSONTyped(json: any, ignoreDiscriminator: boolean) }; } -export function EnumArraysToJSON(json: any): EnumArrays { - return EnumArraysToJSONTyped(json, false); +export function EnumArraysToJSON(value?: EnumArrays | null): any { + return EnumArraysToJSONTyped(value, false); } export function EnumArraysToJSONTyped(value?: EnumArrays | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/enum-class.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/enum-class.ts index 6878b8591431..273d379ae560 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/enum-class.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/enum-class.ts @@ -45,10 +45,10 @@ export function EnumClassFromJSONTyped(json: any, ignoreDiscriminator: boolean): } export function EnumClassToJSON(value?: EnumClass | null): any { - return value as any; + return EnumClassToJSONTyped(value, false); } -export function EnumClassToJSONTyped(value: any, ignoreDiscriminator: boolean): EnumClass { +export function EnumClassToJSONTyped(value?: EnumClass | null, ignoreDiscriminator: boolean): any { return value as EnumClass; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/enum-test.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/enum-test.ts index ebfff184b281..45b00aba9260 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/enum-test.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/enum-test.ts @@ -151,8 +151,8 @@ export function EnumTestFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function EnumTestToJSON(json: any): EnumTest { - return EnumTestToJSONTyped(json, false); +export function EnumTestToJSON(value?: EnumTest | null): any { + return EnumTestToJSONTyped(value, false); } export function EnumTestToJSONTyped(value?: EnumTest | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/fake-big-decimal-map200-response.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/fake-big-decimal-map200-response.ts index ed87ea529d3d..e54459654338 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/fake-big-decimal-map200-response.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/fake-big-decimal-map200-response.ts @@ -51,8 +51,8 @@ export function FakeBigDecimalMap200ResponseFromJSONTyped(json: any, ignoreDiscr }; } -export function FakeBigDecimalMap200ResponseToJSON(json: any): FakeBigDecimalMap200Response { - return FakeBigDecimalMap200ResponseToJSONTyped(json, false); +export function FakeBigDecimalMap200ResponseToJSON(value?: FakeBigDecimalMap200Response | null): any { + return FakeBigDecimalMap200ResponseToJSONTyped(value, false); } export function FakeBigDecimalMap200ResponseToJSONTyped(value?: FakeBigDecimalMap200Response | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/file-schema-test-class.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/file-schema-test-class.ts index 4dcd0b2ed2c4..8659c90dd9e0 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/file-schema-test-class.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/file-schema-test-class.ts @@ -51,8 +51,8 @@ export function FileSchemaTestClassFromJSONTyped(json: any, ignoreDiscriminator: }; } -export function FileSchemaTestClassToJSON(json: any): FileSchemaTestClass { - return FileSchemaTestClassToJSONTyped(json, false); +export function FileSchemaTestClassToJSON(value?: FileSchemaTestClass | null): any { + return FileSchemaTestClassToJSONTyped(value, false); } export function FileSchemaTestClassToJSONTyped(value?: FileSchemaTestClass | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/foo-get-default-response.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/foo-get-default-response.ts index 010ffd4b422f..af1d4ac19138 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/foo-get-default-response.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/foo-get-default-response.ts @@ -54,8 +54,8 @@ export function FooGetDefaultResponseFromJSONTyped(json: any, ignoreDiscriminato }; } -export function FooGetDefaultResponseToJSON(json: any): FooGetDefaultResponse { - return FooGetDefaultResponseToJSONTyped(json, false); +export function FooGetDefaultResponseToJSON(value?: FooGetDefaultResponse | null): any { + return FooGetDefaultResponseToJSONTyped(value, false); } export function FooGetDefaultResponseToJSONTyped(value?: FooGetDefaultResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/foo.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/foo.ts index 843b44d30811..df3ebe8ab6a4 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/foo.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/foo.ts @@ -46,8 +46,8 @@ export function FooFromJSONTyped(json: any, ignoreDiscriminator: boolean): Foo { }; } -export function FooToJSON(json: any): Foo { - return FooToJSONTyped(json, false); +export function FooToJSON(value?: Foo | null): any { + return FooToJSONTyped(value, false); } export function FooToJSONTyped(value?: Foo | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/format-test.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/format-test.ts index 047bde78c359..30ac6d577bb7 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/format-test.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/format-test.ts @@ -125,8 +125,8 @@ export function FormatTestFromJSONTyped(json: any, ignoreDiscriminator: boolean) }; } -export function FormatTestToJSON(json: any): FormatTest { - return FormatTestToJSONTyped(json, false); +export function FormatTestToJSON(value?: FormatTest | null): any { + return FormatTestToJSONTyped(value, false); } export function FormatTestToJSONTyped(value?: FormatTest | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/has-only-read-only.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/has-only-read-only.ts index b81e989b86d4..a604d76c7065 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/has-only-read-only.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/has-only-read-only.ts @@ -51,8 +51,8 @@ export function HasOnlyReadOnlyFromJSONTyped(json: any, ignoreDiscriminator: boo }; } -export function HasOnlyReadOnlyToJSON(json: any): HasOnlyReadOnly { - return HasOnlyReadOnlyToJSONTyped(json, false); +export function HasOnlyReadOnlyToJSON(value?: HasOnlyReadOnly | null): any { + return HasOnlyReadOnlyToJSONTyped(value, false); } export function HasOnlyReadOnlyToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/health-check-result.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/health-check-result.ts index 520e91e780bd..56d910433f97 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/health-check-result.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/health-check-result.ts @@ -46,8 +46,8 @@ export function HealthCheckResultFromJSONTyped(json: any, ignoreDiscriminator: b }; } -export function HealthCheckResultToJSON(json: any): HealthCheckResult { - return HealthCheckResultToJSONTyped(json, false); +export function HealthCheckResultToJSON(value?: HealthCheckResult | null): any { + return HealthCheckResultToJSONTyped(value, false); } export function HealthCheckResultToJSONTyped(value?: HealthCheckResult | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/list.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/list.ts index a51be9f76c2c..c130073e74ba 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/list.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/list.ts @@ -46,8 +46,8 @@ export function ListFromJSONTyped(json: any, ignoreDiscriminator: boolean): List }; } -export function ListToJSON(json: any): List { - return ListToJSONTyped(json, false); +export function ListToJSON(value?: List | null): any { + return ListToJSONTyped(value, false); } export function ListToJSONTyped(value?: List | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/map-test.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/map-test.ts index 18ea456c8951..5bfe9c02b1d4 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/map-test.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/map-test.ts @@ -72,8 +72,8 @@ export function MapTestFromJSONTyped(json: any, ignoreDiscriminator: boolean): M }; } -export function MapTestToJSON(json: any): MapTest { - return MapTestToJSONTyped(json, false); +export function MapTestToJSON(value?: MapTest | null): any { + return MapTestToJSONTyped(value, false); } export function MapTestToJSONTyped(value?: MapTest | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/mixed-properties-and-additional-properties-class.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/mixed-properties-and-additional-properties-class.ts index 71e0fa8b1ff9..011ca1ba7826 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/mixed-properties-and-additional-properties-class.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/mixed-properties-and-additional-properties-class.ts @@ -64,8 +64,8 @@ export function MixedPropertiesAndAdditionalPropertiesClassFromJSONTyped(json: a }; } -export function MixedPropertiesAndAdditionalPropertiesClassToJSON(json: any): MixedPropertiesAndAdditionalPropertiesClass { - return MixedPropertiesAndAdditionalPropertiesClassToJSONTyped(json, false); +export function MixedPropertiesAndAdditionalPropertiesClassToJSON(value?: MixedPropertiesAndAdditionalPropertiesClass | null): any { + return MixedPropertiesAndAdditionalPropertiesClassToJSONTyped(value, false); } export function MixedPropertiesAndAdditionalPropertiesClassToJSONTyped(value?: MixedPropertiesAndAdditionalPropertiesClass | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/model-api-response.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/model-api-response.ts index 8e8b92dc4228..58f9169c3d22 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/model-api-response.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/model-api-response.ts @@ -56,8 +56,8 @@ export function ModelApiResponseFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function ModelApiResponseToJSON(json: any): ModelApiResponse { - return ModelApiResponseToJSONTyped(json, false); +export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { + return ModelApiResponseToJSONTyped(value, false); } export function ModelApiResponseToJSONTyped(value?: ModelApiResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/model-file.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/model-file.ts index e823e6cd03cc..7405256c805e 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/model-file.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/model-file.ts @@ -46,8 +46,8 @@ export function ModelFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function ModelFileToJSON(json: any): ModelFile { - return ModelFileToJSONTyped(json, false); +export function ModelFileToJSON(value?: ModelFile | null): any { + return ModelFileToJSONTyped(value, false); } export function ModelFileToJSONTyped(value?: ModelFile | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/model200-response.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/model200-response.ts index 62f11d4d4e5a..494b8b5cd30c 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/model200-response.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/model200-response.ts @@ -51,8 +51,8 @@ export function Model200ResponseFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function Model200ResponseToJSON(json: any): Model200Response { - return Model200ResponseToJSONTyped(json, false); +export function Model200ResponseToJSON(value?: Model200Response | null): any { + return Model200ResponseToJSONTyped(value, false); } export function Model200ResponseToJSONTyped(value?: Model200Response | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/name.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/name.ts index 4b7ed42911fb..1b839915e3d5 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/name.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/name.ts @@ -62,8 +62,8 @@ export function NameFromJSONTyped(json: any, ignoreDiscriminator: boolean): Name }; } -export function NameToJSON(json: any): Name { - return NameToJSONTyped(json, false); +export function NameToJSON(value?: Name | null): any { + return NameToJSONTyped(value, false); } export function NameToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/nullable-class.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/nullable-class.ts index 2899b9f6f3d6..030d8419d517 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/nullable-class.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/nullable-class.ts @@ -103,8 +103,8 @@ export function NullableClassFromJSONTyped(json: any, ignoreDiscriminator: boole }; } -export function NullableClassToJSON(json: any): NullableClass { - return NullableClassToJSONTyped(json, false); +export function NullableClassToJSON(value?: NullableClass | null): any { + return NullableClassToJSONTyped(value, false); } export function NullableClassToJSONTyped(value?: NullableClass | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/number-only.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/number-only.ts index b899ac447f22..f8691bac9488 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/number-only.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/number-only.ts @@ -46,8 +46,8 @@ export function NumberOnlyFromJSONTyped(json: any, ignoreDiscriminator: boolean) }; } -export function NumberOnlyToJSON(json: any): NumberOnly { - return NumberOnlyToJSONTyped(json, false); +export function NumberOnlyToJSON(value?: NumberOnly | null): any { + return NumberOnlyToJSONTyped(value, false); } export function NumberOnlyToJSONTyped(value?: NumberOnly | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/object-with-deprecated-fields.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/object-with-deprecated-fields.ts index 1491b14913df..1bbe03180b9f 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/object-with-deprecated-fields.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/object-with-deprecated-fields.ts @@ -72,8 +72,8 @@ export function ObjectWithDeprecatedFieldsFromJSONTyped(json: any, ignoreDiscrim }; } -export function ObjectWithDeprecatedFieldsToJSON(json: any): ObjectWithDeprecatedFields { - return ObjectWithDeprecatedFieldsToJSONTyped(json, false); +export function ObjectWithDeprecatedFieldsToJSON(value?: ObjectWithDeprecatedFields | null): any { + return ObjectWithDeprecatedFieldsToJSONTyped(value, false); } export function ObjectWithDeprecatedFieldsToJSONTyped(value?: ObjectWithDeprecatedFields | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/order.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/order.ts index 1d32da2609f6..1ed4fcf634c0 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/order.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/order.ts @@ -83,8 +83,8 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord }; } -export function OrderToJSON(json: any): Order { - return OrderToJSONTyped(json, false); +export function OrderToJSON(value?: Order | null): any { + return OrderToJSONTyped(value, false); } export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-composite.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-composite.ts index f3375c3124f7..1a5e57caf2cb 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-composite.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-composite.ts @@ -56,8 +56,8 @@ export function OuterCompositeFromJSONTyped(json: any, ignoreDiscriminator: bool }; } -export function OuterCompositeToJSON(json: any): OuterComposite { - return OuterCompositeToJSONTyped(json, false); +export function OuterCompositeToJSON(value?: OuterComposite | null): any { + return OuterCompositeToJSONTyped(value, false); } export function OuterCompositeToJSONTyped(value?: OuterComposite | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-default-value.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-default-value.ts index de44a7878120..45332ed0d7f9 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-default-value.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-default-value.ts @@ -45,10 +45,10 @@ export function OuterEnumDefaultValueFromJSONTyped(json: any, ignoreDiscriminato } export function OuterEnumDefaultValueToJSON(value?: OuterEnumDefaultValue | null): any { - return value as any; + return OuterEnumDefaultValueToJSONTyped(value, false); } -export function OuterEnumDefaultValueToJSONTyped(value: any, ignoreDiscriminator: boolean): OuterEnumDefaultValue { +export function OuterEnumDefaultValueToJSONTyped(value?: OuterEnumDefaultValue | null, ignoreDiscriminator: boolean): any { return value as OuterEnumDefaultValue; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer-default-value.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer-default-value.ts index 1a6941699214..ad18b0b13b56 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer-default-value.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer-default-value.ts @@ -45,10 +45,10 @@ export function OuterEnumIntegerDefaultValueFromJSONTyped(json: any, ignoreDiscr } export function OuterEnumIntegerDefaultValueToJSON(value?: OuterEnumIntegerDefaultValue | null): any { - return value as any; + return OuterEnumIntegerDefaultValueToJSONTyped(value, false); } -export function OuterEnumIntegerDefaultValueToJSONTyped(value: any, ignoreDiscriminator: boolean): OuterEnumIntegerDefaultValue { +export function OuterEnumIntegerDefaultValueToJSONTyped(value?: OuterEnumIntegerDefaultValue | null, ignoreDiscriminator: boolean): any { return value as OuterEnumIntegerDefaultValue; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer.ts index b899dc358ea0..46caa611b086 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer.ts @@ -45,10 +45,10 @@ export function OuterEnumIntegerFromJSONTyped(json: any, ignoreDiscriminator: bo } export function OuterEnumIntegerToJSON(value?: OuterEnumInteger | null): any { - return value as any; + return OuterEnumIntegerToJSONTyped(value, false); } -export function OuterEnumIntegerToJSONTyped(value: any, ignoreDiscriminator: boolean): OuterEnumInteger { +export function OuterEnumIntegerToJSONTyped(value?: OuterEnumInteger | null, ignoreDiscriminator: boolean): any { return value as OuterEnumInteger; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum.ts index 4be9edeac589..b4aca38af101 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum.ts @@ -45,10 +45,10 @@ export function OuterEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): } export function OuterEnumToJSON(value?: OuterEnum | null): any { - return value as any; + return OuterEnumToJSONTyped(value, false); } -export function OuterEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): OuterEnum { +export function OuterEnumToJSONTyped(value?: OuterEnum | null, ignoreDiscriminator: boolean): any { return value as OuterEnum; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-object-with-enum-property.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-object-with-enum-property.ts index 1ebc71806729..137782b8478a 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-object-with-enum-property.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-object-with-enum-property.ts @@ -57,8 +57,8 @@ export function OuterObjectWithEnumPropertyFromJSONTyped(json: any, ignoreDiscri }; } -export function OuterObjectWithEnumPropertyToJSON(json: any): OuterObjectWithEnumProperty { - return OuterObjectWithEnumPropertyToJSONTyped(json, false); +export function OuterObjectWithEnumPropertyToJSON(value?: OuterObjectWithEnumProperty | null): any { + return OuterObjectWithEnumPropertyToJSONTyped(value, false); } export function OuterObjectWithEnumPropertyToJSONTyped(value?: OuterObjectWithEnumProperty | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/parent-with-nullable.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/parent-with-nullable.ts index 0eedf046f63c..24baf7b68c9c 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/parent-with-nullable.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/parent-with-nullable.ts @@ -68,8 +68,8 @@ export function ParentWithNullableFromJSONTyped(json: any, ignoreDiscriminator: }; } -export function ParentWithNullableToJSON(json: any): ParentWithNullable { - return ParentWithNullableToJSONTyped(json, false); +export function ParentWithNullableToJSON(value?: ParentWithNullable | null): any { + return ParentWithNullableToJSONTyped(value, false); } export function ParentWithNullableToJSONTyped(value?: ParentWithNullable | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/pet.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/pet.ts index add649416353..4aae4d69c077 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/pet.ts @@ -100,8 +100,8 @@ export function PetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Pet { }; } -export function PetToJSON(json: any): Pet { - return PetToJSONTyped(json, false); +export function PetToJSON(value?: Pet | null): any { + return PetToJSONTyped(value, false); } export function PetToJSONTyped(value?: Pet | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/read-only-first.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/read-only-first.ts index 3a80d04b6d6d..5e60b46426ee 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/read-only-first.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/read-only-first.ts @@ -51,8 +51,8 @@ export function ReadOnlyFirstFromJSONTyped(json: any, ignoreDiscriminator: boole }; } -export function ReadOnlyFirstToJSON(json: any): ReadOnlyFirst { - return ReadOnlyFirstToJSONTyped(json, false); +export function ReadOnlyFirstToJSON(value?: ReadOnlyFirst | null): any { + return ReadOnlyFirstToJSONTyped(value, false); } export function ReadOnlyFirstToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/return.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/return.ts index c0b3275a6ed8..607b7f559c55 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/return.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/return.ts @@ -46,8 +46,8 @@ export function ReturnFromJSONTyped(json: any, ignoreDiscriminator: boolean): Re }; } -export function ReturnToJSON(json: any): Return { - return ReturnToJSONTyped(json, false); +export function ReturnToJSON(value?: Return | null): any { + return ReturnToJSONTyped(value, false); } export function ReturnToJSONTyped(value?: Return | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/single-ref-type.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/single-ref-type.ts index 8247fdf99d23..1a9dd87cabc4 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/single-ref-type.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/single-ref-type.ts @@ -44,10 +44,10 @@ export function SingleRefTypeFromJSONTyped(json: any, ignoreDiscriminator: boole } export function SingleRefTypeToJSON(value?: SingleRefType | null): any { - return value as any; + return SingleRefTypeToJSONTyped(value, false); } -export function SingleRefTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): SingleRefType { +export function SingleRefTypeToJSONTyped(value?: SingleRefType | null, ignoreDiscriminator: boolean): any { return value as SingleRefType; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/special-model-name.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/special-model-name.ts index d13618509744..3e5d93c0ae5f 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/special-model-name.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/special-model-name.ts @@ -46,8 +46,8 @@ export function SpecialModelNameFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function SpecialModelNameToJSON(json: any): SpecialModelName { - return SpecialModelNameToJSONTyped(json, false); +export function SpecialModelNameToJSON(value?: SpecialModelName | null): any { + return SpecialModelNameToJSONTyped(value, false); } export function SpecialModelNameToJSONTyped(value?: SpecialModelName | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/tag.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/tag.ts index a0caf8140a38..bdce73a2fc53 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/tag.ts @@ -51,8 +51,8 @@ export function TagFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tag { }; } -export function TagToJSON(json: any): Tag { - return TagToJSONTyped(json, false); +export function TagToJSON(value?: Tag | null): any { + return TagToJSONTyped(value, false); } export function TagToJSONTyped(value?: Tag | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/test-inline-freeform-additional-properties-request.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/test-inline-freeform-additional-properties-request.ts index b11489089d02..21a4b22fd0b9 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/test-inline-freeform-additional-properties-request.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/test-inline-freeform-additional-properties-request.ts @@ -48,8 +48,8 @@ export function TestInlineFreeformAdditionalPropertiesRequestFromJSONTyped(json: }; } -export function TestInlineFreeformAdditionalPropertiesRequestToJSON(json: any): TestInlineFreeformAdditionalPropertiesRequest { - return TestInlineFreeformAdditionalPropertiesRequestToJSONTyped(json, false); +export function TestInlineFreeformAdditionalPropertiesRequestToJSON(value?: TestInlineFreeformAdditionalPropertiesRequest | null): any { + return TestInlineFreeformAdditionalPropertiesRequestToJSONTyped(value, false); } export function TestInlineFreeformAdditionalPropertiesRequestToJSONTyped(value?: TestInlineFreeformAdditionalPropertiesRequest | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/user.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/user.ts index 207ad34596fc..ff94ea078e52 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/user.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/user.ts @@ -81,8 +81,8 @@ export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User }; } -export function UserToJSON(json: any): User { - return UserToJSONTyped(json, false); +export function UserToJSON(value?: User | null): any { + return UserToJSONTyped(value, false); } export function UserToJSONTyped(value?: User | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Category.ts index cdffe07db910..8cc26245bcfa 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Category.ts @@ -51,8 +51,8 @@ export function CategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function CategoryToJSON(json: any): Category { - return CategoryToJSONTyped(json, false); +export function CategoryToJSON(value?: Category | null): any { + return CategoryToJSONTyped(value, false); } export function CategoryToJSONTyped(value?: Category | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/ModelApiResponse.ts index f89423073868..8c96852c3f93 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/ModelApiResponse.ts @@ -56,8 +56,8 @@ export function ModelApiResponseFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function ModelApiResponseToJSON(json: any): ModelApiResponse { - return ModelApiResponseToJSONTyped(json, false); +export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { + return ModelApiResponseToJSONTyped(value, false); } export function ModelApiResponseToJSONTyped(value?: ModelApiResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Order.ts index cb6b5c016de6..9d7d64d485ab 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Order.ts @@ -83,8 +83,8 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord }; } -export function OrderToJSON(json: any): Order { - return OrderToJSONTyped(json, false); +export function OrderToJSON(value?: Order | null): any { + return OrderToJSONTyped(value, false); } export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Pet.ts index 4c0cb6e73685..9cad3038ebd6 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Pet.ts @@ -100,8 +100,8 @@ export function PetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Pet { }; } -export function PetToJSON(json: any): Pet { - return PetToJSONTyped(json, false); +export function PetToJSON(value?: Pet | null): any { + return PetToJSONTyped(value, false); } export function PetToJSONTyped(value?: Pet | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Tag.ts index 80126e24919e..c18fa753e17e 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Tag.ts @@ -51,8 +51,8 @@ export function TagFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tag { }; } -export function TagToJSON(json: any): Tag { - return TagToJSONTyped(json, false); +export function TagToJSON(value?: Tag | null): any { + return TagToJSONTyped(value, false); } export function TagToJSONTyped(value?: Tag | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/User.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/User.ts index 68e240e4afb3..2203c82ee95f 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/User.ts @@ -81,8 +81,8 @@ export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User }; } -export function UserToJSON(json: any): User { - return UserToJSONTyped(json, false); +export function UserToJSON(value?: User | null): any { + return UserToJSONTyped(value, false); } export function UserToJSONTyped(value?: User | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/oneOf/models/DashedOptionOne.ts b/samples/client/petstore/typescript-fetch/builds/oneOf/models/DashedOptionOne.ts index 42b09a797522..e53b88e3a8ea 100644 --- a/samples/client/petstore/typescript-fetch/builds/oneOf/models/DashedOptionOne.ts +++ b/samples/client/petstore/typescript-fetch/builds/oneOf/models/DashedOptionOne.ts @@ -65,8 +65,8 @@ export function DashedOptionOneFromJSONTyped(json: any, ignoreDiscriminator: boo }; } -export function DashedOptionOneToJSON(json: any): DashedOptionOne { - return DashedOptionOneToJSONTyped(json, false); +export function DashedOptionOneToJSON(value?: DashedOptionOne | null): any { + return DashedOptionOneToJSONTyped(value, false); } export function DashedOptionOneToJSONTyped(value?: DashedOptionOne | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/oneOf/models/DashedOptionTwo.ts b/samples/client/petstore/typescript-fetch/builds/oneOf/models/DashedOptionTwo.ts index a7f16917f6de..3effe99fc7a5 100644 --- a/samples/client/petstore/typescript-fetch/builds/oneOf/models/DashedOptionTwo.ts +++ b/samples/client/petstore/typescript-fetch/builds/oneOf/models/DashedOptionTwo.ts @@ -65,8 +65,8 @@ export function DashedOptionTwoFromJSONTyped(json: any, ignoreDiscriminator: boo }; } -export function DashedOptionTwoToJSON(json: any): DashedOptionTwo { - return DashedOptionTwoToJSONTyped(json, false); +export function DashedOptionTwoToJSON(value?: DashedOptionTwo | null): any { + return DashedOptionTwoToJSONTyped(value, false); } export function DashedOptionTwoToJSONTyped(value?: DashedOptionTwo | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/oneOf/models/NumericSingletonEnumModel.ts b/samples/client/petstore/typescript-fetch/builds/oneOf/models/NumericSingletonEnumModel.ts index 45551ae6a917..122fe5c8736e 100644 --- a/samples/client/petstore/typescript-fetch/builds/oneOf/models/NumericSingletonEnumModel.ts +++ b/samples/client/petstore/typescript-fetch/builds/oneOf/models/NumericSingletonEnumModel.ts @@ -59,8 +59,8 @@ export function NumericSingletonEnumModelFromJSONTyped(json: any, ignoreDiscrimi }; } -export function NumericSingletonEnumModelToJSON(json: any): NumericSingletonEnumModel { - return NumericSingletonEnumModelToJSONTyped(json, false); +export function NumericSingletonEnumModelToJSON(value?: NumericSingletonEnumModel | null): any { + return NumericSingletonEnumModelToJSONTyped(value, false); } export function NumericSingletonEnumModelToJSONTyped(value?: NumericSingletonEnumModel | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/oneOf/models/OptionOne.ts b/samples/client/petstore/typescript-fetch/builds/oneOf/models/OptionOne.ts index ccfc53dfe05e..14361de1df07 100644 --- a/samples/client/petstore/typescript-fetch/builds/oneOf/models/OptionOne.ts +++ b/samples/client/petstore/typescript-fetch/builds/oneOf/models/OptionOne.ts @@ -59,8 +59,8 @@ export function OptionOneFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function OptionOneToJSON(json: any): OptionOne { - return OptionOneToJSONTyped(json, false); +export function OptionOneToJSON(value?: OptionOne | null): any { + return OptionOneToJSONTyped(value, false); } export function OptionOneToJSONTyped(value?: OptionOne | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/oneOf/models/OptionTwo.ts b/samples/client/petstore/typescript-fetch/builds/oneOf/models/OptionTwo.ts index ff75902cb6fd..fa0328a0c966 100644 --- a/samples/client/petstore/typescript-fetch/builds/oneOf/models/OptionTwo.ts +++ b/samples/client/petstore/typescript-fetch/builds/oneOf/models/OptionTwo.ts @@ -59,8 +59,8 @@ export function OptionTwoFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function OptionTwoToJSON(json: any): OptionTwo { - return OptionTwoToJSONTyped(json, false); +export function OptionTwoToJSON(value?: OptionTwo | null): any { + return OptionTwoToJSONTyped(value, false); } export function OptionTwoToJSONTyped(value?: OptionTwo | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/oneOf/models/SnakeOptionOne.ts b/samples/client/petstore/typescript-fetch/builds/oneOf/models/SnakeOptionOne.ts index d738d4d73a15..bf2c7fbcc718 100644 --- a/samples/client/petstore/typescript-fetch/builds/oneOf/models/SnakeOptionOne.ts +++ b/samples/client/petstore/typescript-fetch/builds/oneOf/models/SnakeOptionOne.ts @@ -65,8 +65,8 @@ export function SnakeOptionOneFromJSONTyped(json: any, ignoreDiscriminator: bool }; } -export function SnakeOptionOneToJSON(json: any): SnakeOptionOne { - return SnakeOptionOneToJSONTyped(json, false); +export function SnakeOptionOneToJSON(value?: SnakeOptionOne | null): any { + return SnakeOptionOneToJSONTyped(value, false); } export function SnakeOptionOneToJSONTyped(value?: SnakeOptionOne | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/oneOf/models/SnakeOptionTwo.ts b/samples/client/petstore/typescript-fetch/builds/oneOf/models/SnakeOptionTwo.ts index c8b1f9451572..bfe657f4e554 100644 --- a/samples/client/petstore/typescript-fetch/builds/oneOf/models/SnakeOptionTwo.ts +++ b/samples/client/petstore/typescript-fetch/builds/oneOf/models/SnakeOptionTwo.ts @@ -65,8 +65,8 @@ export function SnakeOptionTwoFromJSONTyped(json: any, ignoreDiscriminator: bool }; } -export function SnakeOptionTwoToJSON(json: any): SnakeOptionTwo { - return SnakeOptionTwoToJSONTyped(json, false); +export function SnakeOptionTwoToJSON(value?: SnakeOptionTwo | null): any { + return SnakeOptionTwoToJSONTyped(value, false); } export function SnakeOptionTwoToJSONTyped(value?: SnakeOptionTwo | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestA.ts b/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestA.ts index fe0962f260bb..ba289d265df5 100644 --- a/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestA.ts +++ b/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestA.ts @@ -47,8 +47,8 @@ export function TestAFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tes }; } -export function TestAToJSON(json: any): TestA { - return TestAToJSONTyped(json, false); +export function TestAToJSON(value?: TestA | null): any { + return TestAToJSONTyped(value, false); } export function TestAToJSONTyped(value?: TestA | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestArrayResponse.ts b/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestArrayResponse.ts index e496b66889d1..064a85e6448a 100644 --- a/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestArrayResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestArrayResponse.ts @@ -63,8 +63,8 @@ export function TestArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: b return {} as any; } -export function TestArrayResponseToJSON(json: any): any { - return TestArrayResponseToJSONTyped(json, false); +export function TestArrayResponseToJSON(value?: TestArrayResponse | null): any { + return TestArrayResponseToJSONTyped(value, false); } export function TestArrayResponseToJSONTyped(value?: TestArrayResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestB.ts b/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestB.ts index ec828078dec6..4648f38d12e0 100644 --- a/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestB.ts +++ b/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestB.ts @@ -47,8 +47,8 @@ export function TestBFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tes }; } -export function TestBToJSON(json: any): TestB { - return TestBToJSONTyped(json, false); +export function TestBToJSON(value?: TestB | null): any { + return TestBToJSONTyped(value, false); } export function TestBToJSONTyped(value?: TestB | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestDashedDiscriminatorResponse.ts b/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestDashedDiscriminatorResponse.ts index 260fb9107164..f87e8c5fd9fc 100644 --- a/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestDashedDiscriminatorResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestDashedDiscriminatorResponse.ts @@ -52,8 +52,8 @@ export function TestDashedDiscriminatorResponseFromJSONTyped(json: any, ignoreDi } } -export function TestDashedDiscriminatorResponseToJSON(json: any): any { - return TestDashedDiscriminatorResponseToJSONTyped(json, false); +export function TestDashedDiscriminatorResponseToJSON(value?: TestDashedDiscriminatorResponse | null): any { + return TestDashedDiscriminatorResponseToJSONTyped(value, false); } export function TestDashedDiscriminatorResponseToJSONTyped(value?: TestDashedDiscriminatorResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestDiscriminatorResponse.ts b/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestDiscriminatorResponse.ts index ae5af3d46ba8..b48db3b18feb 100644 --- a/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestDiscriminatorResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestDiscriminatorResponse.ts @@ -52,8 +52,8 @@ export function TestDiscriminatorResponseFromJSONTyped(json: any, ignoreDiscrimi } } -export function TestDiscriminatorResponseToJSON(json: any): any { - return TestDiscriminatorResponseToJSONTyped(json, false); +export function TestDiscriminatorResponseToJSON(value?: TestDiscriminatorResponse | null): any { + return TestDiscriminatorResponseToJSONTyped(value, false); } export function TestDiscriminatorResponseToJSONTyped(value?: TestDiscriminatorResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestResponse.ts b/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestResponse.ts index 031d545e20bc..7a5c1fcd6dd9 100644 --- a/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestResponse.ts @@ -57,8 +57,8 @@ export function TestResponseFromJSONTyped(json: any, ignoreDiscriminator: boolea return {} as any; } -export function TestResponseToJSON(json: any): any { - return TestResponseToJSONTyped(json, false); +export function TestResponseToJSON(value?: TestResponse | null): any { + return TestResponseToJSONTyped(value, false); } export function TestResponseToJSONTyped(value?: TestResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestSnakeCaseDiscriminatorResponse.ts b/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestSnakeCaseDiscriminatorResponse.ts index 34a297e86d47..a7ee4d65f32d 100644 --- a/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestSnakeCaseDiscriminatorResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/oneOf/models/TestSnakeCaseDiscriminatorResponse.ts @@ -52,8 +52,8 @@ export function TestSnakeCaseDiscriminatorResponseFromJSONTyped(json: any, ignor } } -export function TestSnakeCaseDiscriminatorResponseToJSON(json: any): any { - return TestSnakeCaseDiscriminatorResponseToJSONTyped(json, false); +export function TestSnakeCaseDiscriminatorResponseToJSON(value?: TestSnakeCaseDiscriminatorResponse | null): any { + return TestSnakeCaseDiscriminatorResponseToJSONTyped(value, false); } export function TestSnakeCaseDiscriminatorResponseToJSONTyped(value?: TestSnakeCaseDiscriminatorResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Category.ts index cdffe07db910..8cc26245bcfa 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Category.ts @@ -51,8 +51,8 @@ export function CategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function CategoryToJSON(json: any): Category { - return CategoryToJSONTyped(json, false); +export function CategoryToJSON(value?: Category | null): any { + return CategoryToJSONTyped(value, false); } export function CategoryToJSONTyped(value?: Category | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/ModelApiResponse.ts index f89423073868..8c96852c3f93 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/ModelApiResponse.ts @@ -56,8 +56,8 @@ export function ModelApiResponseFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function ModelApiResponseToJSON(json: any): ModelApiResponse { - return ModelApiResponseToJSONTyped(json, false); +export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { + return ModelApiResponseToJSONTyped(value, false); } export function ModelApiResponseToJSONTyped(value?: ModelApiResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Order.ts index cb6b5c016de6..9d7d64d485ab 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Order.ts @@ -83,8 +83,8 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord }; } -export function OrderToJSON(json: any): Order { - return OrderToJSONTyped(json, false); +export function OrderToJSON(value?: Order | null): any { + return OrderToJSONTyped(value, false); } export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Pet.ts index 4c0cb6e73685..9cad3038ebd6 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Pet.ts @@ -100,8 +100,8 @@ export function PetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Pet { }; } -export function PetToJSON(json: any): Pet { - return PetToJSONTyped(json, false); +export function PetToJSON(value?: Pet | null): any { + return PetToJSONTyped(value, false); } export function PetToJSONTyped(value?: Pet | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Tag.ts index 80126e24919e..c18fa753e17e 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Tag.ts @@ -51,8 +51,8 @@ export function TagFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tag { }; } -export function TagToJSON(json: any): Tag { - return TagToJSONTyped(json, false); +export function TagToJSON(value?: Tag | null): any { + return TagToJSONTyped(value, false); } export function TagToJSONTyped(value?: Tag | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/User.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/User.ts index 68e240e4afb3..2203c82ee95f 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/User.ts @@ -81,8 +81,8 @@ export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User }; } -export function UserToJSON(json: any): User { - return UserToJSONTyped(json, false); +export function UserToJSON(value?: User | null): any { + return UserToJSONTyped(value, false); } export function UserToJSONTyped(value?: User | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/BehaviorType.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/BehaviorType.ts index 0cb828571b67..e422490b5949 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/BehaviorType.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/BehaviorType.ts @@ -45,10 +45,10 @@ export function BehaviorTypeFromJSONTyped(json: any, ignoreDiscriminator: boolea } export function BehaviorTypeToJSON(value?: BehaviorType | null): any { - return value as any; + return BehaviorTypeToJSONTyped(value, false); } -export function BehaviorTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): BehaviorType { +export function BehaviorTypeToJSONTyped(value?: BehaviorType | null, ignoreDiscriminator: boolean): any { return value as BehaviorType; } diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Category.ts index cdffe07db910..8cc26245bcfa 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Category.ts @@ -51,8 +51,8 @@ export function CategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function CategoryToJSON(json: any): Category { - return CategoryToJSONTyped(json, false); +export function CategoryToJSON(value?: Category | null): any { + return CategoryToJSONTyped(value, false); } export function CategoryToJSONTyped(value?: Category | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DefaultMetaOnlyResponse.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DefaultMetaOnlyResponse.ts index 032fabdfc4b0..d208f9d06d3a 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DefaultMetaOnlyResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DefaultMetaOnlyResponse.ts @@ -55,8 +55,8 @@ export function DefaultMetaOnlyResponseFromJSONTyped(json: any, ignoreDiscrimina }; } -export function DefaultMetaOnlyResponseToJSON(json: any): DefaultMetaOnlyResponse { - return DefaultMetaOnlyResponseToJSONTyped(json, false); +export function DefaultMetaOnlyResponseToJSON(value?: DefaultMetaOnlyResponse | null): any { + return DefaultMetaOnlyResponseToJSONTyped(value, false); } export function DefaultMetaOnlyResponseToJSONTyped(value?: DefaultMetaOnlyResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DeploymentRequestStatus.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DeploymentRequestStatus.ts index 33f8b83b6c9a..48234e5370f5 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DeploymentRequestStatus.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DeploymentRequestStatus.ts @@ -54,10 +54,10 @@ export function DeploymentRequestStatusFromJSONTyped(json: any, ignoreDiscrimina } export function DeploymentRequestStatusToJSON(value?: DeploymentRequestStatus | null): any { - return value as any; + return DeploymentRequestStatusToJSONTyped(value, false); } -export function DeploymentRequestStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): DeploymentRequestStatus { +export function DeploymentRequestStatusToJSONTyped(value?: DeploymentRequestStatus | null, ignoreDiscriminator: boolean): any { return value as DeploymentRequestStatus; } diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ErrorCode.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ErrorCode.ts index 43db96d9b1aa..3e431ed9c4c9 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ErrorCode.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ErrorCode.ts @@ -60,10 +60,10 @@ export function ErrorCodeFromJSONTyped(json: any, ignoreDiscriminator: boolean): } export function ErrorCodeToJSON(value?: ErrorCode | null): any { - return value as any; + return ErrorCodeToJSONTyped(value, false); } -export function ErrorCodeToJSONTyped(value: any, ignoreDiscriminator: boolean): ErrorCode { +export function ErrorCodeToJSONTyped(value?: ErrorCode | null, ignoreDiscriminator: boolean): any { return value as ErrorCode; } diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/FindPetsByStatusResponse.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/FindPetsByStatusResponse.ts index 3dd03e912526..0c5c0c793c0e 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/FindPetsByStatusResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/FindPetsByStatusResponse.ts @@ -67,8 +67,8 @@ export function FindPetsByStatusResponseFromJSONTyped(json: any, ignoreDiscrimin }; } -export function FindPetsByStatusResponseToJSON(json: any): FindPetsByStatusResponse { - return FindPetsByStatusResponseToJSONTyped(json, false); +export function FindPetsByStatusResponseToJSON(value?: FindPetsByStatusResponse | null): any { + return FindPetsByStatusResponseToJSONTyped(value, false); } export function FindPetsByStatusResponseToJSONTyped(value?: FindPetsByStatusResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/FindPetsByUserResponse.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/FindPetsByUserResponse.ts index 575ab1f0413e..d91b5feb67cc 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/FindPetsByUserResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/FindPetsByUserResponse.ts @@ -67,8 +67,8 @@ export function FindPetsByUserResponseFromJSONTyped(json: any, ignoreDiscriminat }; } -export function FindPetsByUserResponseToJSON(json: any): FindPetsByUserResponse { - return FindPetsByUserResponseToJSONTyped(json, false); +export function FindPetsByUserResponseToJSON(value?: FindPetsByUserResponse | null): any { + return FindPetsByUserResponseToJSONTyped(value, false); } export function FindPetsByUserResponseToJSONTyped(value?: FindPetsByUserResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetBehaviorPermissionsResponse.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetBehaviorPermissionsResponse.ts index 3fbab7b0499f..ca22eae68123 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetBehaviorPermissionsResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetBehaviorPermissionsResponse.ts @@ -60,8 +60,8 @@ export function GetBehaviorPermissionsResponseFromJSONTyped(json: any, ignoreDis }; } -export function GetBehaviorPermissionsResponseToJSON(json: any): GetBehaviorPermissionsResponse { - return GetBehaviorPermissionsResponseToJSONTyped(json, false); +export function GetBehaviorPermissionsResponseToJSON(value?: GetBehaviorPermissionsResponse | null): any { + return GetBehaviorPermissionsResponseToJSONTyped(value, false); } export function GetBehaviorPermissionsResponseToJSONTyped(value?: GetBehaviorPermissionsResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetBehaviorTypeResponse.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetBehaviorTypeResponse.ts index a7ac60073220..8eba6633be42 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetBehaviorTypeResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetBehaviorTypeResponse.ts @@ -69,8 +69,8 @@ export function GetBehaviorTypeResponseFromJSONTyped(json: any, ignoreDiscrimina }; } -export function GetBehaviorTypeResponseToJSON(json: any): GetBehaviorTypeResponse { - return GetBehaviorTypeResponseToJSONTyped(json, false); +export function GetBehaviorTypeResponseToJSON(value?: GetBehaviorTypeResponse | null): any { + return GetBehaviorTypeResponseToJSONTyped(value, false); } export function GetBehaviorTypeResponseToJSONTyped(value?: GetBehaviorTypeResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetMatchingPartsResponse.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetMatchingPartsResponse.ts index 1545eb7cb80a..eb4d6bdce7f6 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetMatchingPartsResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetMatchingPartsResponse.ts @@ -67,8 +67,8 @@ export function GetMatchingPartsResponseFromJSONTyped(json: any, ignoreDiscrimin }; } -export function GetMatchingPartsResponseToJSON(json: any): GetMatchingPartsResponse { - return GetMatchingPartsResponseToJSONTyped(json, false); +export function GetMatchingPartsResponseToJSON(value?: GetMatchingPartsResponse | null): any { + return GetMatchingPartsResponseToJSONTyped(value, false); } export function GetMatchingPartsResponseToJSONTyped(value?: GetMatchingPartsResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetPetPartTypeResponse.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetPetPartTypeResponse.ts index d70ad8ee64d9..98610efd8b8a 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetPetPartTypeResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetPetPartTypeResponse.ts @@ -69,8 +69,8 @@ export function GetPetPartTypeResponseFromJSONTyped(json: any, ignoreDiscriminat }; } -export function GetPetPartTypeResponseToJSON(json: any): GetPetPartTypeResponse { - return GetPetPartTypeResponseToJSONTyped(json, false); +export function GetPetPartTypeResponseToJSON(value?: GetPetPartTypeResponse | null): any { + return GetPetPartTypeResponseToJSONTyped(value, false); } export function GetPetPartTypeResponseToJSONTyped(value?: GetPetPartTypeResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ItemId.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ItemId.ts index 18103ba2ee18..20d51fef49f7 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ItemId.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ItemId.ts @@ -53,8 +53,8 @@ export function ItemIdFromJSONTyped(json: any, ignoreDiscriminator: boolean): It }; } -export function ItemIdToJSON(json: any): ItemId { - return ItemIdToJSONTyped(json, false); +export function ItemIdToJSON(value?: ItemId | null): any { + return ItemIdToJSONTyped(value, false); } export function ItemIdToJSONTyped(value?: ItemId | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/MatchingParts.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/MatchingParts.ts index d323c477e85d..4c10c4588eb3 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/MatchingParts.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/MatchingParts.ts @@ -61,8 +61,8 @@ export function MatchingPartsFromJSONTyped(json: any, ignoreDiscriminator: boole }; } -export function MatchingPartsToJSON(json: any): MatchingParts { - return MatchingPartsToJSONTyped(json, false); +export function MatchingPartsToJSON(value?: MatchingParts | null): any { + return MatchingPartsToJSONTyped(value, false); } export function MatchingPartsToJSONTyped(value?: MatchingParts | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ModelApiResponse.ts index f89423073868..8c96852c3f93 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ModelApiResponse.ts @@ -56,8 +56,8 @@ export function ModelApiResponseFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function ModelApiResponseToJSON(json: any): ModelApiResponse { - return ModelApiResponseToJSONTyped(json, false); +export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { + return ModelApiResponseToJSONTyped(value, false); } export function ModelApiResponseToJSONTyped(value?: ModelApiResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ModelError.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ModelError.ts index 6dae6855c8a5..5b4b45987a69 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ModelError.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ModelError.ts @@ -70,8 +70,8 @@ export function ModelErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean) }; } -export function ModelErrorToJSON(json: any): ModelError { - return ModelErrorToJSONTyped(json, false); +export function ModelErrorToJSON(value?: ModelError | null): any { + return ModelErrorToJSONTyped(value, false); } export function ModelErrorToJSONTyped(value?: ModelError | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Order.ts index cb6b5c016de6..9d7d64d485ab 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Order.ts @@ -83,8 +83,8 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord }; } -export function OrderToJSON(json: any): Order { - return OrderToJSONTyped(json, false); +export function OrderToJSON(value?: Order | null): any { + return OrderToJSONTyped(value, false); } export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Part.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Part.ts index 043bbec9d1cc..1e811dd40a1c 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Part.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Part.ts @@ -53,8 +53,8 @@ export function PartFromJSONTyped(json: any, ignoreDiscriminator: boolean): Part }; } -export function PartToJSON(json: any): Part { - return PartToJSONTyped(json, false); +export function PartToJSON(value?: Part | null): any { + return PartToJSONTyped(value, false); } export function PartToJSONTyped(value?: Part | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Pet.ts index 3d20dc56c6c8..7ce1e1171510 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Pet.ts @@ -201,8 +201,8 @@ export function PetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Pet { }; } -export function PetToJSON(json: any): Pet { - return PetToJSONTyped(json, false); +export function PetToJSON(value?: Pet | null): any { + return PetToJSONTyped(value, false); } export function PetToJSONTyped(value?: Pet | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/PetPartType.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/PetPartType.ts index 40a214555e6a..404ef4032c7d 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/PetPartType.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/PetPartType.ts @@ -45,10 +45,10 @@ export function PetPartTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean } export function PetPartTypeToJSON(value?: PetPartType | null): any { - return value as any; + return PetPartTypeToJSONTyped(value, false); } -export function PetPartTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): PetPartType { +export function PetPartTypeToJSONTyped(value?: PetPartType | null, ignoreDiscriminator: boolean): any { return value as PetPartType; } diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/PetRegionsResponse.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/PetRegionsResponse.ts index c769237d5e3a..a07dfce1c286 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/PetRegionsResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/PetRegionsResponse.ts @@ -60,8 +60,8 @@ export function PetRegionsResponseFromJSONTyped(json: any, ignoreDiscriminator: }; } -export function PetRegionsResponseToJSON(json: any): PetRegionsResponse { - return PetRegionsResponseToJSONTyped(json, false); +export function PetRegionsResponseToJSON(value?: PetRegionsResponse | null): any { + return PetRegionsResponseToJSONTyped(value, false); } export function PetRegionsResponseToJSONTyped(value?: PetRegionsResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ResponseMeta.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ResponseMeta.ts index df38da1be6e4..5750c1156b7b 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ResponseMeta.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ResponseMeta.ts @@ -112,8 +112,8 @@ export function ResponseMetaFromJSONTyped(json: any, ignoreDiscriminator: boolea }; } -export function ResponseMetaToJSON(json: any): ResponseMeta { - return ResponseMetaToJSONTyped(json, false); +export function ResponseMetaToJSON(value?: ResponseMeta | null): any { + return ResponseMetaToJSONTyped(value, false); } export function ResponseMetaToJSONTyped(value?: ResponseMeta | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Tag.ts index 80126e24919e..c18fa753e17e 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Tag.ts @@ -51,8 +51,8 @@ export function TagFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tag { }; } -export function TagToJSON(json: any): Tag { - return TagToJSONTyped(json, false); +export function TagToJSON(value?: Tag | null): any { + return TagToJSONTyped(value, false); } export function TagToJSONTyped(value?: Tag | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/User.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/User.ts index ce78194e47f1..01240b7255eb 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/User.ts @@ -93,8 +93,8 @@ export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User }; } -export function UserToJSON(json: any): User { - return UserToJSONTyped(json, false); +export function UserToJSON(value?: User | null): any { + return UserToJSONTyped(value, false); } export function UserToJSONTyped(value?: User | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/WarningCode.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/WarningCode.ts index 16b7bb37e969..8e923924817a 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/WarningCode.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/WarningCode.ts @@ -45,10 +45,10 @@ export function WarningCodeFromJSONTyped(json: any, ignoreDiscriminator: boolean } export function WarningCodeToJSON(value?: WarningCode | null): any { - return value as any; + return WarningCodeToJSONTyped(value, false); } -export function WarningCodeToJSONTyped(value: any, ignoreDiscriminator: boolean): WarningCode { +export function WarningCodeToJSONTyped(value?: WarningCode | null, ignoreDiscriminator: boolean): any { return value as WarningCode; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/AdditionalPropertiesClass.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/AdditionalPropertiesClass.ts index 1db920000504..19da6d22c1d6 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/AdditionalPropertiesClass.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/AdditionalPropertiesClass.ts @@ -51,8 +51,8 @@ export function AdditionalPropertiesClassFromJSONTyped(json: any, ignoreDiscrimi }; } -export function AdditionalPropertiesClassToJSON(json: any): AdditionalPropertiesClass { - return AdditionalPropertiesClassToJSONTyped(json, false); +export function AdditionalPropertiesClassToJSON(value?: AdditionalPropertiesClass | null): any { + return AdditionalPropertiesClassToJSONTyped(value, false); } export function AdditionalPropertiesClassToJSONTyped(value?: AdditionalPropertiesClass | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/AllOfWithSingleRef.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/AllOfWithSingleRef.ts index 743b9141a1af..d85fd493ea77 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/AllOfWithSingleRef.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/AllOfWithSingleRef.ts @@ -61,8 +61,8 @@ export function AllOfWithSingleRefFromJSONTyped(json: any, ignoreDiscriminator: }; } -export function AllOfWithSingleRefToJSON(json: any): AllOfWithSingleRef { - return AllOfWithSingleRefToJSONTyped(json, false); +export function AllOfWithSingleRefToJSON(value?: AllOfWithSingleRef | null): any { + return AllOfWithSingleRefToJSONTyped(value, false); } export function AllOfWithSingleRefToJSONTyped(value?: AllOfWithSingleRef | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Animal.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Animal.ts index 3b1b2fcdc204..ceb3d83a1251 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Animal.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Animal.ts @@ -63,8 +63,8 @@ export function AnimalFromJSONTyped(json: any, ignoreDiscriminator: boolean): An }; } -export function AnimalToJSON(json: any): Animal { - return AnimalToJSONTyped(json, false); +export function AnimalToJSON(value?: Animal | null): any { + return AnimalToJSONTyped(value, false); } export function AnimalToJSONTyped(value?: Animal | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ArrayOfArrayOfNumberOnly.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ArrayOfArrayOfNumberOnly.ts index bce79e8d3b63..9a12b6b11247 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ArrayOfArrayOfNumberOnly.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ArrayOfArrayOfNumberOnly.ts @@ -46,8 +46,8 @@ export function ArrayOfArrayOfNumberOnlyFromJSONTyped(json: any, ignoreDiscrimin }; } -export function ArrayOfArrayOfNumberOnlyToJSON(json: any): ArrayOfArrayOfNumberOnly { - return ArrayOfArrayOfNumberOnlyToJSONTyped(json, false); +export function ArrayOfArrayOfNumberOnlyToJSON(value?: ArrayOfArrayOfNumberOnly | null): any { + return ArrayOfArrayOfNumberOnlyToJSONTyped(value, false); } export function ArrayOfArrayOfNumberOnlyToJSONTyped(value?: ArrayOfArrayOfNumberOnly | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ArrayOfNumberOnly.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ArrayOfNumberOnly.ts index 8640a0d74aa5..cd015cb0f705 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ArrayOfNumberOnly.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ArrayOfNumberOnly.ts @@ -46,8 +46,8 @@ export function ArrayOfNumberOnlyFromJSONTyped(json: any, ignoreDiscriminator: b }; } -export function ArrayOfNumberOnlyToJSON(json: any): ArrayOfNumberOnly { - return ArrayOfNumberOnlyToJSONTyped(json, false); +export function ArrayOfNumberOnlyToJSON(value?: ArrayOfNumberOnly | null): any { + return ArrayOfNumberOnlyToJSONTyped(value, false); } export function ArrayOfNumberOnlyToJSONTyped(value?: ArrayOfNumberOnly | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ArrayTest.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ArrayTest.ts index 002052b417d3..3667da3dd23c 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ArrayTest.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ArrayTest.ts @@ -64,8 +64,8 @@ export function ArrayTestFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function ArrayTestToJSON(json: any): ArrayTest { - return ArrayTestToJSONTyped(json, false); +export function ArrayTestToJSON(value?: ArrayTest | null): any { + return ArrayTestToJSONTyped(value, false); } export function ArrayTestToJSONTyped(value?: ArrayTest | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Capitalization.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Capitalization.ts index de75ac5926d6..2d3e2b74cae6 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Capitalization.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Capitalization.ts @@ -72,8 +72,8 @@ export function CapitalizationFromJSONTyped(json: any, ignoreDiscriminator: bool }; } -export function CapitalizationToJSON(json: any): Capitalization { - return CapitalizationToJSONTyped(json, false); +export function CapitalizationToJSON(value?: Capitalization | null): any { + return CapitalizationToJSONTyped(value, false); } export function CapitalizationToJSONTyped(value?: Capitalization | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Cat.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Cat.ts index 33efae9ddcf9..53498d199a09 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Cat.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Cat.ts @@ -54,8 +54,8 @@ export function CatFromJSONTyped(json: any, ignoreDiscriminator: boolean): Cat { }; } -export function CatToJSON(json: any): Cat { - return CatToJSONTyped(json, false); +export function CatToJSON(value?: Cat | null): any { + return CatToJSONTyped(value, false); } export function CatToJSONTyped(value?: Cat | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Category.ts index 04cd593f2dce..23c61531dc15 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Category.ts @@ -52,8 +52,8 @@ export function CategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function CategoryToJSON(json: any): Category { - return CategoryToJSONTyped(json, false); +export function CategoryToJSON(value?: Category | null): any { + return CategoryToJSONTyped(value, false); } export function CategoryToJSONTyped(value?: Category | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ClassModel.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ClassModel.ts index cef4c58640ce..74e4c38e231f 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ClassModel.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ClassModel.ts @@ -46,8 +46,8 @@ export function ClassModelFromJSONTyped(json: any, ignoreDiscriminator: boolean) }; } -export function ClassModelToJSON(json: any): ClassModel { - return ClassModelToJSONTyped(json, false); +export function ClassModelToJSON(value?: ClassModel | null): any { + return ClassModelToJSONTyped(value, false); } export function ClassModelToJSONTyped(value?: ClassModel | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Client.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Client.ts index 7f353720b90d..31e75cc33894 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Client.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Client.ts @@ -46,8 +46,8 @@ export function ClientFromJSONTyped(json: any, ignoreDiscriminator: boolean): Cl }; } -export function ClientToJSON(json: any): Client { - return ClientToJSONTyped(json, false); +export function ClientToJSON(value?: Client | null): any { + return ClientToJSONTyped(value, false); } export function ClientToJSONTyped(value?: Client | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/DeprecatedObject.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/DeprecatedObject.ts index 14623160e258..85b6a332d0d4 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/DeprecatedObject.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/DeprecatedObject.ts @@ -46,8 +46,8 @@ export function DeprecatedObjectFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function DeprecatedObjectToJSON(json: any): DeprecatedObject { - return DeprecatedObjectToJSONTyped(json, false); +export function DeprecatedObjectToJSON(value?: DeprecatedObject | null): any { + return DeprecatedObjectToJSONTyped(value, false); } export function DeprecatedObjectToJSONTyped(value?: DeprecatedObject | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Dog.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Dog.ts index 967f5cf772f2..76718733e13d 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Dog.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Dog.ts @@ -54,8 +54,8 @@ export function DogFromJSONTyped(json: any, ignoreDiscriminator: boolean): Dog { }; } -export function DogToJSON(json: any): Dog { - return DogToJSONTyped(json, false); +export function DogToJSON(value?: Dog | null): any { + return DogToJSONTyped(value, false); } export function DogToJSONTyped(value?: Dog | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/EnumArrays.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/EnumArrays.ts index 84cd87dd1408..5bdb73afb842 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/EnumArrays.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/EnumArrays.ts @@ -71,8 +71,8 @@ export function EnumArraysFromJSONTyped(json: any, ignoreDiscriminator: boolean) }; } -export function EnumArraysToJSON(json: any): EnumArrays { - return EnumArraysToJSONTyped(json, false); +export function EnumArraysToJSON(value?: EnumArrays | null): any { + return EnumArraysToJSONTyped(value, false); } export function EnumArraysToJSONTyped(value?: EnumArrays | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/EnumClass.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/EnumClass.ts index 6878b8591431..273d379ae560 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/EnumClass.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/EnumClass.ts @@ -45,10 +45,10 @@ export function EnumClassFromJSONTyped(json: any, ignoreDiscriminator: boolean): } export function EnumClassToJSON(value?: EnumClass | null): any { - return value as any; + return EnumClassToJSONTyped(value, false); } -export function EnumClassToJSONTyped(value: any, ignoreDiscriminator: boolean): EnumClass { +export function EnumClassToJSONTyped(value?: EnumClass | null, ignoreDiscriminator: boolean): any { return value as EnumClass; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/EnumTest.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/EnumTest.ts index 4c27767e593c..6b2c4e554beb 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/EnumTest.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/EnumTest.ts @@ -151,8 +151,8 @@ export function EnumTestFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function EnumTestToJSON(json: any): EnumTest { - return EnumTestToJSONTyped(json, false); +export function EnumTestToJSON(value?: EnumTest | null): any { + return EnumTestToJSONTyped(value, false); } export function EnumTestToJSONTyped(value?: EnumTest | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/FakeBigDecimalMap200Response.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/FakeBigDecimalMap200Response.ts index ed87ea529d3d..e54459654338 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/FakeBigDecimalMap200Response.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/FakeBigDecimalMap200Response.ts @@ -51,8 +51,8 @@ export function FakeBigDecimalMap200ResponseFromJSONTyped(json: any, ignoreDiscr }; } -export function FakeBigDecimalMap200ResponseToJSON(json: any): FakeBigDecimalMap200Response { - return FakeBigDecimalMap200ResponseToJSONTyped(json, false); +export function FakeBigDecimalMap200ResponseToJSON(value?: FakeBigDecimalMap200Response | null): any { + return FakeBigDecimalMap200ResponseToJSONTyped(value, false); } export function FakeBigDecimalMap200ResponseToJSONTyped(value?: FakeBigDecimalMap200Response | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/FileSchemaTestClass.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/FileSchemaTestClass.ts index 4dcd0b2ed2c4..8659c90dd9e0 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/FileSchemaTestClass.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/FileSchemaTestClass.ts @@ -51,8 +51,8 @@ export function FileSchemaTestClassFromJSONTyped(json: any, ignoreDiscriminator: }; } -export function FileSchemaTestClassToJSON(json: any): FileSchemaTestClass { - return FileSchemaTestClassToJSONTyped(json, false); +export function FileSchemaTestClassToJSON(value?: FileSchemaTestClass | null): any { + return FileSchemaTestClassToJSONTyped(value, false); } export function FileSchemaTestClassToJSONTyped(value?: FileSchemaTestClass | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Foo.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Foo.ts index 843b44d30811..df3ebe8ab6a4 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Foo.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Foo.ts @@ -46,8 +46,8 @@ export function FooFromJSONTyped(json: any, ignoreDiscriminator: boolean): Foo { }; } -export function FooToJSON(json: any): Foo { - return FooToJSONTyped(json, false); +export function FooToJSON(value?: Foo | null): any { + return FooToJSONTyped(value, false); } export function FooToJSONTyped(value?: Foo | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/FooGetDefaultResponse.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/FooGetDefaultResponse.ts index d12c4924c2f3..581d47f74802 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/FooGetDefaultResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/FooGetDefaultResponse.ts @@ -54,8 +54,8 @@ export function FooGetDefaultResponseFromJSONTyped(json: any, ignoreDiscriminato }; } -export function FooGetDefaultResponseToJSON(json: any): FooGetDefaultResponse { - return FooGetDefaultResponseToJSONTyped(json, false); +export function FooGetDefaultResponseToJSON(value?: FooGetDefaultResponse | null): any { + return FooGetDefaultResponseToJSONTyped(value, false); } export function FooGetDefaultResponseToJSONTyped(value?: FooGetDefaultResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/FormatTest.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/FormatTest.ts index 047bde78c359..30ac6d577bb7 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/FormatTest.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/FormatTest.ts @@ -125,8 +125,8 @@ export function FormatTestFromJSONTyped(json: any, ignoreDiscriminator: boolean) }; } -export function FormatTestToJSON(json: any): FormatTest { - return FormatTestToJSONTyped(json, false); +export function FormatTestToJSON(value?: FormatTest | null): any { + return FormatTestToJSONTyped(value, false); } export function FormatTestToJSONTyped(value?: FormatTest | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/HasOnlyReadOnly.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/HasOnlyReadOnly.ts index b81e989b86d4..a604d76c7065 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/HasOnlyReadOnly.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/HasOnlyReadOnly.ts @@ -51,8 +51,8 @@ export function HasOnlyReadOnlyFromJSONTyped(json: any, ignoreDiscriminator: boo }; } -export function HasOnlyReadOnlyToJSON(json: any): HasOnlyReadOnly { - return HasOnlyReadOnlyToJSONTyped(json, false); +export function HasOnlyReadOnlyToJSON(value?: HasOnlyReadOnly | null): any { + return HasOnlyReadOnlyToJSONTyped(value, false); } export function HasOnlyReadOnlyToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/HealthCheckResult.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/HealthCheckResult.ts index 520e91e780bd..56d910433f97 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/HealthCheckResult.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/HealthCheckResult.ts @@ -46,8 +46,8 @@ export function HealthCheckResultFromJSONTyped(json: any, ignoreDiscriminator: b }; } -export function HealthCheckResultToJSON(json: any): HealthCheckResult { - return HealthCheckResultToJSONTyped(json, false); +export function HealthCheckResultToJSON(value?: HealthCheckResult | null): any { + return HealthCheckResultToJSONTyped(value, false); } export function HealthCheckResultToJSONTyped(value?: HealthCheckResult | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/List.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/List.ts index a51be9f76c2c..c130073e74ba 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/List.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/List.ts @@ -46,8 +46,8 @@ export function ListFromJSONTyped(json: any, ignoreDiscriminator: boolean): List }; } -export function ListToJSON(json: any): List { - return ListToJSONTyped(json, false); +export function ListToJSON(value?: List | null): any { + return ListToJSONTyped(value, false); } export function ListToJSONTyped(value?: List | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/MapTest.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/MapTest.ts index 18ea456c8951..5bfe9c02b1d4 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/MapTest.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/MapTest.ts @@ -72,8 +72,8 @@ export function MapTestFromJSONTyped(json: any, ignoreDiscriminator: boolean): M }; } -export function MapTestToJSON(json: any): MapTest { - return MapTestToJSONTyped(json, false); +export function MapTestToJSON(value?: MapTest | null): any { + return MapTestToJSONTyped(value, false); } export function MapTestToJSONTyped(value?: MapTest | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/MixedPropertiesAndAdditionalPropertiesClass.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/MixedPropertiesAndAdditionalPropertiesClass.ts index cb7a2989f0c9..a853f8a1b72c 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/MixedPropertiesAndAdditionalPropertiesClass.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/MixedPropertiesAndAdditionalPropertiesClass.ts @@ -64,8 +64,8 @@ export function MixedPropertiesAndAdditionalPropertiesClassFromJSONTyped(json: a }; } -export function MixedPropertiesAndAdditionalPropertiesClassToJSON(json: any): MixedPropertiesAndAdditionalPropertiesClass { - return MixedPropertiesAndAdditionalPropertiesClassToJSONTyped(json, false); +export function MixedPropertiesAndAdditionalPropertiesClassToJSON(value?: MixedPropertiesAndAdditionalPropertiesClass | null): any { + return MixedPropertiesAndAdditionalPropertiesClassToJSONTyped(value, false); } export function MixedPropertiesAndAdditionalPropertiesClassToJSONTyped(value?: MixedPropertiesAndAdditionalPropertiesClass | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Model200Response.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Model200Response.ts index 62f11d4d4e5a..494b8b5cd30c 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Model200Response.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Model200Response.ts @@ -51,8 +51,8 @@ export function Model200ResponseFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function Model200ResponseToJSON(json: any): Model200Response { - return Model200ResponseToJSONTyped(json, false); +export function Model200ResponseToJSON(value?: Model200Response | null): any { + return Model200ResponseToJSONTyped(value, false); } export function Model200ResponseToJSONTyped(value?: Model200Response | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ModelApiResponse.ts index 8e8b92dc4228..58f9169c3d22 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ModelApiResponse.ts @@ -56,8 +56,8 @@ export function ModelApiResponseFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function ModelApiResponseToJSON(json: any): ModelApiResponse { - return ModelApiResponseToJSONTyped(json, false); +export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { + return ModelApiResponseToJSONTyped(value, false); } export function ModelApiResponseToJSONTyped(value?: ModelApiResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ModelFile.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ModelFile.ts index e823e6cd03cc..7405256c805e 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ModelFile.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ModelFile.ts @@ -46,8 +46,8 @@ export function ModelFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function ModelFileToJSON(json: any): ModelFile { - return ModelFileToJSONTyped(json, false); +export function ModelFileToJSON(value?: ModelFile | null): any { + return ModelFileToJSONTyped(value, false); } export function ModelFileToJSONTyped(value?: ModelFile | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Name.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Name.ts index 4b7ed42911fb..1b839915e3d5 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Name.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Name.ts @@ -62,8 +62,8 @@ export function NameFromJSONTyped(json: any, ignoreDiscriminator: boolean): Name }; } -export function NameToJSON(json: any): Name { - return NameToJSONTyped(json, false); +export function NameToJSON(value?: Name | null): any { + return NameToJSONTyped(value, false); } export function NameToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/NullableClass.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/NullableClass.ts index 2899b9f6f3d6..030d8419d517 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/NullableClass.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/NullableClass.ts @@ -103,8 +103,8 @@ export function NullableClassFromJSONTyped(json: any, ignoreDiscriminator: boole }; } -export function NullableClassToJSON(json: any): NullableClass { - return NullableClassToJSONTyped(json, false); +export function NullableClassToJSON(value?: NullableClass | null): any { + return NullableClassToJSONTyped(value, false); } export function NullableClassToJSONTyped(value?: NullableClass | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/NumberOnly.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/NumberOnly.ts index b899ac447f22..f8691bac9488 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/NumberOnly.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/NumberOnly.ts @@ -46,8 +46,8 @@ export function NumberOnlyFromJSONTyped(json: any, ignoreDiscriminator: boolean) }; } -export function NumberOnlyToJSON(json: any): NumberOnly { - return NumberOnlyToJSONTyped(json, false); +export function NumberOnlyToJSON(value?: NumberOnly | null): any { + return NumberOnlyToJSONTyped(value, false); } export function NumberOnlyToJSONTyped(value?: NumberOnly | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ObjectWithDeprecatedFields.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ObjectWithDeprecatedFields.ts index 73a8eb403427..e80025077768 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ObjectWithDeprecatedFields.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ObjectWithDeprecatedFields.ts @@ -72,8 +72,8 @@ export function ObjectWithDeprecatedFieldsFromJSONTyped(json: any, ignoreDiscrim }; } -export function ObjectWithDeprecatedFieldsToJSON(json: any): ObjectWithDeprecatedFields { - return ObjectWithDeprecatedFieldsToJSONTyped(json, false); +export function ObjectWithDeprecatedFieldsToJSON(value?: ObjectWithDeprecatedFields | null): any { + return ObjectWithDeprecatedFieldsToJSONTyped(value, false); } export function ObjectWithDeprecatedFieldsToJSONTyped(value?: ObjectWithDeprecatedFields | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Order.ts index 1d32da2609f6..1ed4fcf634c0 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Order.ts @@ -83,8 +83,8 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord }; } -export function OrderToJSON(json: any): Order { - return OrderToJSONTyped(json, false); +export function OrderToJSON(value?: Order | null): any { + return OrderToJSONTyped(value, false); } export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterComposite.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterComposite.ts index f3375c3124f7..1a5e57caf2cb 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterComposite.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterComposite.ts @@ -56,8 +56,8 @@ export function OuterCompositeFromJSONTyped(json: any, ignoreDiscriminator: bool }; } -export function OuterCompositeToJSON(json: any): OuterComposite { - return OuterCompositeToJSONTyped(json, false); +export function OuterCompositeToJSON(value?: OuterComposite | null): any { + return OuterCompositeToJSONTyped(value, false); } export function OuterCompositeToJSONTyped(value?: OuterComposite | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnum.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnum.ts index 4be9edeac589..b4aca38af101 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnum.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnum.ts @@ -45,10 +45,10 @@ export function OuterEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): } export function OuterEnumToJSON(value?: OuterEnum | null): any { - return value as any; + return OuterEnumToJSONTyped(value, false); } -export function OuterEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): OuterEnum { +export function OuterEnumToJSONTyped(value?: OuterEnum | null, ignoreDiscriminator: boolean): any { return value as OuterEnum; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumDefaultValue.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumDefaultValue.ts index de44a7878120..45332ed0d7f9 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumDefaultValue.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumDefaultValue.ts @@ -45,10 +45,10 @@ export function OuterEnumDefaultValueFromJSONTyped(json: any, ignoreDiscriminato } export function OuterEnumDefaultValueToJSON(value?: OuterEnumDefaultValue | null): any { - return value as any; + return OuterEnumDefaultValueToJSONTyped(value, false); } -export function OuterEnumDefaultValueToJSONTyped(value: any, ignoreDiscriminator: boolean): OuterEnumDefaultValue { +export function OuterEnumDefaultValueToJSONTyped(value?: OuterEnumDefaultValue | null, ignoreDiscriminator: boolean): any { return value as OuterEnumDefaultValue; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumInteger.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumInteger.ts index b899dc358ea0..46caa611b086 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumInteger.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumInteger.ts @@ -45,10 +45,10 @@ export function OuterEnumIntegerFromJSONTyped(json: any, ignoreDiscriminator: bo } export function OuterEnumIntegerToJSON(value?: OuterEnumInteger | null): any { - return value as any; + return OuterEnumIntegerToJSONTyped(value, false); } -export function OuterEnumIntegerToJSONTyped(value: any, ignoreDiscriminator: boolean): OuterEnumInteger { +export function OuterEnumIntegerToJSONTyped(value?: OuterEnumInteger | null, ignoreDiscriminator: boolean): any { return value as OuterEnumInteger; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumIntegerDefaultValue.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumIntegerDefaultValue.ts index 1a6941699214..ad18b0b13b56 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumIntegerDefaultValue.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumIntegerDefaultValue.ts @@ -45,10 +45,10 @@ export function OuterEnumIntegerDefaultValueFromJSONTyped(json: any, ignoreDiscr } export function OuterEnumIntegerDefaultValueToJSON(value?: OuterEnumIntegerDefaultValue | null): any { - return value as any; + return OuterEnumIntegerDefaultValueToJSONTyped(value, false); } -export function OuterEnumIntegerDefaultValueToJSONTyped(value: any, ignoreDiscriminator: boolean): OuterEnumIntegerDefaultValue { +export function OuterEnumIntegerDefaultValueToJSONTyped(value?: OuterEnumIntegerDefaultValue | null, ignoreDiscriminator: boolean): any { return value as OuterEnumIntegerDefaultValue; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterObjectWithEnumProperty.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterObjectWithEnumProperty.ts index 420c964cd78b..c9e3ba43d8f5 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterObjectWithEnumProperty.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterObjectWithEnumProperty.ts @@ -57,8 +57,8 @@ export function OuterObjectWithEnumPropertyFromJSONTyped(json: any, ignoreDiscri }; } -export function OuterObjectWithEnumPropertyToJSON(json: any): OuterObjectWithEnumProperty { - return OuterObjectWithEnumPropertyToJSONTyped(json, false); +export function OuterObjectWithEnumPropertyToJSON(value?: OuterObjectWithEnumProperty | null): any { + return OuterObjectWithEnumPropertyToJSONTyped(value, false); } export function OuterObjectWithEnumPropertyToJSONTyped(value?: OuterObjectWithEnumProperty | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Pet.ts index 20d21e2f1aad..9b9d90757ff8 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Pet.ts @@ -100,8 +100,8 @@ export function PetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Pet { }; } -export function PetToJSON(json: any): Pet { - return PetToJSONTyped(json, false); +export function PetToJSON(value?: Pet | null): any { + return PetToJSONTyped(value, false); } export function PetToJSONTyped(value?: Pet | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ReadOnlyFirst.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ReadOnlyFirst.ts index 3a80d04b6d6d..5e60b46426ee 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ReadOnlyFirst.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/ReadOnlyFirst.ts @@ -51,8 +51,8 @@ export function ReadOnlyFirstFromJSONTyped(json: any, ignoreDiscriminator: boole }; } -export function ReadOnlyFirstToJSON(json: any): ReadOnlyFirst { - return ReadOnlyFirstToJSONTyped(json, false); +export function ReadOnlyFirstToJSON(value?: ReadOnlyFirst | null): any { + return ReadOnlyFirstToJSONTyped(value, false); } export function ReadOnlyFirstToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Return.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Return.ts index c0b3275a6ed8..607b7f559c55 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Return.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Return.ts @@ -46,8 +46,8 @@ export function ReturnFromJSONTyped(json: any, ignoreDiscriminator: boolean): Re }; } -export function ReturnToJSON(json: any): Return { - return ReturnToJSONTyped(json, false); +export function ReturnToJSON(value?: Return | null): any { + return ReturnToJSONTyped(value, false); } export function ReturnToJSONTyped(value?: Return | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/SingleRefType.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/SingleRefType.ts index 8247fdf99d23..1a9dd87cabc4 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/SingleRefType.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/SingleRefType.ts @@ -44,10 +44,10 @@ export function SingleRefTypeFromJSONTyped(json: any, ignoreDiscriminator: boole } export function SingleRefTypeToJSON(value?: SingleRefType | null): any { - return value as any; + return SingleRefTypeToJSONTyped(value, false); } -export function SingleRefTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): SingleRefType { +export function SingleRefTypeToJSONTyped(value?: SingleRefType | null, ignoreDiscriminator: boolean): any { return value as SingleRefType; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/SpecialModelName.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/SpecialModelName.ts index d13618509744..3e5d93c0ae5f 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/SpecialModelName.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/SpecialModelName.ts @@ -46,8 +46,8 @@ export function SpecialModelNameFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function SpecialModelNameToJSON(json: any): SpecialModelName { - return SpecialModelNameToJSONTyped(json, false); +export function SpecialModelNameToJSON(value?: SpecialModelName | null): any { + return SpecialModelNameToJSONTyped(value, false); } export function SpecialModelNameToJSONTyped(value?: SpecialModelName | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Tag.ts index a0caf8140a38..bdce73a2fc53 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/Tag.ts @@ -51,8 +51,8 @@ export function TagFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tag { }; } -export function TagToJSON(json: any): Tag { - return TagToJSONTyped(json, false); +export function TagToJSON(value?: Tag | null): any { + return TagToJSONTyped(value, false); } export function TagToJSONTyped(value?: Tag | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/User.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/User.ts index 207ad34596fc..ff94ea078e52 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/User.ts @@ -81,8 +81,8 @@ export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User }; } -export function UserToJSON(json: any): User { - return UserToJSONTyped(json, false); +export function UserToJSON(value?: User | null): any { + return UserToJSONTyped(value, false); } export function UserToJSONTyped(value?: User | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/Category.ts index 7a5fb6a636ea..e9a8beeab3d9 100644 --- a/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/Category.ts @@ -74,8 +74,8 @@ export function CategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function CategoryToJSON(json: any): Category { - return CategoryToJSONTyped(json, false); +export function CategoryToJSON(value?: Category | null): any { + return CategoryToJSONTyped(value, false); } export function CategoryToJSONTyped(value?: Category | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/ModelApiResponse.ts index 94dbefb8376a..b9341f1aa62e 100644 --- a/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/ModelApiResponse.ts @@ -75,8 +75,8 @@ export function ModelApiResponseFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function ModelApiResponseToJSON(json: any): ModelApiResponse { - return ModelApiResponseToJSONTyped(json, false); +export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { + return ModelApiResponseToJSONTyped(value, false); } export function ModelApiResponseToJSONTyped(value?: ModelApiResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/Order.ts index 0ad9b3725c98..17f4c35ba8c6 100644 --- a/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/Order.ts @@ -109,8 +109,8 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord }; } -export function OrderToJSON(json: any): Order { - return OrderToJSONTyped(json, false); +export function OrderToJSON(value?: Order | null): any { + return OrderToJSONTyped(value, false); } export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/Pet.ts index cde0e7b42de0..b819054cdfd4 100644 --- a/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/Pet.ts @@ -127,8 +127,8 @@ export function PetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Pet { }; } -export function PetToJSON(json: any): Pet { - return PetToJSONTyped(json, false); +export function PetToJSON(value?: Pet | null): any { + return PetToJSONTyped(value, false); } export function PetToJSONTyped(value?: Pet | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/Tag.ts index b6222ddd699c..2569ccdc8161 100644 --- a/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/Tag.ts @@ -70,8 +70,8 @@ export function TagFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tag { }; } -export function TagToJSON(json: any): Tag { - return TagToJSONTyped(json, false); +export function TagToJSON(value?: Tag | null): any { + return TagToJSONTyped(value, false); } export function TagToJSONTyped(value?: Tag | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/User.ts b/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/User.ts index af745c1ee60e..af8d85eb0eec 100644 --- a/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/validation-attributes/models/User.ts @@ -122,8 +122,8 @@ export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User }; } -export function UserToJSON(json: any): User { - return UserToJSONTyped(json, false); +export function UserToJSON(value?: User | null): any { + return UserToJSONTyped(value, false); } export function UserToJSONTyped(value?: User | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Category.ts index cdffe07db910..8cc26245bcfa 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Category.ts @@ -51,8 +51,8 @@ export function CategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function CategoryToJSON(json: any): Category { - return CategoryToJSONTyped(json, false); +export function CategoryToJSON(value?: Category | null): any { + return CategoryToJSONTyped(value, false); } export function CategoryToJSONTyped(value?: Category | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/ModelApiResponse.ts index f89423073868..8c96852c3f93 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/ModelApiResponse.ts @@ -56,8 +56,8 @@ export function ModelApiResponseFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function ModelApiResponseToJSON(json: any): ModelApiResponse { - return ModelApiResponseToJSONTyped(json, false); +export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { + return ModelApiResponseToJSONTyped(value, false); } export function ModelApiResponseToJSONTyped(value?: ModelApiResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts index cb6b5c016de6..9d7d64d485ab 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts @@ -83,8 +83,8 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord }; } -export function OrderToJSON(json: any): Order { - return OrderToJSONTyped(json, false); +export function OrderToJSON(value?: Order | null): any { + return OrderToJSONTyped(value, false); } export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Pet.ts index 4c0cb6e73685..9cad3038ebd6 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Pet.ts @@ -100,8 +100,8 @@ export function PetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Pet { }; } -export function PetToJSON(json: any): Pet { - return PetToJSONTyped(json, false); +export function PetToJSON(value?: Pet | null): any { + return PetToJSONTyped(value, false); } export function PetToJSONTyped(value?: Pet | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Tag.ts index 80126e24919e..c18fa753e17e 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Tag.ts @@ -51,8 +51,8 @@ export function TagFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tag { }; } -export function TagToJSON(json: any): Tag { - return TagToJSONTyped(json, false); +export function TagToJSON(value?: Tag | null): any { + return TagToJSONTyped(value, false); } export function TagToJSONTyped(value?: Tag | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/User.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/User.ts index 68e240e4afb3..2203c82ee95f 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/User.ts @@ -81,8 +81,8 @@ export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User }; } -export function UserToJSON(json: any): User { - return UserToJSONTyped(json, false); +export function UserToJSON(value?: User | null): any { + return UserToJSONTyped(value, false); } export function UserToJSONTyped(value?: User | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Category.ts index cdffe07db910..8cc26245bcfa 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Category.ts @@ -51,8 +51,8 @@ export function CategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): }; } -export function CategoryToJSON(json: any): Category { - return CategoryToJSONTyped(json, false); +export function CategoryToJSON(value?: Category | null): any { + return CategoryToJSONTyped(value, false); } export function CategoryToJSONTyped(value?: Category | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/ModelApiResponse.ts index f89423073868..8c96852c3f93 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/ModelApiResponse.ts @@ -56,8 +56,8 @@ export function ModelApiResponseFromJSONTyped(json: any, ignoreDiscriminator: bo }; } -export function ModelApiResponseToJSON(json: any): ModelApiResponse { - return ModelApiResponseToJSONTyped(json, false); +export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { + return ModelApiResponseToJSONTyped(value, false); } export function ModelApiResponseToJSONTyped(value?: ModelApiResponse | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Order.ts index cb6b5c016de6..9d7d64d485ab 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Order.ts @@ -83,8 +83,8 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord }; } -export function OrderToJSON(json: any): Order { - return OrderToJSONTyped(json, false); +export function OrderToJSON(value?: Order | null): any { + return OrderToJSONTyped(value, false); } export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Pet.ts index 4c0cb6e73685..9cad3038ebd6 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Pet.ts @@ -100,8 +100,8 @@ export function PetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Pet { }; } -export function PetToJSON(json: any): Pet { - return PetToJSONTyped(json, false); +export function PetToJSON(value?: Pet | null): any { + return PetToJSONTyped(value, false); } export function PetToJSONTyped(value?: Pet | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Tag.ts index 80126e24919e..c18fa753e17e 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Tag.ts @@ -51,8 +51,8 @@ export function TagFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tag { }; } -export function TagToJSON(json: any): Tag { - return TagToJSONTyped(json, false); +export function TagToJSON(value?: Tag | null): any { + return TagToJSONTyped(value, false); } export function TagToJSONTyped(value?: Tag | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/User.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/User.ts index 68e240e4afb3..2203c82ee95f 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/User.ts @@ -81,8 +81,8 @@ export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User }; } -export function UserToJSON(json: any): User { - return UserToJSONTyped(json, false); +export function UserToJSON(value?: User | null): any { + return UserToJSONTyped(value, false); } export function UserToJSONTyped(value?: User | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/EnumPatternObject.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/EnumPatternObject.ts index 0ad7eb19c7df..4693bd87f4ef 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/EnumPatternObject.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/EnumPatternObject.ts @@ -78,8 +78,8 @@ export function EnumPatternObjectFromJSONTyped(json: any, ignoreDiscriminator: b }; } -export function EnumPatternObjectToJSON(json: any): EnumPatternObject { - return EnumPatternObjectToJSONTyped(json, false); +export function EnumPatternObjectToJSON(value?: EnumPatternObject | null): any { + return EnumPatternObjectToJSONTyped(value, false); } export function EnumPatternObjectToJSONTyped(value?: EnumPatternObject | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/FakeEnumRequestGetInline200Response.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/FakeEnumRequestGetInline200Response.ts index caf1f20c75b4..1e128b19f6fc 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/FakeEnumRequestGetInline200Response.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/FakeEnumRequestGetInline200Response.ts @@ -99,8 +99,8 @@ export function FakeEnumRequestGetInline200ResponseFromJSONTyped(json: any, igno }; } -export function FakeEnumRequestGetInline200ResponseToJSON(json: any): FakeEnumRequestGetInline200Response { - return FakeEnumRequestGetInline200ResponseToJSONTyped(json, false); +export function FakeEnumRequestGetInline200ResponseToJSON(value?: FakeEnumRequestGetInline200Response | null): any { + return FakeEnumRequestGetInline200ResponseToJSONTyped(value, false); } export function FakeEnumRequestGetInline200ResponseToJSONTyped(value?: FakeEnumRequestGetInline200Response | null, ignoreDiscriminator: boolean = false): any { diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/NumberEnum.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/NumberEnum.ts index 4170bf9c7c89..e08f6ebe4fe7 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/NumberEnum.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/NumberEnum.ts @@ -44,10 +44,10 @@ export function NumberEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean) } export function NumberEnumToJSON(value?: NumberEnum | null): any { - return value as any; + return NumberEnumToJSONTyped(value, false); } -export function NumberEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): NumberEnum { +export function NumberEnumToJSONTyped(value?: NumberEnum | null, ignoreDiscriminator: boolean): any { return value as NumberEnum; } diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/StringEnum.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/StringEnum.ts index 484ec6c2e011..504136fadefc 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/StringEnum.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/StringEnum.ts @@ -44,10 +44,10 @@ export function StringEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean) } export function StringEnumToJSON(value?: StringEnum | null): any { - return value as any; + return StringEnumToJSONTyped(value, false); } -export function StringEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): StringEnum { +export function StringEnumToJSONTyped(value?: StringEnum | null, ignoreDiscriminator: boolean): any { return value as StringEnum; } From 0185872314c1b446754c2a3eb8959dd8314dbc5c Mon Sep 17 00:00:00 2001 From: fangd1997 <847487277@qq.com> Date: Tue, 4 Aug 2026 00:59:25 +0800 Subject: [PATCH 2/3] update --- .../src/main/resources/typescript-fetch/modelEnum.mustache | 2 +- .../infinite-recursion-issue/models/TestObjectType.ts | 2 +- .../typescript-fetch/builds/default-v3.0/models/EnumClass.ts | 2 +- .../typescript-fetch/builds/default-v3.0/models/OuterEnum.ts | 2 +- .../builds/default-v3.0/models/OuterEnumDefaultValue.ts | 2 +- .../builds/default-v3.0/models/OuterEnumInteger.ts | 2 +- .../builds/default-v3.0/models/OuterEnumIntegerDefaultValue.ts | 2 +- .../builds/default-v3.0/models/SingleRefType.ts | 2 +- .../petstore/typescript-fetch/builds/enum/models/NumberEnum.ts | 2 +- .../petstore/typescript-fetch/builds/enum/models/StringEnum.ts | 2 +- .../typescript-fetch/builds/kebab-case/models/enum-class.ts | 2 +- .../builds/kebab-case/models/outer-enum-default-value.ts | 2 +- .../kebab-case/models/outer-enum-integer-default-value.ts | 2 +- .../builds/kebab-case/models/outer-enum-integer.ts | 2 +- .../typescript-fetch/builds/kebab-case/models/outer-enum.ts | 2 +- .../builds/kebab-case/models/single-ref-type.ts | 2 +- .../builds/sagas-and-records/src/models/BehaviorType.ts | 2 +- .../sagas-and-records/src/models/DeploymentRequestStatus.ts | 2 +- .../builds/sagas-and-records/src/models/ErrorCode.ts | 2 +- .../builds/sagas-and-records/src/models/PetPartType.ts | 2 +- .../builds/sagas-and-records/src/models/WarningCode.ts | 2 +- .../builds/snakecase-discriminator/models/EnumClass.ts | 2 +- .../builds/snakecase-discriminator/models/OuterEnum.ts | 2 +- .../snakecase-discriminator/models/OuterEnumDefaultValue.ts | 2 +- .../builds/snakecase-discriminator/models/OuterEnumInteger.ts | 2 +- .../models/OuterEnumIntegerDefaultValue.ts | 2 +- .../builds/snakecase-discriminator/models/SingleRefType.ts | 2 +- .../builds/with-string-enums/models/NumberEnum.ts | 2 +- .../builds/with-string-enums/models/StringEnum.ts | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/modelEnum.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/modelEnum.mustache index 507d89f2b34e..7c28d2e0dddc 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/modelEnum.mustache @@ -23,6 +23,6 @@ export function {{classname}}ToJSON(value?: {{classname}} | null): any { return {{classname}}ToJSONTyped(value, false); } -export function {{classname}}ToJSONTyped(value?: {{classname}} | null, ignoreDiscriminator: boolean): any { +export function {{classname}}ToJSONTyped(value?: {{classname}} | null, ignoreDiscriminator: boolean = false): any { return value as {{classname}}; } diff --git a/samples/client/others/typescript-fetch/infinite-recursion-issue/models/TestObjectType.ts b/samples/client/others/typescript-fetch/infinite-recursion-issue/models/TestObjectType.ts index 8d51169a9aba..1fd94178c661 100644 --- a/samples/client/others/typescript-fetch/infinite-recursion-issue/models/TestObjectType.ts +++ b/samples/client/others/typescript-fetch/infinite-recursion-issue/models/TestObjectType.ts @@ -48,7 +48,7 @@ export function TestObjectTypeToJSON(value?: TestObjectType | null): any { return TestObjectTypeToJSONTyped(value, false); } -export function TestObjectTypeToJSONTyped(value?: TestObjectType | null, ignoreDiscriminator: boolean): any { +export function TestObjectTypeToJSONTyped(value?: TestObjectType | null, ignoreDiscriminator: boolean = false): any { return value as TestObjectType; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumClass.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumClass.ts index 273d379ae560..7015968da085 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumClass.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumClass.ts @@ -48,7 +48,7 @@ export function EnumClassToJSON(value?: EnumClass | null): any { return EnumClassToJSONTyped(value, false); } -export function EnumClassToJSONTyped(value?: EnumClass | null, ignoreDiscriminator: boolean): any { +export function EnumClassToJSONTyped(value?: EnumClass | null, ignoreDiscriminator: boolean = false): any { return value as EnumClass; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnum.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnum.ts index b4aca38af101..2fd3b456b3ed 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnum.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnum.ts @@ -48,7 +48,7 @@ export function OuterEnumToJSON(value?: OuterEnum | null): any { return OuterEnumToJSONTyped(value, false); } -export function OuterEnumToJSONTyped(value?: OuterEnum | null, ignoreDiscriminator: boolean): any { +export function OuterEnumToJSONTyped(value?: OuterEnum | null, ignoreDiscriminator: boolean = false): any { return value as OuterEnum; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumDefaultValue.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumDefaultValue.ts index 45332ed0d7f9..af19e6f28094 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumDefaultValue.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumDefaultValue.ts @@ -48,7 +48,7 @@ export function OuterEnumDefaultValueToJSON(value?: OuterEnumDefaultValue | null return OuterEnumDefaultValueToJSONTyped(value, false); } -export function OuterEnumDefaultValueToJSONTyped(value?: OuterEnumDefaultValue | null, ignoreDiscriminator: boolean): any { +export function OuterEnumDefaultValueToJSONTyped(value?: OuterEnumDefaultValue | null, ignoreDiscriminator: boolean = false): any { return value as OuterEnumDefaultValue; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumInteger.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumInteger.ts index 46caa611b086..d8899d3e2f5c 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumInteger.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumInteger.ts @@ -48,7 +48,7 @@ export function OuterEnumIntegerToJSON(value?: OuterEnumInteger | null): any { return OuterEnumIntegerToJSONTyped(value, false); } -export function OuterEnumIntegerToJSONTyped(value?: OuterEnumInteger | null, ignoreDiscriminator: boolean): any { +export function OuterEnumIntegerToJSONTyped(value?: OuterEnumInteger | null, ignoreDiscriminator: boolean = false): any { return value as OuterEnumInteger; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumIntegerDefaultValue.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumIntegerDefaultValue.ts index ad18b0b13b56..2351095103c2 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumIntegerDefaultValue.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumIntegerDefaultValue.ts @@ -48,7 +48,7 @@ export function OuterEnumIntegerDefaultValueToJSON(value?: OuterEnumIntegerDefau return OuterEnumIntegerDefaultValueToJSONTyped(value, false); } -export function OuterEnumIntegerDefaultValueToJSONTyped(value?: OuterEnumIntegerDefaultValue | null, ignoreDiscriminator: boolean): any { +export function OuterEnumIntegerDefaultValueToJSONTyped(value?: OuterEnumIntegerDefaultValue | null, ignoreDiscriminator: boolean = false): any { return value as OuterEnumIntegerDefaultValue; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SingleRefType.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SingleRefType.ts index 1a9dd87cabc4..51c33cb96eb2 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SingleRefType.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SingleRefType.ts @@ -47,7 +47,7 @@ export function SingleRefTypeToJSON(value?: SingleRefType | null): any { return SingleRefTypeToJSONTyped(value, false); } -export function SingleRefTypeToJSONTyped(value?: SingleRefType | null, ignoreDiscriminator: boolean): any { +export function SingleRefTypeToJSONTyped(value?: SingleRefType | null, ignoreDiscriminator: boolean = false): any { return value as SingleRefType; } diff --git a/samples/client/petstore/typescript-fetch/builds/enum/models/NumberEnum.ts b/samples/client/petstore/typescript-fetch/builds/enum/models/NumberEnum.ts index 2f314d64f837..8435f98de1b9 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/models/NumberEnum.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/models/NumberEnum.ts @@ -48,7 +48,7 @@ export function NumberEnumToJSON(value?: NumberEnum | null): any { return NumberEnumToJSONTyped(value, false); } -export function NumberEnumToJSONTyped(value?: NumberEnum | null, ignoreDiscriminator: boolean): any { +export function NumberEnumToJSONTyped(value?: NumberEnum | null, ignoreDiscriminator: boolean = false): any { return value as NumberEnum; } diff --git a/samples/client/petstore/typescript-fetch/builds/enum/models/StringEnum.ts b/samples/client/petstore/typescript-fetch/builds/enum/models/StringEnum.ts index 1d3206c1156c..08f8844ae869 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/models/StringEnum.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/models/StringEnum.ts @@ -48,7 +48,7 @@ export function StringEnumToJSON(value?: StringEnum | null): any { return StringEnumToJSONTyped(value, false); } -export function StringEnumToJSONTyped(value?: StringEnum | null, ignoreDiscriminator: boolean): any { +export function StringEnumToJSONTyped(value?: StringEnum | null, ignoreDiscriminator: boolean = false): any { return value as StringEnum; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/enum-class.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/enum-class.ts index 273d379ae560..7015968da085 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/enum-class.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/enum-class.ts @@ -48,7 +48,7 @@ export function EnumClassToJSON(value?: EnumClass | null): any { return EnumClassToJSONTyped(value, false); } -export function EnumClassToJSONTyped(value?: EnumClass | null, ignoreDiscriminator: boolean): any { +export function EnumClassToJSONTyped(value?: EnumClass | null, ignoreDiscriminator: boolean = false): any { return value as EnumClass; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-default-value.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-default-value.ts index 45332ed0d7f9..af19e6f28094 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-default-value.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-default-value.ts @@ -48,7 +48,7 @@ export function OuterEnumDefaultValueToJSON(value?: OuterEnumDefaultValue | null return OuterEnumDefaultValueToJSONTyped(value, false); } -export function OuterEnumDefaultValueToJSONTyped(value?: OuterEnumDefaultValue | null, ignoreDiscriminator: boolean): any { +export function OuterEnumDefaultValueToJSONTyped(value?: OuterEnumDefaultValue | null, ignoreDiscriminator: boolean = false): any { return value as OuterEnumDefaultValue; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer-default-value.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer-default-value.ts index ad18b0b13b56..2351095103c2 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer-default-value.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer-default-value.ts @@ -48,7 +48,7 @@ export function OuterEnumIntegerDefaultValueToJSON(value?: OuterEnumIntegerDefau return OuterEnumIntegerDefaultValueToJSONTyped(value, false); } -export function OuterEnumIntegerDefaultValueToJSONTyped(value?: OuterEnumIntegerDefaultValue | null, ignoreDiscriminator: boolean): any { +export function OuterEnumIntegerDefaultValueToJSONTyped(value?: OuterEnumIntegerDefaultValue | null, ignoreDiscriminator: boolean = false): any { return value as OuterEnumIntegerDefaultValue; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer.ts index 46caa611b086..d8899d3e2f5c 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer.ts @@ -48,7 +48,7 @@ export function OuterEnumIntegerToJSON(value?: OuterEnumInteger | null): any { return OuterEnumIntegerToJSONTyped(value, false); } -export function OuterEnumIntegerToJSONTyped(value?: OuterEnumInteger | null, ignoreDiscriminator: boolean): any { +export function OuterEnumIntegerToJSONTyped(value?: OuterEnumInteger | null, ignoreDiscriminator: boolean = false): any { return value as OuterEnumInteger; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum.ts index b4aca38af101..2fd3b456b3ed 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum.ts @@ -48,7 +48,7 @@ export function OuterEnumToJSON(value?: OuterEnum | null): any { return OuterEnumToJSONTyped(value, false); } -export function OuterEnumToJSONTyped(value?: OuterEnum | null, ignoreDiscriminator: boolean): any { +export function OuterEnumToJSONTyped(value?: OuterEnum | null, ignoreDiscriminator: boolean = false): any { return value as OuterEnum; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/single-ref-type.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/single-ref-type.ts index 1a9dd87cabc4..51c33cb96eb2 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/single-ref-type.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/single-ref-type.ts @@ -47,7 +47,7 @@ export function SingleRefTypeToJSON(value?: SingleRefType | null): any { return SingleRefTypeToJSONTyped(value, false); } -export function SingleRefTypeToJSONTyped(value?: SingleRefType | null, ignoreDiscriminator: boolean): any { +export function SingleRefTypeToJSONTyped(value?: SingleRefType | null, ignoreDiscriminator: boolean = false): any { return value as SingleRefType; } diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/BehaviorType.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/BehaviorType.ts index e422490b5949..d0a7a3489e33 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/BehaviorType.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/BehaviorType.ts @@ -48,7 +48,7 @@ export function BehaviorTypeToJSON(value?: BehaviorType | null): any { return BehaviorTypeToJSONTyped(value, false); } -export function BehaviorTypeToJSONTyped(value?: BehaviorType | null, ignoreDiscriminator: boolean): any { +export function BehaviorTypeToJSONTyped(value?: BehaviorType | null, ignoreDiscriminator: boolean = false): any { return value as BehaviorType; } diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DeploymentRequestStatus.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DeploymentRequestStatus.ts index 48234e5370f5..3cf28bebc184 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DeploymentRequestStatus.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DeploymentRequestStatus.ts @@ -57,7 +57,7 @@ export function DeploymentRequestStatusToJSON(value?: DeploymentRequestStatus | return DeploymentRequestStatusToJSONTyped(value, false); } -export function DeploymentRequestStatusToJSONTyped(value?: DeploymentRequestStatus | null, ignoreDiscriminator: boolean): any { +export function DeploymentRequestStatusToJSONTyped(value?: DeploymentRequestStatus | null, ignoreDiscriminator: boolean = false): any { return value as DeploymentRequestStatus; } diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ErrorCode.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ErrorCode.ts index 3e431ed9c4c9..d19b4f1a4b27 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ErrorCode.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ErrorCode.ts @@ -63,7 +63,7 @@ export function ErrorCodeToJSON(value?: ErrorCode | null): any { return ErrorCodeToJSONTyped(value, false); } -export function ErrorCodeToJSONTyped(value?: ErrorCode | null, ignoreDiscriminator: boolean): any { +export function ErrorCodeToJSONTyped(value?: ErrorCode | null, ignoreDiscriminator: boolean = false): any { return value as ErrorCode; } diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/PetPartType.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/PetPartType.ts index 404ef4032c7d..9b6c83da540f 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/PetPartType.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/PetPartType.ts @@ -48,7 +48,7 @@ export function PetPartTypeToJSON(value?: PetPartType | null): any { return PetPartTypeToJSONTyped(value, false); } -export function PetPartTypeToJSONTyped(value?: PetPartType | null, ignoreDiscriminator: boolean): any { +export function PetPartTypeToJSONTyped(value?: PetPartType | null, ignoreDiscriminator: boolean = false): any { return value as PetPartType; } diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/WarningCode.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/WarningCode.ts index 8e923924817a..87e5ef7ea047 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/WarningCode.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/WarningCode.ts @@ -48,7 +48,7 @@ export function WarningCodeToJSON(value?: WarningCode | null): any { return WarningCodeToJSONTyped(value, false); } -export function WarningCodeToJSONTyped(value?: WarningCode | null, ignoreDiscriminator: boolean): any { +export function WarningCodeToJSONTyped(value?: WarningCode | null, ignoreDiscriminator: boolean = false): any { return value as WarningCode; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/EnumClass.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/EnumClass.ts index 273d379ae560..7015968da085 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/EnumClass.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/EnumClass.ts @@ -48,7 +48,7 @@ export function EnumClassToJSON(value?: EnumClass | null): any { return EnumClassToJSONTyped(value, false); } -export function EnumClassToJSONTyped(value?: EnumClass | null, ignoreDiscriminator: boolean): any { +export function EnumClassToJSONTyped(value?: EnumClass | null, ignoreDiscriminator: boolean = false): any { return value as EnumClass; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnum.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnum.ts index b4aca38af101..2fd3b456b3ed 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnum.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnum.ts @@ -48,7 +48,7 @@ export function OuterEnumToJSON(value?: OuterEnum | null): any { return OuterEnumToJSONTyped(value, false); } -export function OuterEnumToJSONTyped(value?: OuterEnum | null, ignoreDiscriminator: boolean): any { +export function OuterEnumToJSONTyped(value?: OuterEnum | null, ignoreDiscriminator: boolean = false): any { return value as OuterEnum; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumDefaultValue.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumDefaultValue.ts index 45332ed0d7f9..af19e6f28094 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumDefaultValue.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumDefaultValue.ts @@ -48,7 +48,7 @@ export function OuterEnumDefaultValueToJSON(value?: OuterEnumDefaultValue | null return OuterEnumDefaultValueToJSONTyped(value, false); } -export function OuterEnumDefaultValueToJSONTyped(value?: OuterEnumDefaultValue | null, ignoreDiscriminator: boolean): any { +export function OuterEnumDefaultValueToJSONTyped(value?: OuterEnumDefaultValue | null, ignoreDiscriminator: boolean = false): any { return value as OuterEnumDefaultValue; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumInteger.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumInteger.ts index 46caa611b086..d8899d3e2f5c 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumInteger.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumInteger.ts @@ -48,7 +48,7 @@ export function OuterEnumIntegerToJSON(value?: OuterEnumInteger | null): any { return OuterEnumIntegerToJSONTyped(value, false); } -export function OuterEnumIntegerToJSONTyped(value?: OuterEnumInteger | null, ignoreDiscriminator: boolean): any { +export function OuterEnumIntegerToJSONTyped(value?: OuterEnumInteger | null, ignoreDiscriminator: boolean = false): any { return value as OuterEnumInteger; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumIntegerDefaultValue.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumIntegerDefaultValue.ts index ad18b0b13b56..2351095103c2 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumIntegerDefaultValue.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumIntegerDefaultValue.ts @@ -48,7 +48,7 @@ export function OuterEnumIntegerDefaultValueToJSON(value?: OuterEnumIntegerDefau return OuterEnumIntegerDefaultValueToJSONTyped(value, false); } -export function OuterEnumIntegerDefaultValueToJSONTyped(value?: OuterEnumIntegerDefaultValue | null, ignoreDiscriminator: boolean): any { +export function OuterEnumIntegerDefaultValueToJSONTyped(value?: OuterEnumIntegerDefaultValue | null, ignoreDiscriminator: boolean = false): any { return value as OuterEnumIntegerDefaultValue; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/SingleRefType.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/SingleRefType.ts index 1a9dd87cabc4..51c33cb96eb2 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/SingleRefType.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/SingleRefType.ts @@ -47,7 +47,7 @@ export function SingleRefTypeToJSON(value?: SingleRefType | null): any { return SingleRefTypeToJSONTyped(value, false); } -export function SingleRefTypeToJSONTyped(value?: SingleRefType | null, ignoreDiscriminator: boolean): any { +export function SingleRefTypeToJSONTyped(value?: SingleRefType | null, ignoreDiscriminator: boolean = false): any { return value as SingleRefType; } diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/NumberEnum.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/NumberEnum.ts index e08f6ebe4fe7..20b2a0f04285 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/NumberEnum.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/NumberEnum.ts @@ -47,7 +47,7 @@ export function NumberEnumToJSON(value?: NumberEnum | null): any { return NumberEnumToJSONTyped(value, false); } -export function NumberEnumToJSONTyped(value?: NumberEnum | null, ignoreDiscriminator: boolean): any { +export function NumberEnumToJSONTyped(value?: NumberEnum | null, ignoreDiscriminator: boolean = false): any { return value as NumberEnum; } diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/StringEnum.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/StringEnum.ts index 504136fadefc..e43dfb3defa8 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/StringEnum.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/StringEnum.ts @@ -47,7 +47,7 @@ export function StringEnumToJSON(value?: StringEnum | null): any { return StringEnumToJSONTyped(value, false); } -export function StringEnumToJSONTyped(value?: StringEnum | null, ignoreDiscriminator: boolean): any { +export function StringEnumToJSONTyped(value?: StringEnum | null, ignoreDiscriminator: boolean = false): any { return value as StringEnum; } From 420421aa4e4e2ca26406e8968824cee9cf17778b Mon Sep 17 00:00:00 2001 From: fangd1997 <847487277@qq.com> Date: Tue, 4 Aug 2026 01:04:36 +0800 Subject: [PATCH 3/3] update --- .../src/main/resources/typescript-fetch/modelEnum.mustache | 2 +- .../infinite-recursion-issue/models/TestObjectType.ts | 2 +- .../typescript-fetch/builds/default-v3.0/models/EnumClass.ts | 2 +- .../typescript-fetch/builds/default-v3.0/models/OuterEnum.ts | 2 +- .../builds/default-v3.0/models/OuterEnumDefaultValue.ts | 2 +- .../builds/default-v3.0/models/OuterEnumInteger.ts | 2 +- .../builds/default-v3.0/models/OuterEnumIntegerDefaultValue.ts | 2 +- .../builds/default-v3.0/models/SingleRefType.ts | 2 +- .../petstore/typescript-fetch/builds/enum/models/NumberEnum.ts | 2 +- .../petstore/typescript-fetch/builds/enum/models/StringEnum.ts | 2 +- .../typescript-fetch/builds/kebab-case/models/enum-class.ts | 2 +- .../builds/kebab-case/models/outer-enum-default-value.ts | 2 +- .../kebab-case/models/outer-enum-integer-default-value.ts | 2 +- .../builds/kebab-case/models/outer-enum-integer.ts | 2 +- .../typescript-fetch/builds/kebab-case/models/outer-enum.ts | 2 +- .../builds/kebab-case/models/single-ref-type.ts | 2 +- .../builds/sagas-and-records/src/models/BehaviorType.ts | 2 +- .../sagas-and-records/src/models/DeploymentRequestStatus.ts | 2 +- .../builds/sagas-and-records/src/models/ErrorCode.ts | 2 +- .../builds/sagas-and-records/src/models/PetPartType.ts | 2 +- .../builds/sagas-and-records/src/models/WarningCode.ts | 2 +- .../builds/snakecase-discriminator/models/EnumClass.ts | 2 +- .../builds/snakecase-discriminator/models/OuterEnum.ts | 2 +- .../snakecase-discriminator/models/OuterEnumDefaultValue.ts | 2 +- .../builds/snakecase-discriminator/models/OuterEnumInteger.ts | 2 +- .../models/OuterEnumIntegerDefaultValue.ts | 2 +- .../builds/snakecase-discriminator/models/SingleRefType.ts | 2 +- .../builds/with-string-enums/models/NumberEnum.ts | 2 +- .../builds/with-string-enums/models/StringEnum.ts | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/modelEnum.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/modelEnum.mustache index 7c28d2e0dddc..5dd021cf63f5 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/modelEnum.mustache @@ -24,5 +24,5 @@ export function {{classname}}ToJSON(value?: {{classname}} | null): any { } export function {{classname}}ToJSONTyped(value?: {{classname}} | null, ignoreDiscriminator: boolean = false): any { - return value as {{classname}}; + return value as any; } diff --git a/samples/client/others/typescript-fetch/infinite-recursion-issue/models/TestObjectType.ts b/samples/client/others/typescript-fetch/infinite-recursion-issue/models/TestObjectType.ts index 1fd94178c661..6fd97868446f 100644 --- a/samples/client/others/typescript-fetch/infinite-recursion-issue/models/TestObjectType.ts +++ b/samples/client/others/typescript-fetch/infinite-recursion-issue/models/TestObjectType.ts @@ -49,6 +49,6 @@ export function TestObjectTypeToJSON(value?: TestObjectType | null): any { } export function TestObjectTypeToJSONTyped(value?: TestObjectType | null, ignoreDiscriminator: boolean = false): any { - return value as TestObjectType; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumClass.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumClass.ts index 7015968da085..9a6ff483b183 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumClass.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumClass.ts @@ -49,6 +49,6 @@ export function EnumClassToJSON(value?: EnumClass | null): any { } export function EnumClassToJSONTyped(value?: EnumClass | null, ignoreDiscriminator: boolean = false): any { - return value as EnumClass; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnum.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnum.ts index 2fd3b456b3ed..d6a98b33056f 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnum.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnum.ts @@ -49,6 +49,6 @@ export function OuterEnumToJSON(value?: OuterEnum | null): any { } export function OuterEnumToJSONTyped(value?: OuterEnum | null, ignoreDiscriminator: boolean = false): any { - return value as OuterEnum; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumDefaultValue.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumDefaultValue.ts index af19e6f28094..3f93fb3db10e 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumDefaultValue.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumDefaultValue.ts @@ -49,6 +49,6 @@ export function OuterEnumDefaultValueToJSON(value?: OuterEnumDefaultValue | null } export function OuterEnumDefaultValueToJSONTyped(value?: OuterEnumDefaultValue | null, ignoreDiscriminator: boolean = false): any { - return value as OuterEnumDefaultValue; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumInteger.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumInteger.ts index d8899d3e2f5c..9984d5fb6974 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumInteger.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumInteger.ts @@ -49,6 +49,6 @@ export function OuterEnumIntegerToJSON(value?: OuterEnumInteger | null): any { } export function OuterEnumIntegerToJSONTyped(value?: OuterEnumInteger | null, ignoreDiscriminator: boolean = false): any { - return value as OuterEnumInteger; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumIntegerDefaultValue.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumIntegerDefaultValue.ts index 2351095103c2..3786915d35a5 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumIntegerDefaultValue.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterEnumIntegerDefaultValue.ts @@ -49,6 +49,6 @@ export function OuterEnumIntegerDefaultValueToJSON(value?: OuterEnumIntegerDefau } export function OuterEnumIntegerDefaultValueToJSONTyped(value?: OuterEnumIntegerDefaultValue | null, ignoreDiscriminator: boolean = false): any { - return value as OuterEnumIntegerDefaultValue; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SingleRefType.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SingleRefType.ts index 51c33cb96eb2..44714e7f41c7 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SingleRefType.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SingleRefType.ts @@ -48,6 +48,6 @@ export function SingleRefTypeToJSON(value?: SingleRefType | null): any { } export function SingleRefTypeToJSONTyped(value?: SingleRefType | null, ignoreDiscriminator: boolean = false): any { - return value as SingleRefType; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/enum/models/NumberEnum.ts b/samples/client/petstore/typescript-fetch/builds/enum/models/NumberEnum.ts index 8435f98de1b9..2e05cdc9a99d 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/models/NumberEnum.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/models/NumberEnum.ts @@ -49,6 +49,6 @@ export function NumberEnumToJSON(value?: NumberEnum | null): any { } export function NumberEnumToJSONTyped(value?: NumberEnum | null, ignoreDiscriminator: boolean = false): any { - return value as NumberEnum; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/enum/models/StringEnum.ts b/samples/client/petstore/typescript-fetch/builds/enum/models/StringEnum.ts index 08f8844ae869..493d9276d373 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/models/StringEnum.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/models/StringEnum.ts @@ -49,6 +49,6 @@ export function StringEnumToJSON(value?: StringEnum | null): any { } export function StringEnumToJSONTyped(value?: StringEnum | null, ignoreDiscriminator: boolean = false): any { - return value as StringEnum; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/enum-class.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/enum-class.ts index 7015968da085..9a6ff483b183 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/enum-class.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/enum-class.ts @@ -49,6 +49,6 @@ export function EnumClassToJSON(value?: EnumClass | null): any { } export function EnumClassToJSONTyped(value?: EnumClass | null, ignoreDiscriminator: boolean = false): any { - return value as EnumClass; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-default-value.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-default-value.ts index af19e6f28094..3f93fb3db10e 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-default-value.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-default-value.ts @@ -49,6 +49,6 @@ export function OuterEnumDefaultValueToJSON(value?: OuterEnumDefaultValue | null } export function OuterEnumDefaultValueToJSONTyped(value?: OuterEnumDefaultValue | null, ignoreDiscriminator: boolean = false): any { - return value as OuterEnumDefaultValue; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer-default-value.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer-default-value.ts index 2351095103c2..3786915d35a5 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer-default-value.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer-default-value.ts @@ -49,6 +49,6 @@ export function OuterEnumIntegerDefaultValueToJSON(value?: OuterEnumIntegerDefau } export function OuterEnumIntegerDefaultValueToJSONTyped(value?: OuterEnumIntegerDefaultValue | null, ignoreDiscriminator: boolean = false): any { - return value as OuterEnumIntegerDefaultValue; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer.ts index d8899d3e2f5c..9984d5fb6974 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum-integer.ts @@ -49,6 +49,6 @@ export function OuterEnumIntegerToJSON(value?: OuterEnumInteger | null): any { } export function OuterEnumIntegerToJSONTyped(value?: OuterEnumInteger | null, ignoreDiscriminator: boolean = false): any { - return value as OuterEnumInteger; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum.ts index 2fd3b456b3ed..d6a98b33056f 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/outer-enum.ts @@ -49,6 +49,6 @@ export function OuterEnumToJSON(value?: OuterEnum | null): any { } export function OuterEnumToJSONTyped(value?: OuterEnum | null, ignoreDiscriminator: boolean = false): any { - return value as OuterEnum; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/single-ref-type.ts b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/single-ref-type.ts index 51c33cb96eb2..44714e7f41c7 100644 --- a/samples/client/petstore/typescript-fetch/builds/kebab-case/models/single-ref-type.ts +++ b/samples/client/petstore/typescript-fetch/builds/kebab-case/models/single-ref-type.ts @@ -48,6 +48,6 @@ export function SingleRefTypeToJSON(value?: SingleRefType | null): any { } export function SingleRefTypeToJSONTyped(value?: SingleRefType | null, ignoreDiscriminator: boolean = false): any { - return value as SingleRefType; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/BehaviorType.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/BehaviorType.ts index d0a7a3489e33..f633eb6d39dd 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/BehaviorType.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/BehaviorType.ts @@ -49,6 +49,6 @@ export function BehaviorTypeToJSON(value?: BehaviorType | null): any { } export function BehaviorTypeToJSONTyped(value?: BehaviorType | null, ignoreDiscriminator: boolean = false): any { - return value as BehaviorType; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DeploymentRequestStatus.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DeploymentRequestStatus.ts index 3cf28bebc184..022063eefed1 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DeploymentRequestStatus.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DeploymentRequestStatus.ts @@ -58,6 +58,6 @@ export function DeploymentRequestStatusToJSON(value?: DeploymentRequestStatus | } export function DeploymentRequestStatusToJSONTyped(value?: DeploymentRequestStatus | null, ignoreDiscriminator: boolean = false): any { - return value as DeploymentRequestStatus; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ErrorCode.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ErrorCode.ts index d19b4f1a4b27..e34698a20562 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ErrorCode.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ErrorCode.ts @@ -64,6 +64,6 @@ export function ErrorCodeToJSON(value?: ErrorCode | null): any { } export function ErrorCodeToJSONTyped(value?: ErrorCode | null, ignoreDiscriminator: boolean = false): any { - return value as ErrorCode; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/PetPartType.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/PetPartType.ts index 9b6c83da540f..63542e607f14 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/PetPartType.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/PetPartType.ts @@ -49,6 +49,6 @@ export function PetPartTypeToJSON(value?: PetPartType | null): any { } export function PetPartTypeToJSONTyped(value?: PetPartType | null, ignoreDiscriminator: boolean = false): any { - return value as PetPartType; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/WarningCode.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/WarningCode.ts index 87e5ef7ea047..43072e3393eb 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/WarningCode.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/WarningCode.ts @@ -49,6 +49,6 @@ export function WarningCodeToJSON(value?: WarningCode | null): any { } export function WarningCodeToJSONTyped(value?: WarningCode | null, ignoreDiscriminator: boolean = false): any { - return value as WarningCode; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/EnumClass.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/EnumClass.ts index 7015968da085..9a6ff483b183 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/EnumClass.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/EnumClass.ts @@ -49,6 +49,6 @@ export function EnumClassToJSON(value?: EnumClass | null): any { } export function EnumClassToJSONTyped(value?: EnumClass | null, ignoreDiscriminator: boolean = false): any { - return value as EnumClass; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnum.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnum.ts index 2fd3b456b3ed..d6a98b33056f 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnum.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnum.ts @@ -49,6 +49,6 @@ export function OuterEnumToJSON(value?: OuterEnum | null): any { } export function OuterEnumToJSONTyped(value?: OuterEnum | null, ignoreDiscriminator: boolean = false): any { - return value as OuterEnum; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumDefaultValue.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumDefaultValue.ts index af19e6f28094..3f93fb3db10e 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumDefaultValue.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumDefaultValue.ts @@ -49,6 +49,6 @@ export function OuterEnumDefaultValueToJSON(value?: OuterEnumDefaultValue | null } export function OuterEnumDefaultValueToJSONTyped(value?: OuterEnumDefaultValue | null, ignoreDiscriminator: boolean = false): any { - return value as OuterEnumDefaultValue; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumInteger.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumInteger.ts index d8899d3e2f5c..9984d5fb6974 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumInteger.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumInteger.ts @@ -49,6 +49,6 @@ export function OuterEnumIntegerToJSON(value?: OuterEnumInteger | null): any { } export function OuterEnumIntegerToJSONTyped(value?: OuterEnumInteger | null, ignoreDiscriminator: boolean = false): any { - return value as OuterEnumInteger; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumIntegerDefaultValue.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumIntegerDefaultValue.ts index 2351095103c2..3786915d35a5 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumIntegerDefaultValue.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/OuterEnumIntegerDefaultValue.ts @@ -49,6 +49,6 @@ export function OuterEnumIntegerDefaultValueToJSON(value?: OuterEnumIntegerDefau } export function OuterEnumIntegerDefaultValueToJSONTyped(value?: OuterEnumIntegerDefaultValue | null, ignoreDiscriminator: boolean = false): any { - return value as OuterEnumIntegerDefaultValue; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/SingleRefType.ts b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/SingleRefType.ts index 51c33cb96eb2..44714e7f41c7 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/SingleRefType.ts +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/models/SingleRefType.ts @@ -48,6 +48,6 @@ export function SingleRefTypeToJSON(value?: SingleRefType | null): any { } export function SingleRefTypeToJSONTyped(value?: SingleRefType | null, ignoreDiscriminator: boolean = false): any { - return value as SingleRefType; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/NumberEnum.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/NumberEnum.ts index 20b2a0f04285..40c2fd955aeb 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/NumberEnum.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/NumberEnum.ts @@ -48,6 +48,6 @@ export function NumberEnumToJSON(value?: NumberEnum | null): any { } export function NumberEnumToJSONTyped(value?: NumberEnum | null, ignoreDiscriminator: boolean = false): any { - return value as NumberEnum; + return value as any; } diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/StringEnum.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/StringEnum.ts index e43dfb3defa8..9c7c3303ac54 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/StringEnum.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/models/StringEnum.ts @@ -48,6 +48,6 @@ export function StringEnumToJSON(value?: StringEnum | null): any { } export function StringEnumToJSONTyped(value?: StringEnum | null, ignoreDiscriminator: boolean = false): any { - return value as StringEnum; + return value as any; }