;
+ data?: ModelWithNestedArrayEnumsData;
+};
+
+export type ModelWithNestedCompositionEnums = {
+ foo?: ModelWithNestedArrayEnumsDataFoo;
+};
+
+export type ModelWithReadOnlyAndWriteOnly = {
+ foo: string;
+ readonly bar: string;
+};
+
+export type ModelWithConstantSizeArray = [
+ number,
+ number
+];
+
+export type ModelWithAnyOfConstantSizeArray = [
+ number | string,
+ number | string,
+ number | string
+];
+
+export type ModelWithPrefixItemsConstantSizeArray = [
+ ModelWithInteger,
+ number | string,
+ string
+];
+
+export type ModelWithAnyOfConstantSizeArrayNullable = [
+ number | null | string,
+ number | null | string,
+ number | null | string
+];
+
+export type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [
+ number | Import,
+ number | Import
+];
+
+export type ModelWithAnyOfConstantSizeArrayAndIntersect = [
+ number & string,
+ number & string
+];
+
+export type ModelWithNumericEnumUnion = {
+ /**
+ * Период
+ */
+ value?: -10 | -1 | 0 | 1 | 3 | 6 | 12;
+};
+
+/**
+ * Some description with `back ticks`
+ */
+export type ModelWithBackticksInDescription = {
+ /**
+ * The template `that` should be used for parsing and importing the contents of the CSV file.
+ *
+ *
There is one placeholder currently supported:
- ${x} - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)
Example of a correct JSON template:
+ *
+ * [
+ * {
+ * "resourceType": "Asset",
+ * "identifier": {
+ * "name": "${1}",
+ * "domain": {
+ * "name": "${2}",
+ * "community": {
+ * "name": "Some Community"
+ * }
+ * }
+ * },
+ * "attributes" : {
+ * "00000000-0000-0000-0000-000000003115" : [ {
+ * "value" : "${3}"
+ * } ],
+ * "00000000-0000-0000-0000-000000000222" : [ {
+ * "value" : "${4}"
+ * } ]
+ * }
+ * }
+ * ]
+ *
+ */
+ template?: string;
+};
+
+export type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & {
+ baz: number | null;
+ qux: number;
+};
+
+/**
+ * Model used to test deduplication strategy (unused)
+ */
+export type ParameterSimpleParameterUnused = string;
+
+/**
+ * Model used to test deduplication strategy
+ */
+export type PostServiceWithEmptyTagResponse = string;
+
+/**
+ * Model used to test deduplication strategy
+ */
+export type PostServiceWithEmptyTagResponse2 = string;
+
+/**
+ * Model used to test deduplication strategy
+ */
+export type DeleteFooData = string;
+
+/**
+ * Model used to test deduplication strategy
+ */
+export type DeleteFooData2 = string;
+
+/**
+ * Model with restricted keyword name
+ */
+export type Import = string;
+
+export type SchemaWithFormRestrictedKeys = {
+ description?: string;
+ 'x-enum-descriptions'?: string;
+ 'x-enum-varnames'?: string;
+ 'x-enumNames'?: string;
+ title?: string;
+ object?: {
+ description?: string;
+ 'x-enum-descriptions'?: string;
+ 'x-enum-varnames'?: string;
+ 'x-enumNames'?: string;
+ title?: string;
+ };
+ array?: Array<{
+ description?: string;
+ 'x-enum-descriptions'?: string;
+ 'x-enum-varnames'?: string;
+ 'x-enumNames'?: string;
+ title?: string;
+ }>;
+};
+
+/**
+ * This schema was giving PascalCase transformations a hard time
+ */
+export type IoK8sApimachineryPkgApisMetaV1DeleteOptions = {
+ /**
+ * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.
+ */
+ preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions;
+};
+
+/**
+ * This schema was giving PascalCase transformations a hard time
+ */
+export type IoK8sApimachineryPkgApisMetaV1Preconditions = {
+ /**
+ * Specifies the target ResourceVersion
+ */
+ resourceVersion?: string;
+ /**
+ * Specifies the target UID.
+ */
+ uid?: string;
+};
+
+export type AdditionalPropertiesUnknownIssue = {
+ [key: string]: string | number;
+};
+
+export type AdditionalPropertiesUnknownIssue2 = {
+ [key: string]: string | number;
+};
+
+export type AdditionalPropertiesUnknownIssue3 = string & {
+ entries: {
+ [key: string]: AdditionalPropertiesUnknownIssue;
+ };
+};
+
+export type AdditionalPropertiesIntegerIssue = {
+ value: number;
+ [key: string]: number;
+};
+
+export type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;
+
+export type GenericSchemaDuplicateIssue1SystemBoolean = {
+ item?: boolean;
+ error?: string | null;
+ readonly hasError?: boolean;
+ data?: {
+ [key: string]: never;
+ };
+};
+
+export type GenericSchemaDuplicateIssue1SystemString = {
+ item?: string | null;
+ error?: string | null;
+ readonly hasError?: boolean;
+};
+
+export type ExternalSharedExternalSharedModel = {
+ id: string;
+ name?: string;
+};
+
+/**
+ * This is a model with one property containing a reference
+ */
+export type ModelWithReferenceWritable = {
+ prop?: ModelWithPropertiesWritable;
+};
+
+/**
+ * This is a model with one property containing an array
+ */
+export type ModelWithArrayReadOnlyAndWriteOnlyWritable = {
+ prop?: Array;
+ propWithFile?: Array;
+ propWithNumber?: Array;
+};
+
+/**
+ * This is a model with one nested property
+ */
+export type ModelWithPropertiesWritable = {
+ required: string;
+ requiredAndNullable: string | null;
+ string?: string;
+ number?: number;
+ boolean?: boolean;
+ reference?: ModelWithString;
+ 'property with space'?: string;
+ default?: string;
+ try?: string;
+};
+
+/**
+ * This is a model that contains a some patterns
+ */
+export type ModelWithPatternWritable = {
+ key: string;
+ name: string;
+ id?: string;
+ text?: string;
+ patternWithSingleQuotes?: string;
+ patternWithNewline?: string;
+ patternWithBacktick?: string;
+};
+
+export type FileWritable = {
+ /**
+ * Mime
+ */
+ mime: string;
+};
+
+export type ModelWithReadOnlyAndWriteOnlyWritable = {
+ foo: string;
+ baz: string;
+};
+
+export type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable = [
+ number | Import,
+ number | Import
+];
+
+export type AdditionalPropertiesUnknownIssueWritable = {
+ [key: string]: string | number;
+};
+
+export type OneOfAllOfIssueWritable = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString;
+
+export type GenericSchemaDuplicateIssue1SystemBooleanWritable = {
+ item?: boolean;
+ error?: string | null;
+ data?: {
+ [key: string]: never;
+ };
+};
+
+export type GenericSchemaDuplicateIssue1SystemStringWritable = {
+ item?: string | null;
+ error?: string | null;
+};
+
+/**
+ * This is a reusable parameter
+ */
+export type SimpleParameter = string;
+
+/**
+ * Parameter with illegal characters
+ */
+export type XFooBar = ModelWithString;
+
+/**
+ * A reusable request body
+ */
+export type SimpleRequestBody = ModelWithString;
+
+/**
+ * A reusable request body
+ */
+export type SimpleFormData = ModelWithString;
+
+export type ExportData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/no+tag';
+};
+
+export type PatchApiVbyApiVersionNoTagData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/no+tag';
+};
+
+export type PatchApiVbyApiVersionNoTagResponses = {
+ /**
+ * OK
+ */
+ default: unknown;
+};
+
+export type ImportData = {
+ body: ModelWithReadOnlyAndWriteOnlyWritable | ModelWithArrayReadOnlyAndWriteOnlyWritable;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/no+tag';
+};
+
+export type ImportResponses = {
+ /**
+ * Success
+ */
+ 200: ModelFromZendesk;
+ /**
+ * Default success response
+ */
+ default: ModelWithReadOnlyAndWriteOnly;
+};
+
+export type ImportResponse = ImportResponses[keyof ImportResponses];
+
+export type FooWowData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/no+tag';
+};
+
+export type FooWowResponses = {
+ /**
+ * OK
+ */
+ default: unknown;
+};
+
+export type ApiVVersionODataControllerCountData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/simple/$count';
+};
+
+export type ApiVVersionODataControllerCountResponses = {
+ /**
+ * Success
+ */
+ 200: ModelFromZendesk;
+};
+
+export type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses];
+
+export type GetApiVbyApiVersionSimpleOperationData = {
+ body?: never;
+ path: {
+ /**
+ * foo in method
+ */
+ foo_param: string;
+ };
+ query?: never;
+ url: '/api/v{api-version}/simple:operation';
+};
+
+export type GetApiVbyApiVersionSimpleOperationErrors = {
+ /**
+ * Default error response
+ */
+ default: ModelWithBoolean;
+};
+
+export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors];
+
+export type GetApiVbyApiVersionSimpleOperationResponses = {
+ /**
+ * Response is a simple number
+ */
+ 200: number;
+};
+
+export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses];
+
+export type DeleteCallWithoutParametersAndResponseData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/simple';
+};
+
+export type GetCallWithoutParametersAndResponseData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/simple';
+};
+
+export type HeadCallWithoutParametersAndResponseData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/simple';
+};
+
+export type OptionsCallWithoutParametersAndResponseData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/simple';
+};
+
+export type PatchCallWithoutParametersAndResponseData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/simple';
+};
+
+export type PostCallWithoutParametersAndResponseData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/simple';
+};
+
+export type PutCallWithoutParametersAndResponseData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/simple';
+};
+
+export type DeleteFooData3 = {
+ body?: never;
+ headers: {
+ /**
+ * Parameter with illegal characters
+ */
+ 'x-Foo-Bar': ModelWithString;
+ };
+ path: {
+ /**
+ * foo in method
+ */
+ foo_param: string;
+ /**
+ * bar in method
+ */
+ BarParam: string;
+ };
+ query?: never;
+ url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}';
+};
+
+export type CallWithDescriptionsData = {
+ body?: never;
+ path?: never;
+ query?: {
+ /**
+ * Testing multiline comments in string: First line
+ * Second line
+ *
+ * Fourth line
+ */
+ parameterWithBreaks?: string;
+ /**
+ * Testing backticks in string: `backticks` and ```multiple backticks``` should work
+ */
+ parameterWithBackticks?: string;
+ /**
+ * Testing slashes in string: \backwards\\\ and /forwards/// should work
+ */
+ parameterWithSlashes?: string;
+ /**
+ * Testing expression placeholders in string: ${expression} should work
+ */
+ parameterWithExpressionPlaceholders?: string;
+ /**
+ * Testing quotes in string: 'single quote''' and "double quotes""" should work
+ */
+ parameterWithQuotes?: string;
+ /**
+ * Testing reserved characters in string: * inline * and ** inline ** should work
+ */
+ parameterWithReservedCharacters?: string;
+ };
+ url: '/api/v{api-version}/descriptions';
+};
+
+export type DeprecatedCallData = {
+ body?: never;
+ headers: {
+ /**
+ * This parameter is deprecated
+ *
+ * @deprecated
+ */
+ parameter: DeprecatedModel | null;
+ };
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/parameters/deprecated';
+};
+
+export type CallWithParametersData = {
+ /**
+ * This is the parameter that goes into the body
+ */
+ body: {
+ [key: string]: unknown;
+ } | null;
+ headers: {
+ /**
+ * This is the parameter that goes into the header
+ */
+ parameterHeader: string | null;
+ };
+ path: {
+ /**
+ * This is the parameter that goes into the path
+ */
+ parameterPath: string | null;
+ /**
+ * api-version should be required in standalone clients
+ */
+ 'api-version': string | null;
+ };
+ query: {
+ foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo;
+ foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo;
+ /**
+ * This is the parameter that goes into the query params
+ */
+ cursor: string | null;
+ };
+ url: '/api/v{api-version}/parameters/{parameterPath}';
+};
+
+export type CallWithWeirdParameterNamesData = {
+ /**
+ * This is the parameter that goes into the body
+ */
+ body: ModelWithString | null;
+ headers: {
+ /**
+ * This is the parameter that goes into the request header
+ */
+ 'parameter.header': string | null;
+ };
+ path: {
+ /**
+ * This is the parameter that goes into the path
+ */
+ 'parameter.path.1'?: string;
+ /**
+ * This is the parameter that goes into the path
+ */
+ 'parameter-path-2'?: string;
+ /**
+ * This is the parameter that goes into the path
+ */
+ 'PARAMETER-PATH-3'?: string;
+ /**
+ * api-version should be required in standalone clients
+ */
+ 'api-version': string | null;
+ };
+ query: {
+ /**
+ * This is the parameter with a reserved keyword
+ */
+ default?: string;
+ /**
+ * This is the parameter that goes into the request query params
+ */
+ 'parameter-query': string | null;
+ };
+ url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}';
+};
+
+export type GetCallWithOptionalParamData = {
+ /**
+ * This is a required parameter
+ */
+ body: ModelWithOneOfEnum;
+ path?: never;
+ query?: {
+ /**
+ * This is an optional parameter
+ */
+ page?: number;
+ };
+ url: '/api/v{api-version}/parameters';
+};
+
+export type PostCallWithOptionalParamData = {
+ /**
+ * This is an optional parameter
+ */
+ body?: {
+ offset?: number | null;
+ };
+ path?: never;
+ query: {
+ /**
+ * This is a required parameter
+ */
+ parameter: Pageable;
+ };
+ url: '/api/v{api-version}/parameters';
+};
+
+export type PostCallWithOptionalParamResponses = {
+ /**
+ * Response is a simple number
+ */
+ 200: number;
+ /**
+ * Success
+ */
+ 204: void;
+};
+
+export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses];
+
+export type PostApiVbyApiVersionRequestBodyData = {
+ /**
+ * A reusable request body
+ */
+ body?: SimpleRequestBody;
+ path?: never;
+ query?: {
+ /**
+ * This is a reusable parameter
+ */
+ parameter?: string;
+ };
+ url: '/api/v{api-version}/requestBody';
+};
+
+export type PostApiVbyApiVersionFormDataData = {
+ /**
+ * A reusable request body
+ */
+ body?: SimpleFormData;
+ path?: never;
+ query?: {
+ /**
+ * This is a reusable parameter
+ */
+ parameter?: string;
+ };
+ url: '/api/v{api-version}/formData';
+};
+
+export type CallWithDefaultParametersData = {
+ body?: never;
+ path?: never;
+ query?: {
+ /**
+ * This is a simple string with default value
+ */
+ parameterString?: string | null;
+ /**
+ * This is a simple number with default value
+ */
+ parameterNumber?: number | null;
+ /**
+ * This is a simple boolean with default value
+ */
+ parameterBoolean?: boolean | null;
+ /**
+ * This is a simple enum with default value
+ */
+ parameterEnum?: 'Success' | 'Warning' | 'Error';
+ /**
+ * This is a simple model with default value
+ */
+ parameterModel?: ModelWithString | null;
+ };
+ url: '/api/v{api-version}/defaults';
+};
+
+export type CallWithDefaultOptionalParametersData = {
+ body?: never;
+ path?: never;
+ query?: {
+ /**
+ * This is a simple string that is optional with default value
+ */
+ parameterString?: string;
+ /**
+ * This is a simple number that is optional with default value
+ */
+ parameterNumber?: number;
+ /**
+ * This is a simple boolean that is optional with default value
+ */
+ parameterBoolean?: boolean;
+ /**
+ * This is a simple enum that is optional with default value
+ */
+ parameterEnum?: 'Success' | 'Warning' | 'Error';
+ /**
+ * This is a simple model that is optional with default value
+ */
+ parameterModel?: ModelWithString;
+ };
+ url: '/api/v{api-version}/defaults';
+};
+
+export type CallToTestOrderOfParamsData = {
+ body?: never;
+ path?: never;
+ query: {
+ /**
+ * This is a optional string with default
+ */
+ parameterOptionalStringWithDefault?: string;
+ /**
+ * This is a optional string with empty default
+ */
+ parameterOptionalStringWithEmptyDefault?: string;
+ /**
+ * This is a optional string with no default
+ */
+ parameterOptionalStringWithNoDefault?: string;
+ /**
+ * This is a string with default
+ */
+ parameterStringWithDefault: string;
+ /**
+ * This is a string with empty default
+ */
+ parameterStringWithEmptyDefault: string;
+ /**
+ * This is a string with no default
+ */
+ parameterStringWithNoDefault: string;
+ /**
+ * This is a string that can be null with no default
+ */
+ parameterStringNullableWithNoDefault?: string | null;
+ /**
+ * This is a string that can be null with default
+ */
+ parameterStringNullableWithDefault?: string | null;
+ };
+ url: '/api/v{api-version}/defaults';
+};
+
+export type DuplicateNameData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/duplicate';
+};
+
+export type DuplicateName2Data = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/duplicate';
+};
+
+export type DuplicateName3Data = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/duplicate';
+};
+
+export type DuplicateName4Data = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/duplicate';
+};
+
+export type CallWithNoContentResponseData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/no-content';
+};
+
+export type CallWithNoContentResponseResponses = {
+ /**
+ * Success
+ */
+ 204: void;
+};
+
+export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses];
+
+export type CallWithResponseAndNoContentResponseData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/multiple-tags/response-and-no-content';
+};
+
+export type CallWithResponseAndNoContentResponseResponses = {
+ /**
+ * Response is a simple number
+ */
+ 200: number;
+ /**
+ * Success
+ */
+ 204: void;
+};
+
+export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses];
+
+export type DummyAData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/multiple-tags/a';
+};
+
+export type DummyAResponses = {
+ 200: _400;
+};
+
+export type DummyAResponse = DummyAResponses[keyof DummyAResponses];
+
+export type DummyBData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/multiple-tags/b';
+};
+
+export type DummyBResponses = {
+ /**
+ * Success
+ */
+ 204: void;
+};
+
+export type DummyBResponse = DummyBResponses[keyof DummyBResponses];
+
+export type CallWithResponseData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/response';
+};
+
+export type CallWithResponseResponses = {
+ default: Import;
+};
+
+export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses];
+
+export type CallWithDuplicateResponsesData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/response';
+};
+
+export type CallWithDuplicateResponsesErrors = {
+ /**
+ * Message for 500 error
+ */
+ 500: ModelWithStringError;
+ /**
+ * Message for 501 error
+ */
+ 501: ModelWithStringError;
+ /**
+ * Message for 502 error
+ */
+ 502: ModelWithStringError;
+ /**
+ * Message for 4XX errors
+ */
+ '4XX': DictionaryWithArray;
+ /**
+ * Default error response
+ */
+ default: ModelWithBoolean;
+};
+
+export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors];
+
+export type CallWithDuplicateResponsesResponses = {
+ /**
+ * Message for 200 response
+ */
+ 200: ModelWithBoolean & ModelWithInteger;
+ /**
+ * Message for 201 response
+ */
+ 201: ModelWithString;
+ /**
+ * Message for 202 response
+ */
+ 202: ModelWithString;
+};
+
+export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses];
+
+export type CallWithResponsesData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/response';
+};
+
+export type CallWithResponsesErrors = {
+ /**
+ * Message for 500 error
+ */
+ 500: ModelWithStringError;
+ /**
+ * Message for 501 error
+ */
+ 501: ModelWithStringError;
+ /**
+ * Message for 502 error
+ */
+ 502: ModelWithStringError;
+ /**
+ * Message for default response
+ */
+ default: ModelWithStringError;
+};
+
+export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors];
+
+export type CallWithResponsesResponses = {
+ /**
+ * Message for 200 response
+ */
+ 200: {
+ readonly '@namespace.string'?: string;
+ readonly '@namespace.integer'?: number;
+ readonly value?: Array;
+ };
+ /**
+ * Message for 201 response
+ */
+ 201: ModelThatExtends;
+ /**
+ * Message for 202 response
+ */
+ 202: ModelThatExtendsExtends;
+};
+
+export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses];
+
+export type CollectionFormatData = {
+ body?: never;
+ path?: never;
+ query: {
+ /**
+ * This is an array parameter that is sent as csv format (comma-separated values)
+ */
+ parameterArrayCSV: Array | null;
+ /**
+ * This is an array parameter that is sent as ssv format (space-separated values)
+ */
+ parameterArraySSV: Array | null;
+ /**
+ * This is an array parameter that is sent as tsv format (tab-separated values)
+ */
+ parameterArrayTSV: Array | null;
+ /**
+ * This is an array parameter that is sent as pipes format (pipe-separated values)
+ */
+ parameterArrayPipes: Array | null;
+ /**
+ * This is an array parameter that is sent as multi format (multiple parameter instances)
+ */
+ parameterArrayMulti: Array | null;
+ };
+ url: '/api/v{api-version}/collectionFormat';
+};
+
+export type TypesData = {
+ body?: never;
+ path?: {
+ /**
+ * This is a number parameter
+ */
+ id?: number;
+ };
+ query: {
+ /**
+ * This is a number parameter
+ */
+ parameterNumber: number;
+ /**
+ * This is a string parameter
+ */
+ parameterString: string | null;
+ /**
+ * This is a boolean parameter
+ */
+ parameterBoolean: boolean | null;
+ /**
+ * This is an object parameter
+ */
+ parameterObject: {
+ [key: string]: unknown;
+ } | null;
+ /**
+ * This is an array parameter
+ */
+ parameterArray: Array | null;
+ /**
+ * This is a dictionary parameter
+ */
+ parameterDictionary: {
+ [key: string]: unknown;
+ } | null;
+ /**
+ * This is an enum parameter
+ */
+ parameterEnum: 'Success' | 'Warning' | 'Error' | null;
+ };
+ url: '/api/v{api-version}/types';
+};
+
+export type TypesResponses = {
+ /**
+ * Response is a simple number
+ */
+ 200: number;
+ /**
+ * Response is a simple string
+ */
+ 201: string;
+ /**
+ * Response is a simple boolean
+ */
+ 202: boolean;
+ /**
+ * Response is a simple object
+ */
+ 203: {
+ [key: string]: unknown;
+ };
+};
+
+export type TypesResponse = TypesResponses[keyof TypesResponses];
+
+export type UploadFileData = {
+ body: Blob | File;
+ path: {
+ /**
+ * api-version should be required in standalone clients
+ */
+ 'api-version': string | null;
+ };
+ query?: never;
+ url: '/api/v{api-version}/upload';
+};
+
+export type UploadFileResponses = {
+ 200: boolean;
+};
+
+export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses];
+
+export type FileResponseData = {
+ body?: never;
+ path: {
+ id: string;
+ /**
+ * api-version should be required in standalone clients
+ */
+ 'api-version': string;
+ };
+ query?: never;
+ url: '/api/v{api-version}/file/{id}';
+};
+
+export type FileResponseResponses = {
+ /**
+ * Success
+ */
+ 200: Blob | File;
+};
+
+export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses];
+
+export type ComplexTypesData = {
+ body?: never;
+ path?: never;
+ query: {
+ /**
+ * Parameter containing object
+ */
+ parameterObject: {
+ first?: {
+ second?: {
+ third?: string;
+ };
+ };
+ };
+ /**
+ * Parameter containing reference
+ */
+ parameterReference: ModelWithString;
+ };
+ url: '/api/v{api-version}/complex';
+};
+
+export type ComplexTypesErrors = {
+ /**
+ * 400 `server` error
+ */
+ 400: unknown;
+ /**
+ * 500 server error
+ */
+ 500: unknown;
+};
+
+export type ComplexTypesResponses = {
+ /**
+ * Successful response
+ */
+ 200: Array;
+};
+
+export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses];
+
+export type MultipartResponseData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/multipart';
+};
+
+export type MultipartResponseResponses = {
+ /**
+ * OK
+ */
+ 200: {
+ file?: Blob | File;
+ metadata?: {
+ foo?: string;
+ bar?: string;
+ };
+ };
+};
+
+export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses];
+
+export type MultipartRequestData = {
+ body?: {
+ content?: Blob | File;
+ data?: ModelWithString | null;
+ };
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/multipart';
+};
+
+export type ComplexParamsData = {
+ body?: {
+ readonly key: string | null;
+ name: string | null;
+ enabled?: boolean;
+ type: 'Monkey' | 'Horse' | 'Bird';
+ listOfModels?: Array | null;
+ listOfStrings?: Array | null;
+ parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;
+ readonly user?: {
+ readonly id?: number;
+ readonly name?: string | null;
+ };
+ };
+ path: {
+ id: number;
+ /**
+ * api-version should be required in standalone clients
+ */
+ 'api-version': string;
+ };
+ query?: never;
+ url: '/api/v{api-version}/complex/{id}';
+};
+
+export type ComplexParamsResponses = {
+ /**
+ * Success
+ */
+ 200: ModelWithString;
+};
+
+export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses];
+
+export type CallWithResultFromHeaderData = {
+ body?: never;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/header';
+};
+
+export type CallWithResultFromHeaderErrors = {
+ /**
+ * 400 server error
+ */
+ 400: unknown;
+ /**
+ * 500 server error
+ */
+ 500: unknown;
+};
+
+export type CallWithResultFromHeaderResponses = {
+ /**
+ * Successful response
+ */
+ 200: unknown;
+};
+
+export type TestErrorCodeData = {
+ body?: never;
+ path?: never;
+ query: {
+ /**
+ * Status code to return
+ */
+ status: number;
+ };
+ url: '/api/v{api-version}/error';
+};
+
+export type TestErrorCodeErrors = {
+ /**
+ * Custom message: Internal Server Error
+ */
+ 500: unknown;
+ /**
+ * Custom message: Not Implemented
+ */
+ 501: unknown;
+ /**
+ * Custom message: Bad Gateway
+ */
+ 502: unknown;
+ /**
+ * Custom message: Service Unavailable
+ */
+ 503: unknown;
+};
+
+export type TestErrorCodeResponses = {
+ /**
+ * Custom message: Successful response
+ */
+ 200: unknown;
+};
+
+export type NonAsciiæøåÆøÅöôêÊ字符串Data = {
+ body?: never;
+ path?: never;
+ query: {
+ /**
+ * Dummy input param
+ */
+ nonAsciiParamæøåÆØÅöôêÊ: number;
+ };
+ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';
+};
+
+export type NonAsciiæøåÆøÅöôêÊ字符串Responses = {
+ /**
+ * Successful response
+ */
+ 200: Array;
+};
+
+export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses];
+
+export type PutWithFormUrlEncodedData = {
+ body: ArrayWithStrings;
+ path?: never;
+ query?: never;
+ url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串';
+};
diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client.gen.ts
new file mode 100644
index 000000000..6b55ac80f
--- /dev/null
+++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client.gen.ts
@@ -0,0 +1,18 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import { type ClientOptions, type Config, createClient, createConfig } from './client';
+import type { ClientOptions as ClientOptions2 } from './types.gen';
+
+/**
+ * The `createClientConfig()` function will be called on client initialization
+ * and the returned object will become the client's initial configuration.
+ *
+ * You may want to initialize your client this way instead of calling
+ * `setConfig()`. This is useful for example if you're using Next.js
+ * to ensure your client always has the correct values.
+ */
+export type CreateClientConfig = (override?: Config) => Config & T>;
+
+export const client = createClient(createConfig({
+ baseUrl: 'http://localhost:3000/base'
+}));
diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client/client.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client/client.gen.ts
new file mode 100644
index 000000000..1555ca230
--- /dev/null
+++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client/client.gen.ts
@@ -0,0 +1,261 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import type { HttpResponse } from '@angular/common/http';
+import {
+ HttpClient,
+ HttpErrorResponse,
+ HttpEventType,
+ HttpRequest,
+} from '@angular/common/http';
+import {
+ assertInInjectionContext,
+ inject,
+ provideAppInitializer,
+ runInInjectionContext,
+} from '@angular/core';
+import { firstValueFrom } from 'rxjs';
+import { filter } from 'rxjs/operators';
+
+import { createSseClient } from '../core/serverSentEvents.gen';
+import type { HttpMethod } from '../core/types.gen';
+import { getValidRequestBody } from '../core/utils.gen';
+import type {
+ Client,
+ Config,
+ RequestOptions,
+ ResolvedRequestOptions,
+ ResponseStyle,
+} from './types.gen';
+import {
+ buildUrl,
+ createConfig,
+ createInterceptors,
+ mergeConfigs,
+ mergeHeaders,
+ setAuthParams,
+} from './utils.gen';
+
+export function provideHeyApiClient(client: Client) {
+ return provideAppInitializer(() => {
+ const httpClient = inject(HttpClient);
+ client.setConfig({ httpClient });
+ });
+}
+
+export const createClient = (config: Config = {}): Client => {
+ let _config = mergeConfigs(createConfig(), config);
+
+ const getConfig = (): Config => ({ ..._config });
+
+ const setConfig = (config: Config): Config => {
+ _config = mergeConfigs(_config, config);
+ return getConfig();
+ };
+
+ const interceptors = createInterceptors<
+ HttpRequest,
+ HttpResponse,
+ unknown,
+ ResolvedRequestOptions
+ >();
+
+ const requestOptions = <
+ ThrowOnError extends boolean = false,
+ TResponseStyle extends ResponseStyle = 'fields',
+ >(
+ options: RequestOptions,
+ ) => {
+ const opts = {
+ ..._config,
+ ...options,
+ headers: mergeHeaders(_config.headers, options.headers),
+ httpClient: options.httpClient ?? _config.httpClient,
+ serializedBody: undefined,
+ };
+
+ if (!opts.httpClient) {
+ if (opts.injector) {
+ opts.httpClient = runInInjectionContext(opts.injector, () =>
+ inject(HttpClient),
+ );
+ } else {
+ assertInInjectionContext(requestOptions);
+ opts.httpClient = inject(HttpClient);
+ }
+ }
+
+ if (opts.body !== undefined && opts.bodySerializer) {
+ opts.serializedBody = opts.bodySerializer(opts.body);
+ }
+
+ // remove Content-Type header if body is empty to avoid sending invalid requests
+ if (opts.body === undefined || opts.serializedBody === '') {
+ opts.headers.delete('Content-Type');
+ }
+
+ const url = buildUrl(opts as any);
+
+ const req = new HttpRequest(
+ opts.method ?? 'GET',
+ url,
+ getValidRequestBody(opts),
+ {
+ redirect: 'follow',
+ ...opts,
+ },
+ );
+
+ return { opts, req, url };
+ };
+
+ const beforeRequest = async (options: RequestOptions) => {
+ const { opts, req, url } = requestOptions(options);
+
+ if (opts.security) {
+ await setAuthParams({
+ ...opts,
+ security: opts.security,
+ });
+ }
+
+ if (opts.requestValidator) {
+ await opts.requestValidator(opts);
+ }
+
+ return { opts, req, url };
+ };
+
+ const request: Client['request'] = async (options) => {
+ // @ts-expect-error
+ const { opts, req: initialReq } = await beforeRequest(options);
+
+ let req = initialReq;
+
+ for (const fn of interceptors.request.fns) {
+ if (fn) {
+ req = await fn(req, opts as any);
+ }
+ }
+
+ const result: {
+ request: HttpRequest;
+ response: any;
+ } = {
+ request: req,
+ response: null,
+ };
+
+ try {
+ result.response = (await firstValueFrom(
+ opts
+ .httpClient!.request(req)
+ .pipe(filter((event) => event.type === HttpEventType.Response)),
+ )) as HttpResponse;
+
+ for (const fn of interceptors.response.fns) {
+ if (fn) {
+ result.response = await fn(result.response, req, opts as any);
+ }
+ }
+
+ let bodyResponse = result.response.body;
+
+ if (opts.responseValidator) {
+ await opts.responseValidator(bodyResponse);
+ }
+
+ if (opts.responseTransformer) {
+ bodyResponse = await opts.responseTransformer(bodyResponse);
+ }
+
+ return opts.responseStyle === 'data'
+ ? bodyResponse
+ : { data: bodyResponse, ...result };
+ } catch (error) {
+ if (error instanceof HttpErrorResponse) {
+ result.response = error;
+ }
+
+ let finalError = error instanceof HttpErrorResponse ? error.error : error;
+
+ for (const fn of interceptors.error.fns) {
+ if (fn) {
+ finalError = (await fn(
+ finalError,
+ result.response as any,
+ req,
+ opts as any,
+ )) as string;
+ }
+ }
+
+ if (opts.throwOnError) {
+ throw finalError;
+ }
+
+ return opts.responseStyle === 'data'
+ ? undefined
+ : {
+ error: finalError,
+ ...result,
+ };
+ }
+ };
+
+ const makeMethodFn =
+ (method: Uppercase) => (options: RequestOptions) =>
+ request({ ...options, method });
+
+ const makeSseFn =
+ (method: Uppercase) => async (options: RequestOptions) => {
+ const { opts, url } = await beforeRequest(options);
+ return createSseClient({
+ ...opts,
+ body: opts.body as BodyInit | null | undefined,
+ headers: opts.headers as unknown as Record,
+ method,
+ url,
+ });
+ };
+
+ return {
+ buildUrl,
+ connect: makeMethodFn('CONNECT'),
+ delete: makeMethodFn('DELETE'),
+ get: makeMethodFn('GET'),
+ getConfig,
+ head: makeMethodFn('HEAD'),
+ interceptors,
+ options: makeMethodFn('OPTIONS'),
+ patch: makeMethodFn('PATCH'),
+ post: makeMethodFn('POST'),
+ put: makeMethodFn('PUT'),
+ request,
+ requestOptions: (options) => {
+ if (options.security) {
+ throw new Error('Security is not supported in requestOptions');
+ }
+
+ if (options.requestValidator) {
+ throw new Error(
+ 'Request validation is not supported in requestOptions',
+ );
+ }
+
+ return requestOptions(options).req;
+ },
+ setConfig,
+ sse: {
+ connect: makeSseFn('CONNECT'),
+ delete: makeSseFn('DELETE'),
+ get: makeSseFn('GET'),
+ head: makeSseFn('HEAD'),
+ options: makeSseFn('OPTIONS'),
+ patch: makeSseFn('PATCH'),
+ post: makeSseFn('POST'),
+ put: makeSseFn('PUT'),
+ trace: makeSseFn('TRACE'),
+ },
+ trace: makeMethodFn('TRACE'),
+ } as Client;
+};
diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client/index.ts
new file mode 100644
index 000000000..b295edeca
--- /dev/null
+++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client/index.ts
@@ -0,0 +1,25 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+export type { Auth } from '../core/auth.gen';
+export type { QuerySerializerOptions } from '../core/bodySerializer.gen';
+export {
+ formDataBodySerializer,
+ jsonBodySerializer,
+ urlSearchParamsBodySerializer,
+} from '../core/bodySerializer.gen';
+export { buildClientParams } from '../core/params.gen';
+export { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';
+export { createClient } from './client.gen';
+export type {
+ Client,
+ ClientOptions,
+ Config,
+ CreateClientConfig,
+ Options,
+ RequestOptions,
+ RequestResult,
+ ResolvedRequestOptions,
+ ResponseStyle,
+ TDataShape,
+} from './types.gen';
+export { createConfig, mergeHeaders } from './utils.gen';
diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client/types.gen.ts
new file mode 100644
index 000000000..c7b4e2e12
--- /dev/null
+++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client/types.gen.ts
@@ -0,0 +1,256 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import type {
+ HttpClient,
+ HttpErrorResponse,
+ HttpHeaders,
+ HttpRequest,
+ HttpResponse,
+} from '@angular/common/http';
+import type { Injector } from '@angular/core';
+
+import type { Auth } from '../core/auth.gen';
+import type {
+ ServerSentEventsOptions,
+ ServerSentEventsResult,
+} from '../core/serverSentEvents.gen';
+import type {
+ Client as CoreClient,
+ Config as CoreConfig,
+} from '../core/types.gen';
+import type { Middleware } from './utils.gen';
+
+export type ResponseStyle = 'data' | 'fields';
+
+export interface Config
+ extends Omit,
+ Omit {
+ /**
+ * Base URL for all requests made by this client.
+ */
+ baseUrl?: T['baseUrl'];
+ /**
+ * An object containing any HTTP headers that you want to pre-populate your
+ * `HttpHeaders` object with.
+ *
+ * {@link https://angular.dev/api/common/http/HttpHeaders#constructor See more}
+ */
+ headers?:
+ | HttpHeaders
+ | Record<
+ string,
+ | string
+ | number
+ | boolean
+ | (string | number | boolean)[]
+ | null
+ | undefined
+ | unknown
+ >;
+ /**
+ * The HTTP client to use for making requests.
+ */
+ httpClient?: HttpClient;
+ /**
+ * Should we return only data or multiple fields (data, error, response, etc.)?
+ *
+ * @default 'fields'
+ */
+ responseStyle?: ResponseStyle;
+
+ /**
+ * Throw an error instead of returning it in the response?
+ *
+ * @default false
+ */
+ throwOnError?: T['throwOnError'];
+}
+
+export interface RequestOptions<
+ TData = unknown,
+ TResponseStyle extends ResponseStyle = 'fields',
+ ThrowOnError extends boolean = boolean,
+ Url extends string = string,
+> extends Config<{
+ responseStyle: TResponseStyle;
+ throwOnError: ThrowOnError;
+ }>,
+ Pick<
+ ServerSentEventsOptions,
+ | 'onSseError'
+ | 'onSseEvent'
+ | 'sseDefaultRetryDelay'
+ | 'sseMaxRetryAttempts'
+ | 'sseMaxRetryDelay'
+ > {
+ /**
+ * Any body that you want to add to your request.
+ *
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
+ */
+ body?: unknown;
+ /**
+ * Optional custom injector for dependency resolution if you don't implicitly or explicitly provide one.
+ */
+ injector?: Injector;
+ path?: Record;
+ query?: Record;
+ /**
+ * Security mechanism(s) to use for the request.
+ */
+ security?: ReadonlyArray;
+ url: Url;
+}
+
+export interface ResolvedRequestOptions<
+ TResponseStyle extends ResponseStyle = 'fields',
+ ThrowOnError extends boolean = boolean,
+ Url extends string = string,
+> extends RequestOptions {
+ serializedBody?: string;
+}
+
+export type RequestResult<
+ TData = unknown,
+ TError = unknown,
+ ThrowOnError extends boolean = boolean,
+ TResponseStyle extends ResponseStyle = 'fields',
+> = Promise<
+ ThrowOnError extends true
+ ? TResponseStyle extends 'data'
+ ? TData extends Record
+ ? TData[keyof TData]
+ : TData
+ : {
+ data: TData extends Record
+ ? TData[keyof TData]
+ : TData;
+ request: HttpRequest;
+ response: HttpResponse;
+ }
+ : TResponseStyle extends 'data'
+ ?
+ | (TData extends Record ? TData[keyof TData] : TData)
+ | undefined
+ :
+ | {
+ data: TData extends Record
+ ? TData[keyof TData]
+ : TData;
+ error: undefined;
+ request: HttpRequest;
+ response: HttpResponse;
+ }
+ | {
+ data: undefined;
+ error: TError[keyof TError];
+ request: HttpRequest;
+ response: HttpErrorResponse & {
+ error: TError[keyof TError] | null;
+ };
+ }
+>;
+
+export interface ClientOptions {
+ baseUrl?: string;
+ responseStyle?: ResponseStyle;
+ throwOnError?: boolean;
+}
+
+type MethodFn = <
+ TData = unknown,
+ TError = unknown,
+ ThrowOnError extends boolean = false,
+ TResponseStyle extends ResponseStyle = 'fields',
+>(
+ options: Omit, 'method'>,
+) => RequestResult;
+
+type SseFn = <
+ TData = unknown,
+ TError = unknown,
+ ThrowOnError extends boolean = false,
+ TResponseStyle extends ResponseStyle = 'fields',
+>(
+ options: Omit, 'method'>,
+) => Promise>;
+
+type RequestFn = <
+ TData = unknown,
+ TError = unknown,
+ ThrowOnError extends boolean = false,
+ TResponseStyle extends ResponseStyle = 'fields',
+>(
+ options: Omit, 'method'> &
+ Pick<
+ Required>,
+ 'method'
+ >,
+) => RequestResult;
+
+type RequestOptionsFn = <
+ ThrowOnError extends boolean = false,
+ TResponseStyle extends ResponseStyle = 'fields',
+>(
+ options: RequestOptions,
+) => HttpRequest;
+
+type BuildUrlFn = <
+ TData extends {
+ body?: unknown;
+ path?: Record;
+ query?: Record;
+ url: string;
+ },
+>(
+ options: TData & Options,
+) => string;
+
+export type Client = CoreClient<
+ RequestFn,
+ Config,
+ MethodFn,
+ BuildUrlFn,
+ SseFn
+> & {
+ interceptors: Middleware<
+ HttpRequest,
+ HttpResponse,
+ unknown,
+ ResolvedRequestOptions
+ >;
+ requestOptions: RequestOptionsFn;
+};
+
+/**
+ * The `createClientConfig()` function will be called on client initialization
+ * and the returned object will become the client's initial configuration.
+ *
+ * You may want to initialize your client this way instead of calling
+ * `setConfig()`. This is useful for example if you're using Next.js
+ * to ensure your client always has the correct values.
+ */
+export type CreateClientConfig = (
+ override?: Config,
+) => Config & T>;
+
+export interface TDataShape {
+ body?: unknown;
+ headers?: unknown;
+ path?: unknown;
+ query?: unknown;
+ url: string;
+}
+
+type OmitKeys = Pick>;
+
+export type Options<
+ TData extends TDataShape = TDataShape,
+ ThrowOnError extends boolean = boolean,
+ TResponse = unknown,
+ TResponseStyle extends ResponseStyle = 'fields',
+> = OmitKeys<
+ RequestOptions,
+ 'body' | 'path' | 'query' | 'url'
+> &
+ ([TData] extends [never] ? unknown : Omit);
diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client/utils.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client/utils.gen.ts
new file mode 100644
index 000000000..2ff87e260
--- /dev/null
+++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client/utils.gen.ts
@@ -0,0 +1,426 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import { HttpHeaders } from '@angular/common/http';
+
+import { getAuthToken } from '../core/auth.gen';
+import type {
+ QuerySerializer,
+ QuerySerializerOptions,
+} from '../core/bodySerializer.gen';
+import {
+ serializeArrayParam,
+ serializeObjectParam,
+ serializePrimitiveParam,
+} from '../core/pathSerializer.gen';
+import type { Client, ClientOptions, Config, RequestOptions } from './types.gen';
+
+interface PathSerializer {
+ path: Record;
+ url: string;
+}
+
+const PATH_PARAM_RE = /\{[^{}]+\}/g;
+
+type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
+type MatrixStyle = 'label' | 'matrix' | 'simple';
+type ArraySeparatorStyle = ArrayStyle | MatrixStyle;
+
+const defaultPathSerializer = ({ path, url: _url }: PathSerializer) => {
+ let url = _url;
+ const matches = _url.match(PATH_PARAM_RE);
+ if (matches) {
+ for (const match of matches) {
+ let explode = false;
+ let name = match.substring(1, match.length - 1);
+ let style: ArraySeparatorStyle = 'simple';
+
+ if (name.endsWith('*')) {
+ explode = true;
+ name = name.substring(0, name.length - 1);
+ }
+
+ if (name.startsWith('.')) {
+ name = name.substring(1);
+ style = 'label';
+ } else if (name.startsWith(';')) {
+ name = name.substring(1);
+ style = 'matrix';
+ }
+
+ const value = path[name];
+
+ if (value === undefined || value === null) {
+ continue;
+ }
+
+ if (Array.isArray(value)) {
+ url = url.replace(
+ match,
+ serializeArrayParam({ explode, name, style, value }),
+ );
+ continue;
+ }
+
+ if (typeof value === 'object') {
+ url = url.replace(
+ match,
+ serializeObjectParam({
+ explode,
+ name,
+ style,
+ value: value as Record,
+ valueOnly: true,
+ }),
+ );
+ continue;
+ }
+
+ if (style === 'matrix') {
+ url = url.replace(
+ match,
+ `;${serializePrimitiveParam({
+ name,
+ value: value as string,
+ })}`,
+ );
+ continue;
+ }
+
+ const replaceValue = encodeURIComponent(
+ style === 'label' ? `.${value as string}` : (value as string),
+ );
+ url = url.replace(match, replaceValue);
+ }
+ }
+ return url;
+};
+
+export const createQuerySerializer = ({
+ parameters = {},
+ ...args
+}: QuerySerializerOptions = {}) => {
+ const querySerializer = (queryParams: T) => {
+ const search: string[] = [];
+ if (queryParams && typeof queryParams === 'object') {
+ for (const name in queryParams) {
+ const value = queryParams[name];
+
+ if (value === undefined || value === null) {
+ continue;
+ }
+
+ const options = parameters[name] || args;
+
+ if (Array.isArray(value)) {
+ const serializedArray = serializeArrayParam({
+ allowReserved: options.allowReserved,
+ explode: true,
+ name,
+ style: 'form',
+ value,
+ ...options.array,
+ });
+ if (serializedArray) search.push(serializedArray);
+ } else if (typeof value === 'object') {
+ const serializedObject = serializeObjectParam({
+ allowReserved: options.allowReserved,
+ explode: true,
+ name,
+ style: 'deepObject',
+ value: value as Record,
+ ...options.object,
+ });
+ if (serializedObject) search.push(serializedObject);
+ } else {
+ const serializedPrimitive = serializePrimitiveParam({
+ allowReserved: options.allowReserved,
+ name,
+ value: value as string,
+ });
+ if (serializedPrimitive) search.push(serializedPrimitive);
+ }
+ }
+ }
+ return search.join('&');
+ };
+ return querySerializer;
+};
+
+/**
+ * Infers parseAs value from provided Content-Type header.
+ */
+export const getParseAs = (
+ contentType: string | null,
+): 'blob' | 'formData' | 'json' | 'stream' | 'text' | undefined => {
+ if (!contentType) {
+ // If no Content-Type header is provided, the best we can do is return the raw response body,
+ // which is effectively the same as the 'stream' option.
+ return 'stream';
+ }
+
+ const cleanContent = contentType.split(';')[0]?.trim();
+
+ if (!cleanContent) {
+ return;
+ }
+
+ if (
+ cleanContent.startsWith('application/json') ||
+ cleanContent.endsWith('+json')
+ ) {
+ return 'json';
+ }
+
+ if (cleanContent === 'multipart/form-data') {
+ return 'formData';
+ }
+
+ if (
+ ['application/', 'audio/', 'image/', 'video/'].some((type) =>
+ cleanContent.startsWith(type),
+ )
+ ) {
+ return 'blob';
+ }
+
+ if (cleanContent.startsWith('text/')) {
+ return 'text';
+ }
+
+ return;
+};
+
+export const setAuthParams = async (
+ options: Pick, 'security'> &
+ Pick & {
+ headers: HttpHeaders;
+ },
+) => {
+ for (const auth of options.security) {
+ const token = await getAuthToken(auth, options.auth);
+
+ if (!token) {
+ continue;
+ }
+
+ const name = auth.name ?? 'Authorization';
+
+ switch (auth.in) {
+ case 'query':
+ if (!options.query) {
+ options.query = {};
+ }
+ options.query[name] = token;
+ break;
+ case 'cookie':
+ options.headers = options.headers.append('Cookie', `${name}=${token}`);
+ break;
+ case 'header':
+ default:
+ options.headers = options.headers.set(name, token);
+ break;
+ }
+
+ return;
+ }
+};
+
+export const buildUrl: Client['buildUrl'] = (options) => {
+ const url = getUrl({
+ baseUrl: options.baseUrl as string,
+ path: options.path,
+ query: options.query,
+ querySerializer:
+ typeof options.querySerializer === 'function'
+ ? options.querySerializer
+ : createQuerySerializer(options.querySerializer),
+ url: options.url,
+ });
+ return url;
+};
+
+export const getUrl = ({
+ baseUrl,
+ path,
+ query,
+ querySerializer,
+ url: _url,
+}: {
+ baseUrl?: string;
+ path?: Record;
+ query?: Record;
+ querySerializer: QuerySerializer;
+ url: string;
+}) => {
+ const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;
+ let url = (baseUrl ?? '') + pathUrl;
+ if (path) {
+ url = defaultPathSerializer({ path, url });
+ }
+ let search = query ? querySerializer(query) : '';
+ if (search.startsWith('?')) {
+ search = search.substring(1);
+ }
+ if (search) {
+ url += `?${search}`;
+ }
+ return url;
+};
+
+export const mergeConfigs = (a: Config, b: Config): Config => {
+ const config = { ...a, ...b };
+ if (config.baseUrl?.endsWith('/')) {
+ config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);
+ }
+ config.headers = mergeHeaders(a.headers, b.headers);
+ return config;
+};
+
+export const mergeHeaders = (
+ ...headers: Array['headers'] | undefined>
+): HttpHeaders => {
+ let mergedHeaders = new HttpHeaders();
+
+ for (const header of headers) {
+ if (!header || typeof header !== 'object') {
+ continue;
+ }
+
+ if (header instanceof HttpHeaders) {
+ // Merge HttpHeaders instance
+ header.keys().forEach((key) => {
+ const values = header.getAll(key);
+ if (values) {
+ values.forEach((value) => {
+ mergedHeaders = mergedHeaders.append(key, value);
+ });
+ }
+ });
+ } else {
+ // Merge plain object headers
+ for (const [key, value] of Object.entries(header)) {
+ if (value === null) {
+ mergedHeaders = mergedHeaders.delete(key);
+ } else if (Array.isArray(value)) {
+ for (const v of value) {
+ mergedHeaders = mergedHeaders.append(key, v as string);
+ }
+ } else if (value !== undefined) {
+ // assume object headers are meant to be JSON stringified, i.e. their
+ // content value in OpenAPI specification is 'application/json'
+ mergedHeaders = mergedHeaders.set(
+ key,
+ typeof value === 'object'
+ ? JSON.stringify(value)
+ : (value as string),
+ );
+ }
+ }
+ }
+ }
+
+ return mergedHeaders;
+};
+
+type ErrInterceptor = (
+ error: Err,
+ response: Res,
+ request: Req,
+ options: Options,
+) => Err | Promise;
+
+type ReqInterceptor = (
+ request: Req,
+ options: Options,
+) => Req | Promise;
+
+type ResInterceptor = (
+ response: Res,
+ request: Req,
+ options: Options,
+) => Res | Promise;
+
+class Interceptors {
+ fns: Array = [];
+
+ clear(): void {
+ this.fns = [];
+ }
+
+ eject(id: number | Interceptor): void {
+ const index = this.getInterceptorIndex(id);
+ if (this.fns[index]) {
+ this.fns[index] = null;
+ }
+ }
+
+ exists(id: number | Interceptor): boolean {
+ const index = this.getInterceptorIndex(id);
+ return Boolean(this.fns[index]);
+ }
+
+ getInterceptorIndex(id: number | Interceptor): number {
+ if (typeof id === 'number') {
+ return this.fns[id] ? id : -1;
+ }
+ return this.fns.indexOf(id);
+ }
+
+ update(
+ id: number | Interceptor,
+ fn: Interceptor,
+ ): number | Interceptor | false {
+ const index = this.getInterceptorIndex(id);
+ if (this.fns[index]) {
+ this.fns[index] = fn;
+ return id;
+ }
+ return false;
+ }
+
+ use(fn: Interceptor): number {
+ this.fns.push(fn);
+ return this.fns.length - 1;
+ }
+}
+
+export interface Middleware {
+ error: Interceptors>;
+ request: Interceptors>;
+ response: Interceptors>;
+}
+
+export const createInterceptors = (): Middleware<
+ Req,
+ Res,
+ Err,
+ Options
+> => ({
+ error: new Interceptors>(),
+ request: new Interceptors>(),
+ response: new Interceptors>(),
+});
+
+const defaultQuerySerializer = createQuerySerializer({
+ allowReserved: false,
+ array: {
+ explode: true,
+ style: 'form',
+ },
+ object: {
+ explode: true,
+ style: 'deepObject',
+ },
+});
+
+const defaultHeaders = {
+ 'Content-Type': 'application/json',
+};
+
+export const createConfig = (
+ override: Config & T> = {},
+): Config & T> => ({
+ headers: defaultHeaders,
+ querySerializer: defaultQuerySerializer,
+ ...override,
+});
diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/core/auth.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/core/auth.gen.ts
new file mode 100644
index 000000000..f8a73266f
--- /dev/null
+++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/core/auth.gen.ts
@@ -0,0 +1,42 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+export type AuthToken = string | undefined;
+
+export interface Auth {
+ /**
+ * Which part of the request do we use to send the auth?
+ *
+ * @default 'header'
+ */
+ in?: 'header' | 'query' | 'cookie';
+ /**
+ * Header or query parameter name.
+ *
+ * @default 'Authorization'
+ */
+ name?: string;
+ scheme?: 'basic' | 'bearer';
+ type: 'apiKey' | 'http';
+}
+
+export const getAuthToken = async (
+ auth: Auth,
+ callback: ((auth: Auth) => Promise | AuthToken) | AuthToken,
+): Promise