fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: simplify fastify output

Lubos c2ee902b 715d5a81

+10203 -3278
+45 -32
packages/openapi-ts/src/ir/operation.ts
··· 77 77 }; 78 78 79 79 interface OperationResponsesMap { 80 - error: IRSchemaObject | undefined; 81 - response: IRSchemaObject | undefined; 80 + error?: IRSchemaObject; 81 + errors?: IRSchemaObject; 82 + response?: IRSchemaObject; 83 + responses?: IRSchemaObject; 82 84 } 83 85 84 86 export const operationResponsesMap = ( 85 87 operation: IROperationObject, 86 88 ): OperationResponsesMap => { 87 - const result: OperationResponsesMap = { 88 - error: undefined, 89 - response: undefined, 90 - }; 89 + const result: OperationResponsesMap = {}; 91 90 92 91 if (!operation.responses) { 93 92 return result; 94 93 } 95 94 96 - let errors: IRSchemaObject = {}; 97 - const errorsItems: Array<IRSchemaObject> = []; 95 + const errors: Omit<IRSchemaObject, 'properties'> & 96 + Pick<Required<IRSchemaObject>, 'properties'> = { 97 + properties: {}, 98 + type: 'object', 99 + }; 98 100 99 - let responses: IRSchemaObject = {}; 100 - const responsesItems: Array<IRSchemaObject> = []; 101 + const responses: Omit<IRSchemaObject, 'properties'> & 102 + Pick<Required<IRSchemaObject>, 'properties'> = { 103 + properties: {}, 104 + type: 'object', 105 + }; 101 106 107 + // store default response to be evaluated last 102 108 let defaultResponse: IRResponseObject | undefined; 103 109 104 110 for (const name in operation.responses) { ··· 110 116 // TODO: parser - handle informational and redirection status codes 111 117 break; 112 118 case '2XX': 113 - responsesItems.push(response.schema); 119 + responses.properties[name] = response.schema; 114 120 break; 115 121 case '4XX': 116 122 case '5XX': 117 - errorsItems.push(response.schema); 123 + errors.properties[name] = response.schema; 118 124 break; 119 125 case 'default': 120 - // store default response to be evaluated last 121 126 defaultResponse = response; 122 127 break; 123 128 } ··· 128 133 let inferred = false; 129 134 130 135 // assume default is intended for success if none exists yet 131 - if (!responsesItems.length) { 132 - responsesItems.push(defaultResponse.schema); 136 + if (!Object.keys(responses.properties).length) { 137 + responses.properties.default = defaultResponse.schema; 133 138 inferred = true; 134 139 } 135 140 ··· 145 150 (keyword) => description.includes(keyword) || $ref.includes(keyword), 146 151 ) 147 152 ) { 148 - responsesItems.push(defaultResponse.schema); 153 + responses.properties.default = defaultResponse.schema; 149 154 inferred = true; 150 155 } 151 156 ··· 156 161 (keyword) => description.includes(keyword) || $ref.includes(keyword), 157 162 ) 158 163 ) { 159 - errorsItems.push(defaultResponse.schema); 164 + errors.properties.default = defaultResponse.schema; 160 165 inferred = true; 161 166 } 162 167 163 168 // if no keyword match, assume default schema is intended for error 164 169 if (!inferred) { 165 - errorsItems.push(defaultResponse.schema); 170 + errors.properties.default = defaultResponse.schema; 166 171 } 167 172 } 168 173 169 - if (errorsItems.length) { 170 - errors = addItemsToSchema({ 171 - items: errorsItems, 174 + const errorKeys = Object.keys(errors.properties); 175 + if (errorKeys.length) { 176 + errors.required = errorKeys; 177 + result.errors = errors; 178 + 179 + let errorUnion = addItemsToSchema({ 180 + items: Object.values(errors.properties), 172 181 mutateSchemaOneItem: true, 173 - schema: errors, 182 + schema: {}, 174 183 }); 175 - errors = deduplicateSchema({ schema: errors }); 176 - if (Object.keys(errors).length && errors.type !== 'unknown') { 177 - result.error = errors; 184 + errorUnion = deduplicateSchema({ schema: errorUnion }); 185 + if (Object.keys(errorUnion).length && errorUnion.type !== 'unknown') { 186 + result.error = errorUnion; 178 187 } 179 188 } 180 189 181 - if (responsesItems.length) { 182 - responses = addItemsToSchema({ 183 - items: responsesItems, 190 + const responseKeys = Object.keys(responses.properties); 191 + if (responseKeys.length) { 192 + responses.required = responseKeys; 193 + result.responses = responses; 194 + 195 + let responseUnion = addItemsToSchema({ 196 + items: Object.values(responses.properties), 184 197 mutateSchemaOneItem: true, 185 - schema: responses, 198 + schema: {}, 186 199 }); 187 - responses = deduplicateSchema({ schema: responses }); 188 - if (Object.keys(responses).length && responses.type !== 'unknown') { 189 - result.response = responses; 200 + responseUnion = deduplicateSchema({ schema: responseUnion }); 201 + if (Object.keys(responseUnion).length && responseUnion.type !== 'unknown') { 202 + result.response = responseUnion; 190 203 } 191 204 } 192 205
+18 -17
packages/openapi-ts/src/plugins/@hey-api/services/plugin.ts
··· 33 33 id: string; 34 34 } 35 35 36 - const operationIrRef = ({ 36 + export const operationIrRef = ({ 37 37 id, 38 38 type, 39 39 }: OperationIRRef & { 40 - type: 'data' | 'error' | 'response'; 40 + type: 'data' | 'error' | 'errors' | 'response' | 'responses'; 41 41 }): string => { 42 42 let affix = ''; 43 43 switch (type) { ··· 45 45 affix = 'Data'; 46 46 break; 47 47 case 'error': 48 + // error union 48 49 affix = 'Error'; 50 + break; 51 + case 'errors': 52 + // errors map 53 + affix = 'Errors'; 49 54 break; 50 55 case 'response': 56 + // response union 51 57 affix = 'Response'; 58 + break; 59 + case 'responses': 60 + // responses map 61 + affix = 'Responses'; 52 62 break; 53 63 } 54 64 return `${irRef}${camelCase({ ··· 57 67 })}${affix}`; 58 68 }; 59 69 60 - export const operationDataRef = ({ id }: OperationIRRef): string => 61 - operationIrRef({ id, type: 'data' }); 62 - 63 - export const operationErrorRef = ({ id }: OperationIRRef): string => 64 - operationIrRef({ id, type: 'error' }); 65 - 66 - export const operationResponseRef = ({ id }: OperationIRRef): string => 67 - operationIrRef({ id, type: 'response' }); 68 - 69 70 const servicesId = 'services'; 70 71 71 72 const requestOptions = ({ ··· 205 206 const operation = pathItem[method]!; 206 207 207 208 const identifierData = context.file({ id: 'types' })!.identifier({ 208 - $ref: operationDataRef({ id: operation.id }), 209 + $ref: operationIrRef({ id: operation.id, type: 'data' }), 209 210 namespace: 'type', 210 211 }); 211 212 if (identifierData.name) { ··· 217 218 } 218 219 219 220 const identifierError = context.file({ id: 'types' })!.identifier({ 220 - $ref: operationErrorRef({ id: operation.id }), 221 + $ref: operationIrRef({ id: operation.id, type: 'error' }), 221 222 namespace: 'type', 222 223 }); 223 224 if (identifierError.name) { ··· 229 230 } 230 231 231 232 const identifierResponse = context.file({ id: 'types' })!.identifier({ 232 - $ref: operationResponseRef({ id: operation.id }), 233 + $ref: operationIrRef({ id: operation.id, type: 'response' }), 233 234 namespace: 'type', 234 235 }); 235 236 if (identifierResponse.name) { ··· 330 331 const operation = pathItem[method]!; 331 332 332 333 const identifierData = context.file({ id: 'types' })!.identifier({ 333 - $ref: operationDataRef({ id: operation.id }), 334 + $ref: operationIrRef({ id: operation.id, type: 'data' }), 334 335 namespace: 'type', 335 336 }); 336 337 if (identifierData.name) { ··· 342 343 } 343 344 344 345 const identifierError = context.file({ id: 'types' })!.identifier({ 345 - $ref: operationErrorRef({ id: operation.id }), 346 + $ref: operationIrRef({ id: operation.id, type: 'error' }), 346 347 namespace: 'type', 347 348 }); 348 349 if (identifierError.name) { ··· 354 355 } 355 356 356 357 const identifierResponse = context.file({ id: 'types' })!.identifier({ 357 - $ref: operationResponseRef({ id: operation.id }), 358 + $ref: operationIrRef({ id: operation.id, type: 'response' }), 358 359 namespace: 'type', 359 360 }); 360 361 if (identifierResponse.name) {
+7 -6
packages/openapi-ts/src/plugins/@hey-api/transformers/plugin.ts
··· 11 11 import { camelCase } from '../../../utils/camelCase'; 12 12 import { irRef } from '../../../utils/ref'; 13 13 import type { PluginHandler } from '../../types'; 14 - import { operationResponseRef } from '../services/plugin'; 14 + import { operationIrRef } from '../services/plugin'; 15 15 import type { Config } from './types'; 16 16 17 17 interface OperationIRRef { ··· 21 21 id: string; 22 22 } 23 23 24 - const operationIrRef = ({ 24 + const operationTransformerIrRef = ({ 25 25 id, 26 26 type, 27 27 }: OperationIRRef & { ··· 48 48 49 49 // TODO: parser - currently unused 50 50 export const operationDataTransformerRef = ({ id }: OperationIRRef): string => 51 - operationIrRef({ id, type: 'data' }); 51 + operationTransformerIrRef({ id, type: 'data' }); 52 52 53 53 // TODO: parser - currently unused 54 54 export const operationErrorTransformerRef = ({ id }: OperationIRRef): string => 55 - operationIrRef({ id, type: 'error' }); 55 + operationTransformerIrRef({ id, type: 'error' }); 56 56 57 57 export const operationResponseTransformerRef = ({ 58 58 id, 59 - }: OperationIRRef): string => operationIrRef({ id, type: 'response' }); 59 + }: OperationIRRef): string => 60 + operationTransformerIrRef({ id, type: 'response' }); 60 61 61 62 const schemaIrRef = ({ 62 63 $ref, ··· 385 386 } 386 387 387 388 const identifierResponse = context.file({ id: 'types' })!.identifier({ 388 - $ref: operationResponseRef({ id: operation.id }), 389 + $ref: operationIrRef({ id: operation.id, type: 'response' }), 389 390 namespace: 'type', 390 391 }); 391 392 if (!identifierResponse.name) {
+112 -37
packages/openapi-ts/src/plugins/@hey-api/types/plugin.ts
··· 1 + import ts from 'typescript'; 2 + 1 3 import { compiler } from '../../../compiler'; 2 4 import type { IRContext } from '../../../ir/context'; 3 5 import type { ··· 10 12 import { operationResponsesMap } from '../../../ir/operation'; 11 13 import { deduplicateSchema } from '../../../ir/schema'; 12 14 import type { PluginHandler } from '../../types'; 13 - import { 14 - componentsToType, 15 - schemaToType, 16 - type SchemaToTypeOptions, 17 - } from '../../utils/types'; 18 - import { 19 - operationDataRef, 20 - operationErrorRef, 21 - operationResponseRef, 22 - } from '../services/plugin'; 15 + import { schemaToType, type SchemaToTypeOptions } from '../../utils/types'; 16 + import { operationIrRef } from '../services/plugin'; 23 17 import type { Config } from './types'; 24 18 25 19 export const typesId = 'types'; ··· 141 135 142 136 if (hasAnyProperties) { 143 137 const identifier = context.file({ id: typesId })!.identifier({ 144 - $ref: operationDataRef({ id: operation.id }), 138 + $ref: operationIrRef({ id: operation.id, type: 'data' }), 145 139 create: true, 146 140 namespace: 'type', 147 141 }); ··· 172 166 options, 173 167 }); 174 168 175 - const { error, response } = operationResponsesMap(operation); 169 + const file = context.file({ id: typesId })!; 176 170 177 - if (error) { 178 - const identifier = context.file({ id: typesId })!.identifier({ 179 - $ref: operationErrorRef({ id: operation.id }), 171 + const { error, errors, response, responses } = 172 + operationResponsesMap(operation); 173 + 174 + if (errors) { 175 + const identifierErrors = file.identifier({ 176 + $ref: operationIrRef({ id: operation.id, type: 'errors' }), 180 177 create: true, 181 178 namespace: 'type', 182 179 }); 183 - const node = compiler.typeAliasDeclaration({ 184 - exportType: true, 185 - name: identifier.name || '', 186 - type: schemaToType({ 187 - options, 188 - schema: error, 189 - }), 190 - }); 191 - context.file({ id: typesId })!.add(node); 180 + if (identifierErrors.name) { 181 + const node = compiler.typeAliasDeclaration({ 182 + exportType: true, 183 + name: identifierErrors.name, 184 + type: schemaToType({ 185 + options, 186 + schema: errors, 187 + }), 188 + }); 189 + file.add(node); 190 + 191 + if (error) { 192 + const identifierError = file.identifier({ 193 + $ref: operationIrRef({ id: operation.id, type: 'error' }), 194 + create: true, 195 + namespace: 'type', 196 + }); 197 + if (identifierError.name) { 198 + const errorsType = compiler.typeReferenceNode({ 199 + typeName: identifierErrors.name, 200 + }); 201 + const keyofType = ts.factory.createTypeOperatorNode( 202 + ts.SyntaxKind.KeyOfKeyword, 203 + errorsType, 204 + ); 205 + const node = compiler.typeAliasDeclaration({ 206 + exportType: true, 207 + name: identifierError.name, 208 + type: compiler.indexedAccessTypeNode({ 209 + indexType: keyofType, 210 + objectType: errorsType, 211 + }), 212 + }); 213 + file.add(node); 214 + } 215 + } 216 + } 192 217 } 193 218 194 - if (response) { 195 - const identifier = context.file({ id: typesId })!.identifier({ 196 - $ref: operationResponseRef({ id: operation.id }), 219 + if (responses) { 220 + const identifierResponses = file.identifier({ 221 + $ref: operationIrRef({ id: operation.id, type: 'responses' }), 197 222 create: true, 198 223 namespace: 'type', 199 224 }); 200 - const node = compiler.typeAliasDeclaration({ 201 - exportType: true, 202 - name: identifier.name || '', 203 - type: schemaToType({ 204 - options, 205 - schema: response, 206 - }), 207 - }); 208 - context.file({ id: typesId })!.add(node); 225 + if (identifierResponses.name) { 226 + const node = compiler.typeAliasDeclaration({ 227 + exportType: true, 228 + name: identifierResponses.name, 229 + type: schemaToType({ 230 + options, 231 + schema: responses, 232 + }), 233 + }); 234 + file.add(node); 235 + 236 + if (response) { 237 + const identifierResponse = file.identifier({ 238 + $ref: operationIrRef({ id: operation.id, type: 'response' }), 239 + create: true, 240 + namespace: 'type', 241 + }); 242 + if (identifierResponse.name) { 243 + const responsesType = compiler.typeReferenceNode({ 244 + typeName: identifierResponses.name, 245 + }); 246 + const keyofType = ts.factory.createTypeOperatorNode( 247 + ts.SyntaxKind.KeyOfKeyword, 248 + responsesType, 249 + ); 250 + const node = compiler.typeAliasDeclaration({ 251 + exportType: true, 252 + name: identifierResponse.name, 253 + type: compiler.indexedAccessTypeNode({ 254 + indexType: keyofType, 255 + objectType: responsesType, 256 + }), 257 + }); 258 + file.add(node); 259 + } 260 + } 261 + } 209 262 } 210 263 }; 211 264 ··· 220 273 useTransformersDate: context.config.plugins['@hey-api/transformers']?.dates, 221 274 }; 222 275 223 - componentsToType({ context, options }); 276 + if (context.ir.components) { 277 + for (const name in context.ir.components.schemas) { 278 + const schema = context.ir.components.schemas[name]; 279 + const $ref = `#/components/schemas/${name}`; 280 + 281 + schemaToType({ 282 + $ref, 283 + options, 284 + schema, 285 + }); 286 + } 287 + 288 + for (const name in context.ir.components.parameters) { 289 + const parameter = context.ir.components.parameters[name]; 290 + const $ref = `#/components/parameters/${name}`; 291 + 292 + schemaToType({ 293 + $ref, 294 + options, 295 + schema: parameter.schema, 296 + }); 297 + } 298 + } 224 299 225 300 // TODO: parser - once types are a plugin, this logic can be simplified 226 301 // provide config option on types to generate path types and services
+11 -16
packages/openapi-ts/src/plugins/@tanstack/query-core/plugin.ts
··· 24 24 import { getConfig } from '../../../utils/config'; 25 25 import { getServiceName } from '../../../utils/postprocess'; 26 26 import { transformServiceName } from '../../../utils/transform'; 27 - import { 28 - operationDataRef, 29 - operationErrorRef, 30 - operationResponseRef, 31 - } from '../../@hey-api/services/plugin'; 27 + import { operationIrRef } from '../../@hey-api/services/plugin'; 32 28 import { 33 29 operationOptionsType, 34 30 serviceFunctionIdentifier, 35 31 } from '../../@hey-api/services/plugin-legacy'; 36 32 import { typesId } from '../../@hey-api/types/plugin'; 37 33 import type { PluginHandler } from '../../types'; 38 - import { schemaToType, type SchemaToTypeOptions } from '../../utils/types'; 34 + import { schemaToType } from '../../utils/types'; 39 35 import type { Config as AngularQueryConfig } from '../angular-query-experimental'; 40 36 import type { Config as ReactQueryConfig } from '../react-query'; 41 37 import type { Config as SolidQueryConfig } from '../solid-query'; ··· 556 552 plugin: Plugin; 557 553 }) => { 558 554 const identifierData = context.file({ id: 'types' })!.identifier({ 559 - $ref: operationDataRef({ id: operation.id }), 555 + $ref: operationIrRef({ id: operation.id, type: 'data' }), 560 556 namespace: 'type', 561 557 }); 562 558 if (identifierData.name) { ··· 585 581 }) => { 586 582 const file = context.file({ id: plugin.name })!; 587 583 const identifierError = context.file({ id: 'types' })!.identifier({ 588 - $ref: operationErrorRef({ id: operation.id }), 584 + $ref: operationIrRef({ id: operation.id, type: 'error' }), 589 585 namespace: 'type', 590 586 }); 591 587 if (identifierError.name) { ··· 632 628 plugin: Plugin; 633 629 }) => { 634 630 const identifierResponse = context.file({ id: 'types' })!.identifier({ 635 - $ref: operationResponseRef({ id: operation.id }), 631 + $ref: operationIrRef({ id: operation.id, type: 'response' }), 636 632 namespace: 'type', 637 633 }); 638 634 if (identifierResponse.name) { ··· 891 887 892 888 const typeQueryKey = `${queryKeyName}<${typeData}>`; 893 889 const typePageObjectParam = `Pick<${typeQueryKey}[0], 'body' | 'headers' | 'path' | 'query'>`; 894 - const options: SchemaToTypeOptions = { 895 - enums: context.config.plugins['@hey-api/types']?.enums, 896 - file: context.file({ id: typesId })!, 897 - useTransformersDate: 898 - context.config.plugins['@hey-api/transformers']?.dates, 899 - }; 900 890 // TODO: parser - this is a bit clunky, need to compile type to string because 901 891 // `compiler.returnFunctionCall()` accepts only strings, should be cleaned up 902 892 const typePageParam = `${tsNodeToString({ 903 893 node: schemaToType({ 904 - options, 894 + options: { 895 + enums: context.config.plugins['@hey-api/types']?.enums, 896 + file: context.file({ id: typesId })!, 897 + useTransformersDate: 898 + context.config.plugins['@hey-api/transformers']?.dates, 899 + }, 905 900 schema: pagination.schema, 906 901 }), 907 902 unescape: true,
+63 -47
packages/openapi-ts/src/plugins/fastify/plugin.ts
··· 1 + import type ts from 'typescript'; 2 + 1 3 import { compiler, type Property } from '../../compiler'; 2 4 import type { IRContext } from '../../ir/context'; 3 5 import type { ··· 6 8 IRPathsObject, 7 9 } from '../../ir/ir'; 8 10 import { hasParameterGroupObjectRequired } from '../../ir/parameter'; 9 - import { operationDataRef } from '../@hey-api/services/plugin'; 11 + import { operationIrRef } from '../@hey-api/services/plugin'; 10 12 import type { PluginHandler } from '../types'; 11 - import { componentsToType, schemaToType } from '../utils/types'; 12 13 import type { Config } from './types'; 13 14 14 15 const fastifyId = 'fastify'; ··· 19 20 }: { 20 21 context: IRContext; 21 22 operation: IROperationObject; 22 - }): Property => { 23 + }): Property | undefined => { 23 24 const file = context.file({ id: fastifyId })!; 25 + const fileTypes = context.file({ id: 'types' })!; 24 26 25 27 const properties: Array<Property> = []; 26 28 27 - const identifierData = context.file({ id: 'types' })!.identifier({ 28 - $ref: operationDataRef({ id: operation.id }), 29 + const identifierData = fileTypes.identifier({ 30 + $ref: operationIrRef({ id: operation.id, type: 'data' }), 29 31 namespace: 'type', 30 32 }); 31 33 ··· 91 93 } 92 94 } 93 95 94 - if (operation.responses) { 95 - const responseProperties: Array<Property> = []; 96 + let errorsTypeReference: ts.TypeReferenceNode | undefined = undefined; 97 + const identifierErrors = fileTypes.identifier({ 98 + $ref: operationIrRef({ id: operation.id, type: 'errors' }), 99 + namespace: 'type', 100 + }); 101 + if (identifierErrors.name) { 102 + file.import({ 103 + asType: true, 104 + module: file.relativePathToFile({ context, id: 'types' }), 105 + name: identifierErrors.name, 106 + }); 107 + errorsTypeReference = compiler.typeReferenceNode({ 108 + typeName: identifierErrors.name, 109 + }); 110 + } 96 111 97 - for (const code in operation.responses) { 98 - if (code === 'default') { 99 - continue; 100 - } 101 - 102 - const response = operation.responses[code]!; 103 - // TODO: numeric literal for numbers 104 - responseProperties.push({ 105 - name: code, 106 - type: schemaToType({ 107 - options: { file }, 108 - schema: response.schema, 109 - }), 110 - }); 111 - } 112 + let responsesTypeReference: ts.TypeReferenceNode | undefined = undefined; 113 + const identifierResponses = fileTypes.identifier({ 114 + $ref: operationIrRef({ id: operation.id, type: 'responses' }), 115 + namespace: 'type', 116 + }); 117 + if (identifierResponses.name) { 118 + file.import({ 119 + asType: true, 120 + module: file.relativePathToFile({ context, id: 'types' }), 121 + name: identifierResponses.name, 122 + }); 123 + responsesTypeReference = compiler.typeReferenceNode({ 124 + typeName: identifierResponses.name, 125 + }); 126 + } 112 127 128 + const replyTypes = [errorsTypeReference, responsesTypeReference].filter( 129 + Boolean, 130 + ); 131 + if (replyTypes.length) { 113 132 properties.push({ 114 133 name: 'Reply', 115 - type: compiler.typeInterfaceNode({ 116 - properties: responseProperties, 117 - useLegacyResolution: false, 134 + type: compiler.typeIntersectionNode({ 135 + types: replyTypes, 118 136 }), 119 137 }); 120 138 } 121 139 140 + if (!properties.length) { 141 + return; 142 + } 143 + 122 144 const routeHandler: Property = { 123 145 name: operation.id, 124 146 type: compiler.typeNode('RouteHandler', [ ··· 131 153 return routeHandler; 132 154 }; 133 155 134 - const processRouteHandlers = ({ context }: { context: IRContext }) => { 135 - const file = context.file({ id: fastifyId })!; 156 + export const handler: PluginHandler<Config> = ({ context, plugin }) => { 157 + const file = context.createFile({ 158 + id: fastifyId, 159 + path: plugin.output, 160 + }); 136 161 137 162 const routeHandlers: Array<Property> = []; 138 163 ··· 144 169 const operation = pathItem[method]!; 145 170 146 171 const routeHandler = operationToRouteHandler({ context, operation }); 147 - routeHandlers.push(routeHandler); 172 + if (routeHandler) { 173 + routeHandlers.push(routeHandler); 174 + } 148 175 } 149 176 } 150 177 ··· 154 181 namespace: 'type', 155 182 }); 156 183 if (identifier.name) { 184 + if (routeHandlers.length) { 185 + file.import({ 186 + asType: true, 187 + module: 'fastify', 188 + name: 'RouteHandler', 189 + }); 190 + } 191 + 157 192 file.add( 158 193 compiler.typeAliasDeclaration({ 159 194 exportType: true, ··· 166 201 ); 167 202 } 168 203 }; 169 - 170 - export const handler: PluginHandler<Config> = ({ context, plugin }) => { 171 - const file = context.createFile({ 172 - id: fastifyId, 173 - path: plugin.output, 174 - }); 175 - file.import({ 176 - asType: true, 177 - module: 'fastify', 178 - name: 'RouteHandler', 179 - }); 180 - componentsToType({ 181 - context, 182 - options: { 183 - file, 184 - }, 185 - }); 186 - processRouteHandlers({ context }); 187 - };
+7 -35
packages/openapi-ts/src/plugins/utils/types.ts
··· 1 - import type ts from 'typescript'; 1 + import ts from 'typescript'; 2 2 3 3 import type { Property } from '../../compiler'; 4 4 import { compiler } from '../../compiler'; 5 5 import type { TypeScriptFile } from '../../generate/files'; 6 - import type { IRContext } from '../../ir/context'; 7 6 import type { IRSchemaObject } from '../../ir/ir'; 8 7 import { deduplicateSchema } from '../../ir/schema'; 9 8 import { ensureValidTypeScriptJavaScriptIdentifier } from '../../openApi'; ··· 369 368 }); 370 369 }; 371 370 371 + const digitsRegExp = /^\d+$/; 372 + 372 373 const objectTypeToIdentifier = ({ 373 374 namespace, 374 375 schema, ··· 387 388 for (const name in schema.properties) { 388 389 const property = schema.properties[name]; 389 390 const isRequired = required.includes(name); 391 + digitsRegExp.lastIndex = 0; 390 392 schemaProperties.push({ 391 393 comment: parseSchemaJsDoc({ schema: property }), 392 394 isReadOnly: property.accessScope === 'read', 393 395 isRequired, 394 - name, 396 + name: digitsRegExp.test(name) 397 + ? ts.factory.createNumericLiteral(name) 398 + : name, 395 399 type: schemaToType({ 396 400 $ref: `${irRef}${name}`, 397 401 namespace, ··· 677 681 678 682 return type; 679 683 }; 680 - 681 - export const componentsToType = ({ 682 - context, 683 - options, 684 - }: { 685 - context: IRContext; 686 - options: SchemaToTypeOptions; 687 - }) => { 688 - if (context.ir.components) { 689 - for (const name in context.ir.components.schemas) { 690 - const schema = context.ir.components.schemas[name]; 691 - const $ref = `#/components/schemas/${name}`; 692 - 693 - schemaToType({ 694 - $ref, 695 - options, 696 - schema, 697 - }); 698 - } 699 - 700 - for (const name in context.ir.components.parameters) { 701 - const parameter = context.ir.components.parameters[name]; 702 - const $ref = `#/components/parameters/${name}`; 703 - 704 - schemaToType({ 705 - $ref, 706 - options, 707 - schema: parameter.schema, 708 - }); 709 - } 710 - } 711 - };
+12 -1
packages/openapi-ts/test/__snapshots__/3.0.x/operation-204/types.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - export type PostFooResponse = string | void; 3 + export type PostFooResponses = { 4 + /** 5 + * OK 6 + */ 7 + 200: string; 8 + /** 9 + * Created 10 + */ 11 + 204: void; 12 + }; 13 + 14 + export type PostFooResponse = PostFooResponses[keyof PostFooResponses];
+7
packages/openapi-ts/test/__snapshots__/3.0.x/parameter-explode-false/types.gen.ts
··· 6 6 query?: { 7 7 foo?: Array<string>; 8 8 }; 9 + }; 10 + 11 + export type PostFooResponses = { 12 + /** 13 + * OK 14 + */ 15 + default: unknown; 9 16 };
+290 -29
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@hey-api/services/default/types.gen.ts
··· 947 947 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 948 948 }; 949 949 950 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 950 + export type ImportResponses = { 951 + /** 952 + * Success 953 + */ 954 + 200: Model_From_Zendesk; 955 + /** 956 + * Default success response 957 + */ 958 + default: ModelWithReadOnlyAndWriteOnly; 959 + }; 960 + 961 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 951 962 952 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 963 + export type ApiVversionOdataControllerCountResponses = { 964 + /** 965 + * Success 966 + */ 967 + 200: Model_From_Zendesk; 968 + }; 969 + 970 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 953 971 954 972 export type GetApiVbyApiVersionSimpleOperationData = { 955 973 body?: never; ··· 962 980 query?: never; 963 981 }; 964 982 965 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 983 + export type GetApiVbyApiVersionSimpleOperationErrors = { 984 + /** 985 + * Default error response 986 + */ 987 + default: ModelWithBoolean; 988 + }; 966 989 967 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 990 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 991 + 992 + export type GetApiVbyApiVersionSimpleOperationResponses = { 993 + /** 994 + * Response is a simple number 995 + */ 996 + 200: number; 997 + }; 998 + 999 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 968 1000 969 1001 export type DeleteFooData3 = { 970 1002 body?: never; ··· 1136 1168 }; 1137 1169 }; 1138 1170 1139 - export type PostCallWithOptionalParamResponse = number | void; 1171 + export type PostCallWithOptionalParamResponses = { 1172 + /** 1173 + * Response is a simple number 1174 + */ 1175 + 200: number; 1176 + /** 1177 + * Success 1178 + */ 1179 + 204: void; 1180 + }; 1181 + 1182 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1140 1183 1141 1184 export type PostApiVbyApiVersionRequestBodyData = { 1142 1185 /** ··· 1259 1302 }; 1260 1303 }; 1261 1304 1262 - export type CallWithNoContentResponseResponse = void; 1305 + export type CallWithNoContentResponseResponses = { 1306 + /** 1307 + * Success 1308 + */ 1309 + 204: void; 1310 + }; 1263 1311 1264 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1312 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1265 1313 1266 - export type DummyAResponse = _400; 1314 + export type CallWithResponseAndNoContentResponseResponses = { 1315 + /** 1316 + * Response is a simple number 1317 + */ 1318 + 200: number; 1319 + /** 1320 + * Success 1321 + */ 1322 + 204: void; 1323 + }; 1267 1324 1268 - export type DummyBResponse = void; 1325 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1269 1326 1270 - export type CallWithResponseResponse = _import; 1327 + export type DummyAResponses = { 1328 + 200: _400; 1329 + }; 1271 1330 1272 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1331 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1273 1332 1274 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1333 + export type DummyBResponses = { 1334 + /** 1335 + * Success 1336 + */ 1337 + 204: void; 1338 + }; 1339 + 1340 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1275 1341 1276 - export type CallWithResponsesError = ModelWithStringError; 1342 + export type CallWithResponseResponses = { 1343 + default: _import; 1344 + }; 1345 + 1346 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1347 + 1348 + export type CallWithDuplicateResponsesErrors = { 1349 + /** 1350 + * Message for 500 error 1351 + */ 1352 + 500: ModelWithStringError; 1353 + /** 1354 + * Message for 501 error 1355 + */ 1356 + 501: ModelWithStringError; 1357 + /** 1358 + * Message for 502 error 1359 + */ 1360 + 502: ModelWithStringError; 1361 + /** 1362 + * Message for 4XX errors 1363 + */ 1364 + '4XX': DictionaryWithArray; 1365 + /** 1366 + * Default error response 1367 + */ 1368 + default: ModelWithBoolean; 1369 + }; 1370 + 1371 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1372 + 1373 + export type CallWithDuplicateResponsesResponses = { 1374 + /** 1375 + * Message for 200 response 1376 + */ 1377 + 200: ModelWithBoolean & ModelWithInteger; 1378 + /** 1379 + * Message for 201 response 1380 + */ 1381 + 201: ModelWithString; 1382 + /** 1383 + * Message for 202 response 1384 + */ 1385 + 202: ModelWithString; 1386 + }; 1387 + 1388 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1389 + 1390 + export type CallWithResponsesErrors = { 1391 + /** 1392 + * Message for 500 error 1393 + */ 1394 + 500: ModelWithStringError; 1395 + /** 1396 + * Message for 501 error 1397 + */ 1398 + 501: ModelWithStringError; 1399 + /** 1400 + * Message for 502 error 1401 + */ 1402 + 502: ModelWithStringError; 1403 + /** 1404 + * Message for default response 1405 + */ 1406 + default: ModelWithStringError; 1407 + }; 1408 + 1409 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1410 + 1411 + export type CallWithResponsesResponses = { 1412 + /** 1413 + * Message for 200 response 1414 + */ 1415 + 200: { 1416 + readonly '@namespace.string'?: string; 1417 + readonly '@namespace.integer'?: number; 1418 + readonly value?: Array<ModelWithString>; 1419 + }; 1420 + /** 1421 + * Message for 201 response 1422 + */ 1423 + 201: ModelThatExtends; 1424 + /** 1425 + * Message for 202 response 1426 + */ 1427 + 202: ModelThatExtendsExtends; 1428 + }; 1277 1429 1278 - export type CallWithResponsesResponse = { 1279 - readonly '@namespace.string'?: string; 1280 - readonly '@namespace.integer'?: number; 1281 - readonly value?: Array<ModelWithString>; 1282 - } | ModelThatExtends | ModelThatExtendsExtends; 1430 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1283 1431 1284 1432 export type CollectionFormatData = { 1285 1433 body?: never; ··· 1348 1496 }; 1349 1497 }; 1350 1498 1351 - export type TypesResponse = number | string | boolean | {}; 1499 + export type TypesResponses = { 1500 + /** 1501 + * Response is a simple number 1502 + */ 1503 + 200: number; 1504 + /** 1505 + * Response is a simple string 1506 + */ 1507 + 201: string; 1508 + /** 1509 + * Response is a simple boolean 1510 + */ 1511 + 202: boolean; 1512 + /** 1513 + * Response is a simple object 1514 + */ 1515 + 203: {}; 1516 + }; 1517 + 1518 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1352 1519 1353 1520 export type UploadFileData = { 1354 1521 body: Blob | File; ··· 1361 1528 query?: never; 1362 1529 }; 1363 1530 1364 - export type UploadFileResponse = boolean; 1531 + export type UploadFileResponses = { 1532 + 200: boolean; 1533 + }; 1534 + 1535 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1365 1536 1366 1537 export type FileResponseData = { 1367 1538 body?: never; ··· 1375 1546 query?: never; 1376 1547 }; 1377 1548 1378 - export type FileResponseResponse = Blob | File; 1549 + export type FileResponseResponses = { 1550 + /** 1551 + * Success 1552 + */ 1553 + 200: Blob | File; 1554 + }; 1555 + 1556 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1379 1557 1380 1558 export type ComplexTypesData = { 1381 1559 body?: never; ··· 1398 1576 }; 1399 1577 }; 1400 1578 1401 - export type ComplexTypesResponse = Array<ModelWithString>; 1579 + export type ComplexTypesErrors = { 1580 + /** 1581 + * 400 `server` error 1582 + */ 1583 + 400: unknown; 1584 + /** 1585 + * 500 server error 1586 + */ 1587 + 500: unknown; 1588 + }; 1589 + 1590 + export type ComplexTypesResponses = { 1591 + /** 1592 + * Successful response 1593 + */ 1594 + 200: Array<ModelWithString>; 1595 + }; 1596 + 1597 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1402 1598 1403 - export type MultipartResponseResponse = { 1404 - file?: Blob | File; 1405 - metadata?: { 1406 - foo?: string; 1407 - bar?: string; 1599 + export type MultipartResponseResponses = { 1600 + /** 1601 + * OK 1602 + */ 1603 + 200: { 1604 + file?: Blob | File; 1605 + metadata?: { 1606 + foo?: string; 1607 + bar?: string; 1608 + }; 1408 1609 }; 1409 1610 }; 1611 + 1612 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1410 1613 1411 1614 export type MultipartRequestData = { 1412 1615 body?: { ··· 1439 1642 query?: never; 1440 1643 }; 1441 1644 1442 - export type ComplexParamsResponse = ModelWithString; 1645 + export type ComplexParamsResponses = { 1646 + /** 1647 + * Success 1648 + */ 1649 + 200: ModelWithString; 1650 + }; 1651 + 1652 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1653 + 1654 + export type CallWithResultFromHeaderErrors = { 1655 + /** 1656 + * 400 server error 1657 + */ 1658 + 400: unknown; 1659 + /** 1660 + * 500 server error 1661 + */ 1662 + 500: unknown; 1663 + }; 1664 + 1665 + export type CallWithResultFromHeaderResponses = { 1666 + /** 1667 + * Successful response 1668 + */ 1669 + 200: unknown; 1670 + }; 1443 1671 1444 1672 export type TestErrorCodeData = { 1445 1673 body?: never; ··· 1452 1680 }; 1453 1681 }; 1454 1682 1683 + export type TestErrorCodeErrors = { 1684 + /** 1685 + * Custom message: Internal Server Error 1686 + */ 1687 + 500: unknown; 1688 + /** 1689 + * Custom message: Not Implemented 1690 + */ 1691 + 501: unknown; 1692 + /** 1693 + * Custom message: Bad Gateway 1694 + */ 1695 + 502: unknown; 1696 + /** 1697 + * Custom message: Service Unavailable 1698 + */ 1699 + 503: unknown; 1700 + }; 1701 + 1702 + export type TestErrorCodeResponses = { 1703 + /** 1704 + * Custom message: Successful response 1705 + */ 1706 + 200: unknown; 1707 + }; 1708 + 1455 1709 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1456 1710 body?: never; 1457 1711 path?: never; ··· 1463 1717 }; 1464 1718 }; 1465 1719 1466 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1720 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1721 + /** 1722 + * Successful response 1723 + */ 1724 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1725 + }; 1726 + 1727 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1467 1728 1468 1729 export type PutWithFormUrlEncodedData = { 1469 1730 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/types.gen.ts
··· 947 947 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 948 948 }; 949 949 950 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 950 + export type ImportResponses = { 951 + /** 952 + * Success 953 + */ 954 + 200: Model_From_Zendesk; 955 + /** 956 + * Default success response 957 + */ 958 + default: ModelWithReadOnlyAndWriteOnly; 959 + }; 960 + 961 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 951 962 952 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 963 + export type ApiVversionOdataControllerCountResponses = { 964 + /** 965 + * Success 966 + */ 967 + 200: Model_From_Zendesk; 968 + }; 969 + 970 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 953 971 954 972 export type GetApiVbyApiVersionSimpleOperationData = { 955 973 body?: never; ··· 962 980 query?: never; 963 981 }; 964 982 965 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 983 + export type GetApiVbyApiVersionSimpleOperationErrors = { 984 + /** 985 + * Default error response 986 + */ 987 + default: ModelWithBoolean; 988 + }; 966 989 967 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 990 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 991 + 992 + export type GetApiVbyApiVersionSimpleOperationResponses = { 993 + /** 994 + * Response is a simple number 995 + */ 996 + 200: number; 997 + }; 998 + 999 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 968 1000 969 1001 export type DeleteFooData3 = { 970 1002 body?: never; ··· 1136 1168 }; 1137 1169 }; 1138 1170 1139 - export type PostCallWithOptionalParamResponse = number | void; 1171 + export type PostCallWithOptionalParamResponses = { 1172 + /** 1173 + * Response is a simple number 1174 + */ 1175 + 200: number; 1176 + /** 1177 + * Success 1178 + */ 1179 + 204: void; 1180 + }; 1181 + 1182 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1140 1183 1141 1184 export type PostApiVbyApiVersionRequestBodyData = { 1142 1185 /** ··· 1259 1302 }; 1260 1303 }; 1261 1304 1262 - export type CallWithNoContentResponseResponse = void; 1305 + export type CallWithNoContentResponseResponses = { 1306 + /** 1307 + * Success 1308 + */ 1309 + 204: void; 1310 + }; 1263 1311 1264 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1312 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1265 1313 1266 - export type DummyAResponse = _400; 1314 + export type CallWithResponseAndNoContentResponseResponses = { 1315 + /** 1316 + * Response is a simple number 1317 + */ 1318 + 200: number; 1319 + /** 1320 + * Success 1321 + */ 1322 + 204: void; 1323 + }; 1267 1324 1268 - export type DummyBResponse = void; 1325 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1269 1326 1270 - export type CallWithResponseResponse = _import; 1327 + export type DummyAResponses = { 1328 + 200: _400; 1329 + }; 1271 1330 1272 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1331 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1273 1332 1274 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1333 + export type DummyBResponses = { 1334 + /** 1335 + * Success 1336 + */ 1337 + 204: void; 1338 + }; 1339 + 1340 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1275 1341 1276 - export type CallWithResponsesError = ModelWithStringError; 1342 + export type CallWithResponseResponses = { 1343 + default: _import; 1344 + }; 1345 + 1346 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1347 + 1348 + export type CallWithDuplicateResponsesErrors = { 1349 + /** 1350 + * Message for 500 error 1351 + */ 1352 + 500: ModelWithStringError; 1353 + /** 1354 + * Message for 501 error 1355 + */ 1356 + 501: ModelWithStringError; 1357 + /** 1358 + * Message for 502 error 1359 + */ 1360 + 502: ModelWithStringError; 1361 + /** 1362 + * Message for 4XX errors 1363 + */ 1364 + '4XX': DictionaryWithArray; 1365 + /** 1366 + * Default error response 1367 + */ 1368 + default: ModelWithBoolean; 1369 + }; 1370 + 1371 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1372 + 1373 + export type CallWithDuplicateResponsesResponses = { 1374 + /** 1375 + * Message for 200 response 1376 + */ 1377 + 200: ModelWithBoolean & ModelWithInteger; 1378 + /** 1379 + * Message for 201 response 1380 + */ 1381 + 201: ModelWithString; 1382 + /** 1383 + * Message for 202 response 1384 + */ 1385 + 202: ModelWithString; 1386 + }; 1387 + 1388 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1389 + 1390 + export type CallWithResponsesErrors = { 1391 + /** 1392 + * Message for 500 error 1393 + */ 1394 + 500: ModelWithStringError; 1395 + /** 1396 + * Message for 501 error 1397 + */ 1398 + 501: ModelWithStringError; 1399 + /** 1400 + * Message for 502 error 1401 + */ 1402 + 502: ModelWithStringError; 1403 + /** 1404 + * Message for default response 1405 + */ 1406 + default: ModelWithStringError; 1407 + }; 1408 + 1409 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1410 + 1411 + export type CallWithResponsesResponses = { 1412 + /** 1413 + * Message for 200 response 1414 + */ 1415 + 200: { 1416 + readonly '@namespace.string'?: string; 1417 + readonly '@namespace.integer'?: number; 1418 + readonly value?: Array<ModelWithString>; 1419 + }; 1420 + /** 1421 + * Message for 201 response 1422 + */ 1423 + 201: ModelThatExtends; 1424 + /** 1425 + * Message for 202 response 1426 + */ 1427 + 202: ModelThatExtendsExtends; 1428 + }; 1277 1429 1278 - export type CallWithResponsesResponse = { 1279 - readonly '@namespace.string'?: string; 1280 - readonly '@namespace.integer'?: number; 1281 - readonly value?: Array<ModelWithString>; 1282 - } | ModelThatExtends | ModelThatExtendsExtends; 1430 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1283 1431 1284 1432 export type CollectionFormatData = { 1285 1433 body?: never; ··· 1348 1496 }; 1349 1497 }; 1350 1498 1351 - export type TypesResponse = number | string | boolean | {}; 1499 + export type TypesResponses = { 1500 + /** 1501 + * Response is a simple number 1502 + */ 1503 + 200: number; 1504 + /** 1505 + * Response is a simple string 1506 + */ 1507 + 201: string; 1508 + /** 1509 + * Response is a simple boolean 1510 + */ 1511 + 202: boolean; 1512 + /** 1513 + * Response is a simple object 1514 + */ 1515 + 203: {}; 1516 + }; 1517 + 1518 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1352 1519 1353 1520 export type UploadFileData = { 1354 1521 body: Blob | File; ··· 1361 1528 query?: never; 1362 1529 }; 1363 1530 1364 - export type UploadFileResponse = boolean; 1531 + export type UploadFileResponses = { 1532 + 200: boolean; 1533 + }; 1534 + 1535 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1365 1536 1366 1537 export type FileResponseData = { 1367 1538 body?: never; ··· 1375 1546 query?: never; 1376 1547 }; 1377 1548 1378 - export type FileResponseResponse = Blob | File; 1549 + export type FileResponseResponses = { 1550 + /** 1551 + * Success 1552 + */ 1553 + 200: Blob | File; 1554 + }; 1555 + 1556 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1379 1557 1380 1558 export type ComplexTypesData = { 1381 1559 body?: never; ··· 1398 1576 }; 1399 1577 }; 1400 1578 1401 - export type ComplexTypesResponse = Array<ModelWithString>; 1579 + export type ComplexTypesErrors = { 1580 + /** 1581 + * 400 `server` error 1582 + */ 1583 + 400: unknown; 1584 + /** 1585 + * 500 server error 1586 + */ 1587 + 500: unknown; 1588 + }; 1589 + 1590 + export type ComplexTypesResponses = { 1591 + /** 1592 + * Successful response 1593 + */ 1594 + 200: Array<ModelWithString>; 1595 + }; 1596 + 1597 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1402 1598 1403 - export type MultipartResponseResponse = { 1404 - file?: Blob | File; 1405 - metadata?: { 1406 - foo?: string; 1407 - bar?: string; 1599 + export type MultipartResponseResponses = { 1600 + /** 1601 + * OK 1602 + */ 1603 + 200: { 1604 + file?: Blob | File; 1605 + metadata?: { 1606 + foo?: string; 1607 + bar?: string; 1608 + }; 1408 1609 }; 1409 1610 }; 1611 + 1612 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1410 1613 1411 1614 export type MultipartRequestData = { 1412 1615 body?: { ··· 1439 1642 query?: never; 1440 1643 }; 1441 1644 1442 - export type ComplexParamsResponse = ModelWithString; 1645 + export type ComplexParamsResponses = { 1646 + /** 1647 + * Success 1648 + */ 1649 + 200: ModelWithString; 1650 + }; 1651 + 1652 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1653 + 1654 + export type CallWithResultFromHeaderErrors = { 1655 + /** 1656 + * 400 server error 1657 + */ 1658 + 400: unknown; 1659 + /** 1660 + * 500 server error 1661 + */ 1662 + 500: unknown; 1663 + }; 1664 + 1665 + export type CallWithResultFromHeaderResponses = { 1666 + /** 1667 + * Successful response 1668 + */ 1669 + 200: unknown; 1670 + }; 1443 1671 1444 1672 export type TestErrorCodeData = { 1445 1673 body?: never; ··· 1452 1680 }; 1453 1681 }; 1454 1682 1683 + export type TestErrorCodeErrors = { 1684 + /** 1685 + * Custom message: Internal Server Error 1686 + */ 1687 + 500: unknown; 1688 + /** 1689 + * Custom message: Not Implemented 1690 + */ 1691 + 501: unknown; 1692 + /** 1693 + * Custom message: Bad Gateway 1694 + */ 1695 + 502: unknown; 1696 + /** 1697 + * Custom message: Service Unavailable 1698 + */ 1699 + 503: unknown; 1700 + }; 1701 + 1702 + export type TestErrorCodeResponses = { 1703 + /** 1704 + * Custom message: Successful response 1705 + */ 1706 + 200: unknown; 1707 + }; 1708 + 1455 1709 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1456 1710 body?: never; 1457 1711 path?: never; ··· 1463 1717 }; 1464 1718 }; 1465 1719 1466 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1720 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1721 + /** 1722 + * Successful response 1723 + */ 1724 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1725 + }; 1726 + 1727 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1467 1728 1468 1729 export type PutWithFormUrlEncodedData = { 1469 1730 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/types.gen.ts
··· 947 947 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 948 948 }; 949 949 950 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 950 + export type ImportResponses = { 951 + /** 952 + * Success 953 + */ 954 + 200: Model_From_Zendesk; 955 + /** 956 + * Default success response 957 + */ 958 + default: ModelWithReadOnlyAndWriteOnly; 959 + }; 960 + 961 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 951 962 952 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 963 + export type ApiVversionOdataControllerCountResponses = { 964 + /** 965 + * Success 966 + */ 967 + 200: Model_From_Zendesk; 968 + }; 969 + 970 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 953 971 954 972 export type GetApiVbyApiVersionSimpleOperationData = { 955 973 body?: never; ··· 962 980 query?: never; 963 981 }; 964 982 965 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 983 + export type GetApiVbyApiVersionSimpleOperationErrors = { 984 + /** 985 + * Default error response 986 + */ 987 + default: ModelWithBoolean; 988 + }; 966 989 967 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 990 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 991 + 992 + export type GetApiVbyApiVersionSimpleOperationResponses = { 993 + /** 994 + * Response is a simple number 995 + */ 996 + 200: number; 997 + }; 998 + 999 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 968 1000 969 1001 export type DeleteFooData3 = { 970 1002 body?: never; ··· 1136 1168 }; 1137 1169 }; 1138 1170 1139 - export type PostCallWithOptionalParamResponse = number | void; 1171 + export type PostCallWithOptionalParamResponses = { 1172 + /** 1173 + * Response is a simple number 1174 + */ 1175 + 200: number; 1176 + /** 1177 + * Success 1178 + */ 1179 + 204: void; 1180 + }; 1181 + 1182 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1140 1183 1141 1184 export type PostApiVbyApiVersionRequestBodyData = { 1142 1185 /** ··· 1259 1302 }; 1260 1303 }; 1261 1304 1262 - export type CallWithNoContentResponseResponse = void; 1305 + export type CallWithNoContentResponseResponses = { 1306 + /** 1307 + * Success 1308 + */ 1309 + 204: void; 1310 + }; 1263 1311 1264 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1312 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1265 1313 1266 - export type DummyAResponse = _400; 1314 + export type CallWithResponseAndNoContentResponseResponses = { 1315 + /** 1316 + * Response is a simple number 1317 + */ 1318 + 200: number; 1319 + /** 1320 + * Success 1321 + */ 1322 + 204: void; 1323 + }; 1267 1324 1268 - export type DummyBResponse = void; 1325 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1269 1326 1270 - export type CallWithResponseResponse = _import; 1327 + export type DummyAResponses = { 1328 + 200: _400; 1329 + }; 1271 1330 1272 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1331 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1273 1332 1274 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1333 + export type DummyBResponses = { 1334 + /** 1335 + * Success 1336 + */ 1337 + 204: void; 1338 + }; 1339 + 1340 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1275 1341 1276 - export type CallWithResponsesError = ModelWithStringError; 1342 + export type CallWithResponseResponses = { 1343 + default: _import; 1344 + }; 1345 + 1346 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1347 + 1348 + export type CallWithDuplicateResponsesErrors = { 1349 + /** 1350 + * Message for 500 error 1351 + */ 1352 + 500: ModelWithStringError; 1353 + /** 1354 + * Message for 501 error 1355 + */ 1356 + 501: ModelWithStringError; 1357 + /** 1358 + * Message for 502 error 1359 + */ 1360 + 502: ModelWithStringError; 1361 + /** 1362 + * Message for 4XX errors 1363 + */ 1364 + '4XX': DictionaryWithArray; 1365 + /** 1366 + * Default error response 1367 + */ 1368 + default: ModelWithBoolean; 1369 + }; 1370 + 1371 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1372 + 1373 + export type CallWithDuplicateResponsesResponses = { 1374 + /** 1375 + * Message for 200 response 1376 + */ 1377 + 200: ModelWithBoolean & ModelWithInteger; 1378 + /** 1379 + * Message for 201 response 1380 + */ 1381 + 201: ModelWithString; 1382 + /** 1383 + * Message for 202 response 1384 + */ 1385 + 202: ModelWithString; 1386 + }; 1387 + 1388 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1389 + 1390 + export type CallWithResponsesErrors = { 1391 + /** 1392 + * Message for 500 error 1393 + */ 1394 + 500: ModelWithStringError; 1395 + /** 1396 + * Message for 501 error 1397 + */ 1398 + 501: ModelWithStringError; 1399 + /** 1400 + * Message for 502 error 1401 + */ 1402 + 502: ModelWithStringError; 1403 + /** 1404 + * Message for default response 1405 + */ 1406 + default: ModelWithStringError; 1407 + }; 1408 + 1409 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1410 + 1411 + export type CallWithResponsesResponses = { 1412 + /** 1413 + * Message for 200 response 1414 + */ 1415 + 200: { 1416 + readonly '@namespace.string'?: string; 1417 + readonly '@namespace.integer'?: number; 1418 + readonly value?: Array<ModelWithString>; 1419 + }; 1420 + /** 1421 + * Message for 201 response 1422 + */ 1423 + 201: ModelThatExtends; 1424 + /** 1425 + * Message for 202 response 1426 + */ 1427 + 202: ModelThatExtendsExtends; 1428 + }; 1277 1429 1278 - export type CallWithResponsesResponse = { 1279 - readonly '@namespace.string'?: string; 1280 - readonly '@namespace.integer'?: number; 1281 - readonly value?: Array<ModelWithString>; 1282 - } | ModelThatExtends | ModelThatExtendsExtends; 1430 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1283 1431 1284 1432 export type CollectionFormatData = { 1285 1433 body?: never; ··· 1348 1496 }; 1349 1497 }; 1350 1498 1351 - export type TypesResponse = number | string | boolean | {}; 1499 + export type TypesResponses = { 1500 + /** 1501 + * Response is a simple number 1502 + */ 1503 + 200: number; 1504 + /** 1505 + * Response is a simple string 1506 + */ 1507 + 201: string; 1508 + /** 1509 + * Response is a simple boolean 1510 + */ 1511 + 202: boolean; 1512 + /** 1513 + * Response is a simple object 1514 + */ 1515 + 203: {}; 1516 + }; 1517 + 1518 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1352 1519 1353 1520 export type UploadFileData = { 1354 1521 body: Blob | File; ··· 1361 1528 query?: never; 1362 1529 }; 1363 1530 1364 - export type UploadFileResponse = boolean; 1531 + export type UploadFileResponses = { 1532 + 200: boolean; 1533 + }; 1534 + 1535 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1365 1536 1366 1537 export type FileResponseData = { 1367 1538 body?: never; ··· 1375 1546 query?: never; 1376 1547 }; 1377 1548 1378 - export type FileResponseResponse = Blob | File; 1549 + export type FileResponseResponses = { 1550 + /** 1551 + * Success 1552 + */ 1553 + 200: Blob | File; 1554 + }; 1555 + 1556 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1379 1557 1380 1558 export type ComplexTypesData = { 1381 1559 body?: never; ··· 1398 1576 }; 1399 1577 }; 1400 1578 1401 - export type ComplexTypesResponse = Array<ModelWithString>; 1579 + export type ComplexTypesErrors = { 1580 + /** 1581 + * 400 `server` error 1582 + */ 1583 + 400: unknown; 1584 + /** 1585 + * 500 server error 1586 + */ 1587 + 500: unknown; 1588 + }; 1589 + 1590 + export type ComplexTypesResponses = { 1591 + /** 1592 + * Successful response 1593 + */ 1594 + 200: Array<ModelWithString>; 1595 + }; 1596 + 1597 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1402 1598 1403 - export type MultipartResponseResponse = { 1404 - file?: Blob | File; 1405 - metadata?: { 1406 - foo?: string; 1407 - bar?: string; 1599 + export type MultipartResponseResponses = { 1600 + /** 1601 + * OK 1602 + */ 1603 + 200: { 1604 + file?: Blob | File; 1605 + metadata?: { 1606 + foo?: string; 1607 + bar?: string; 1608 + }; 1408 1609 }; 1409 1610 }; 1611 + 1612 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1410 1613 1411 1614 export type MultipartRequestData = { 1412 1615 body?: { ··· 1439 1642 query?: never; 1440 1643 }; 1441 1644 1442 - export type ComplexParamsResponse = ModelWithString; 1645 + export type ComplexParamsResponses = { 1646 + /** 1647 + * Success 1648 + */ 1649 + 200: ModelWithString; 1650 + }; 1651 + 1652 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1653 + 1654 + export type CallWithResultFromHeaderErrors = { 1655 + /** 1656 + * 400 server error 1657 + */ 1658 + 400: unknown; 1659 + /** 1660 + * 500 server error 1661 + */ 1662 + 500: unknown; 1663 + }; 1664 + 1665 + export type CallWithResultFromHeaderResponses = { 1666 + /** 1667 + * Successful response 1668 + */ 1669 + 200: unknown; 1670 + }; 1443 1671 1444 1672 export type TestErrorCodeData = { 1445 1673 body?: never; ··· 1452 1680 }; 1453 1681 }; 1454 1682 1683 + export type TestErrorCodeErrors = { 1684 + /** 1685 + * Custom message: Internal Server Error 1686 + */ 1687 + 500: unknown; 1688 + /** 1689 + * Custom message: Not Implemented 1690 + */ 1691 + 501: unknown; 1692 + /** 1693 + * Custom message: Bad Gateway 1694 + */ 1695 + 502: unknown; 1696 + /** 1697 + * Custom message: Service Unavailable 1698 + */ 1699 + 503: unknown; 1700 + }; 1701 + 1702 + export type TestErrorCodeResponses = { 1703 + /** 1704 + * Custom message: Successful response 1705 + */ 1706 + 200: unknown; 1707 + }; 1708 + 1455 1709 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1456 1710 body?: never; 1457 1711 path?: never; ··· 1463 1717 }; 1464 1718 }; 1465 1719 1466 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1720 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1721 + /** 1722 + * Successful response 1723 + */ 1724 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1725 + }; 1726 + 1727 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1467 1728 1468 1729 export type PutWithFormUrlEncodedData = { 1469 1730 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/types.gen.ts
··· 947 947 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 948 948 }; 949 949 950 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 950 + export type ImportResponses = { 951 + /** 952 + * Success 953 + */ 954 + 200: Model_From_Zendesk; 955 + /** 956 + * Default success response 957 + */ 958 + default: ModelWithReadOnlyAndWriteOnly; 959 + }; 960 + 961 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 951 962 952 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 963 + export type ApiVversionOdataControllerCountResponses = { 964 + /** 965 + * Success 966 + */ 967 + 200: Model_From_Zendesk; 968 + }; 969 + 970 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 953 971 954 972 export type GetApiVbyApiVersionSimpleOperationData = { 955 973 body?: never; ··· 962 980 query?: never; 963 981 }; 964 982 965 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 983 + export type GetApiVbyApiVersionSimpleOperationErrors = { 984 + /** 985 + * Default error response 986 + */ 987 + default: ModelWithBoolean; 988 + }; 966 989 967 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 990 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 991 + 992 + export type GetApiVbyApiVersionSimpleOperationResponses = { 993 + /** 994 + * Response is a simple number 995 + */ 996 + 200: number; 997 + }; 998 + 999 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 968 1000 969 1001 export type DeleteFooData3 = { 970 1002 body?: never; ··· 1136 1168 }; 1137 1169 }; 1138 1170 1139 - export type PostCallWithOptionalParamResponse = number | void; 1171 + export type PostCallWithOptionalParamResponses = { 1172 + /** 1173 + * Response is a simple number 1174 + */ 1175 + 200: number; 1176 + /** 1177 + * Success 1178 + */ 1179 + 204: void; 1180 + }; 1181 + 1182 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1140 1183 1141 1184 export type PostApiVbyApiVersionRequestBodyData = { 1142 1185 /** ··· 1259 1302 }; 1260 1303 }; 1261 1304 1262 - export type CallWithNoContentResponseResponse = void; 1305 + export type CallWithNoContentResponseResponses = { 1306 + /** 1307 + * Success 1308 + */ 1309 + 204: void; 1310 + }; 1263 1311 1264 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1312 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1265 1313 1266 - export type DummyAResponse = _400; 1314 + export type CallWithResponseAndNoContentResponseResponses = { 1315 + /** 1316 + * Response is a simple number 1317 + */ 1318 + 200: number; 1319 + /** 1320 + * Success 1321 + */ 1322 + 204: void; 1323 + }; 1267 1324 1268 - export type DummyBResponse = void; 1325 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1269 1326 1270 - export type CallWithResponseResponse = _import; 1327 + export type DummyAResponses = { 1328 + 200: _400; 1329 + }; 1271 1330 1272 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1331 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1273 1332 1274 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1333 + export type DummyBResponses = { 1334 + /** 1335 + * Success 1336 + */ 1337 + 204: void; 1338 + }; 1339 + 1340 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1275 1341 1276 - export type CallWithResponsesError = ModelWithStringError; 1342 + export type CallWithResponseResponses = { 1343 + default: _import; 1344 + }; 1345 + 1346 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1347 + 1348 + export type CallWithDuplicateResponsesErrors = { 1349 + /** 1350 + * Message for 500 error 1351 + */ 1352 + 500: ModelWithStringError; 1353 + /** 1354 + * Message for 501 error 1355 + */ 1356 + 501: ModelWithStringError; 1357 + /** 1358 + * Message for 502 error 1359 + */ 1360 + 502: ModelWithStringError; 1361 + /** 1362 + * Message for 4XX errors 1363 + */ 1364 + '4XX': DictionaryWithArray; 1365 + /** 1366 + * Default error response 1367 + */ 1368 + default: ModelWithBoolean; 1369 + }; 1370 + 1371 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1372 + 1373 + export type CallWithDuplicateResponsesResponses = { 1374 + /** 1375 + * Message for 200 response 1376 + */ 1377 + 200: ModelWithBoolean & ModelWithInteger; 1378 + /** 1379 + * Message for 201 response 1380 + */ 1381 + 201: ModelWithString; 1382 + /** 1383 + * Message for 202 response 1384 + */ 1385 + 202: ModelWithString; 1386 + }; 1387 + 1388 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1389 + 1390 + export type CallWithResponsesErrors = { 1391 + /** 1392 + * Message for 500 error 1393 + */ 1394 + 500: ModelWithStringError; 1395 + /** 1396 + * Message for 501 error 1397 + */ 1398 + 501: ModelWithStringError; 1399 + /** 1400 + * Message for 502 error 1401 + */ 1402 + 502: ModelWithStringError; 1403 + /** 1404 + * Message for default response 1405 + */ 1406 + default: ModelWithStringError; 1407 + }; 1408 + 1409 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1410 + 1411 + export type CallWithResponsesResponses = { 1412 + /** 1413 + * Message for 200 response 1414 + */ 1415 + 200: { 1416 + readonly '@namespace.string'?: string; 1417 + readonly '@namespace.integer'?: number; 1418 + readonly value?: Array<ModelWithString>; 1419 + }; 1420 + /** 1421 + * Message for 201 response 1422 + */ 1423 + 201: ModelThatExtends; 1424 + /** 1425 + * Message for 202 response 1426 + */ 1427 + 202: ModelThatExtendsExtends; 1428 + }; 1277 1429 1278 - export type CallWithResponsesResponse = { 1279 - readonly '@namespace.string'?: string; 1280 - readonly '@namespace.integer'?: number; 1281 - readonly value?: Array<ModelWithString>; 1282 - } | ModelThatExtends | ModelThatExtendsExtends; 1430 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1283 1431 1284 1432 export type CollectionFormatData = { 1285 1433 body?: never; ··· 1348 1496 }; 1349 1497 }; 1350 1498 1351 - export type TypesResponse = number | string | boolean | {}; 1499 + export type TypesResponses = { 1500 + /** 1501 + * Response is a simple number 1502 + */ 1503 + 200: number; 1504 + /** 1505 + * Response is a simple string 1506 + */ 1507 + 201: string; 1508 + /** 1509 + * Response is a simple boolean 1510 + */ 1511 + 202: boolean; 1512 + /** 1513 + * Response is a simple object 1514 + */ 1515 + 203: {}; 1516 + }; 1517 + 1518 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1352 1519 1353 1520 export type UploadFileData = { 1354 1521 body: Blob | File; ··· 1361 1528 query?: never; 1362 1529 }; 1363 1530 1364 - export type UploadFileResponse = boolean; 1531 + export type UploadFileResponses = { 1532 + 200: boolean; 1533 + }; 1534 + 1535 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1365 1536 1366 1537 export type FileResponseData = { 1367 1538 body?: never; ··· 1375 1546 query?: never; 1376 1547 }; 1377 1548 1378 - export type FileResponseResponse = Blob | File; 1549 + export type FileResponseResponses = { 1550 + /** 1551 + * Success 1552 + */ 1553 + 200: Blob | File; 1554 + }; 1555 + 1556 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1379 1557 1380 1558 export type ComplexTypesData = { 1381 1559 body?: never; ··· 1398 1576 }; 1399 1577 }; 1400 1578 1401 - export type ComplexTypesResponse = Array<ModelWithString>; 1579 + export type ComplexTypesErrors = { 1580 + /** 1581 + * 400 `server` error 1582 + */ 1583 + 400: unknown; 1584 + /** 1585 + * 500 server error 1586 + */ 1587 + 500: unknown; 1588 + }; 1589 + 1590 + export type ComplexTypesResponses = { 1591 + /** 1592 + * Successful response 1593 + */ 1594 + 200: Array<ModelWithString>; 1595 + }; 1596 + 1597 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1402 1598 1403 - export type MultipartResponseResponse = { 1404 - file?: Blob | File; 1405 - metadata?: { 1406 - foo?: string; 1407 - bar?: string; 1599 + export type MultipartResponseResponses = { 1600 + /** 1601 + * OK 1602 + */ 1603 + 200: { 1604 + file?: Blob | File; 1605 + metadata?: { 1606 + foo?: string; 1607 + bar?: string; 1608 + }; 1408 1609 }; 1409 1610 }; 1611 + 1612 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1410 1613 1411 1614 export type MultipartRequestData = { 1412 1615 body?: { ··· 1439 1642 query?: never; 1440 1643 }; 1441 1644 1442 - export type ComplexParamsResponse = ModelWithString; 1645 + export type ComplexParamsResponses = { 1646 + /** 1647 + * Success 1648 + */ 1649 + 200: ModelWithString; 1650 + }; 1651 + 1652 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1653 + 1654 + export type CallWithResultFromHeaderErrors = { 1655 + /** 1656 + * 400 server error 1657 + */ 1658 + 400: unknown; 1659 + /** 1660 + * 500 server error 1661 + */ 1662 + 500: unknown; 1663 + }; 1664 + 1665 + export type CallWithResultFromHeaderResponses = { 1666 + /** 1667 + * Successful response 1668 + */ 1669 + 200: unknown; 1670 + }; 1443 1671 1444 1672 export type TestErrorCodeData = { 1445 1673 body?: never; ··· 1452 1680 }; 1453 1681 }; 1454 1682 1683 + export type TestErrorCodeErrors = { 1684 + /** 1685 + * Custom message: Internal Server Error 1686 + */ 1687 + 500: unknown; 1688 + /** 1689 + * Custom message: Not Implemented 1690 + */ 1691 + 501: unknown; 1692 + /** 1693 + * Custom message: Bad Gateway 1694 + */ 1695 + 502: unknown; 1696 + /** 1697 + * Custom message: Service Unavailable 1698 + */ 1699 + 503: unknown; 1700 + }; 1701 + 1702 + export type TestErrorCodeResponses = { 1703 + /** 1704 + * Custom message: Successful response 1705 + */ 1706 + 200: unknown; 1707 + }; 1708 + 1455 1709 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1456 1710 body?: never; 1457 1711 path?: never; ··· 1463 1717 }; 1464 1718 }; 1465 1719 1466 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1720 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1721 + /** 1722 + * Successful response 1723 + */ 1724 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1725 + }; 1726 + 1727 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1467 1728 1468 1729 export type PutWithFormUrlEncodedData = { 1469 1730 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/types.gen.ts
··· 947 947 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 948 948 }; 949 949 950 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 950 + export type ImportResponses = { 951 + /** 952 + * Success 953 + */ 954 + 200: Model_From_Zendesk; 955 + /** 956 + * Default success response 957 + */ 958 + default: ModelWithReadOnlyAndWriteOnly; 959 + }; 960 + 961 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 951 962 952 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 963 + export type ApiVversionOdataControllerCountResponses = { 964 + /** 965 + * Success 966 + */ 967 + 200: Model_From_Zendesk; 968 + }; 969 + 970 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 953 971 954 972 export type GetApiVbyApiVersionSimpleOperationData = { 955 973 body?: never; ··· 962 980 query?: never; 963 981 }; 964 982 965 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 983 + export type GetApiVbyApiVersionSimpleOperationErrors = { 984 + /** 985 + * Default error response 986 + */ 987 + default: ModelWithBoolean; 988 + }; 966 989 967 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 990 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 991 + 992 + export type GetApiVbyApiVersionSimpleOperationResponses = { 993 + /** 994 + * Response is a simple number 995 + */ 996 + 200: number; 997 + }; 998 + 999 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 968 1000 969 1001 export type DeleteFooData3 = { 970 1002 body?: never; ··· 1136 1168 }; 1137 1169 }; 1138 1170 1139 - export type PostCallWithOptionalParamResponse = number | void; 1171 + export type PostCallWithOptionalParamResponses = { 1172 + /** 1173 + * Response is a simple number 1174 + */ 1175 + 200: number; 1176 + /** 1177 + * Success 1178 + */ 1179 + 204: void; 1180 + }; 1181 + 1182 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1140 1183 1141 1184 export type PostApiVbyApiVersionRequestBodyData = { 1142 1185 /** ··· 1259 1302 }; 1260 1303 }; 1261 1304 1262 - export type CallWithNoContentResponseResponse = void; 1305 + export type CallWithNoContentResponseResponses = { 1306 + /** 1307 + * Success 1308 + */ 1309 + 204: void; 1310 + }; 1263 1311 1264 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1312 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1265 1313 1266 - export type DummyAResponse = _400; 1314 + export type CallWithResponseAndNoContentResponseResponses = { 1315 + /** 1316 + * Response is a simple number 1317 + */ 1318 + 200: number; 1319 + /** 1320 + * Success 1321 + */ 1322 + 204: void; 1323 + }; 1267 1324 1268 - export type DummyBResponse = void; 1325 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1269 1326 1270 - export type CallWithResponseResponse = _import; 1327 + export type DummyAResponses = { 1328 + 200: _400; 1329 + }; 1271 1330 1272 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1331 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1273 1332 1274 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1333 + export type DummyBResponses = { 1334 + /** 1335 + * Success 1336 + */ 1337 + 204: void; 1338 + }; 1339 + 1340 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1275 1341 1276 - export type CallWithResponsesError = ModelWithStringError; 1342 + export type CallWithResponseResponses = { 1343 + default: _import; 1344 + }; 1345 + 1346 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1347 + 1348 + export type CallWithDuplicateResponsesErrors = { 1349 + /** 1350 + * Message for 500 error 1351 + */ 1352 + 500: ModelWithStringError; 1353 + /** 1354 + * Message for 501 error 1355 + */ 1356 + 501: ModelWithStringError; 1357 + /** 1358 + * Message for 502 error 1359 + */ 1360 + 502: ModelWithStringError; 1361 + /** 1362 + * Message for 4XX errors 1363 + */ 1364 + '4XX': DictionaryWithArray; 1365 + /** 1366 + * Default error response 1367 + */ 1368 + default: ModelWithBoolean; 1369 + }; 1370 + 1371 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1372 + 1373 + export type CallWithDuplicateResponsesResponses = { 1374 + /** 1375 + * Message for 200 response 1376 + */ 1377 + 200: ModelWithBoolean & ModelWithInteger; 1378 + /** 1379 + * Message for 201 response 1380 + */ 1381 + 201: ModelWithString; 1382 + /** 1383 + * Message for 202 response 1384 + */ 1385 + 202: ModelWithString; 1386 + }; 1387 + 1388 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1389 + 1390 + export type CallWithResponsesErrors = { 1391 + /** 1392 + * Message for 500 error 1393 + */ 1394 + 500: ModelWithStringError; 1395 + /** 1396 + * Message for 501 error 1397 + */ 1398 + 501: ModelWithStringError; 1399 + /** 1400 + * Message for 502 error 1401 + */ 1402 + 502: ModelWithStringError; 1403 + /** 1404 + * Message for default response 1405 + */ 1406 + default: ModelWithStringError; 1407 + }; 1408 + 1409 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1410 + 1411 + export type CallWithResponsesResponses = { 1412 + /** 1413 + * Message for 200 response 1414 + */ 1415 + 200: { 1416 + readonly '@namespace.string'?: string; 1417 + readonly '@namespace.integer'?: number; 1418 + readonly value?: Array<ModelWithString>; 1419 + }; 1420 + /** 1421 + * Message for 201 response 1422 + */ 1423 + 201: ModelThatExtends; 1424 + /** 1425 + * Message for 202 response 1426 + */ 1427 + 202: ModelThatExtendsExtends; 1428 + }; 1277 1429 1278 - export type CallWithResponsesResponse = { 1279 - readonly '@namespace.string'?: string; 1280 - readonly '@namespace.integer'?: number; 1281 - readonly value?: Array<ModelWithString>; 1282 - } | ModelThatExtends | ModelThatExtendsExtends; 1430 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1283 1431 1284 1432 export type CollectionFormatData = { 1285 1433 body?: never; ··· 1348 1496 }; 1349 1497 }; 1350 1498 1351 - export type TypesResponse = number | string | boolean | {}; 1499 + export type TypesResponses = { 1500 + /** 1501 + * Response is a simple number 1502 + */ 1503 + 200: number; 1504 + /** 1505 + * Response is a simple string 1506 + */ 1507 + 201: string; 1508 + /** 1509 + * Response is a simple boolean 1510 + */ 1511 + 202: boolean; 1512 + /** 1513 + * Response is a simple object 1514 + */ 1515 + 203: {}; 1516 + }; 1517 + 1518 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1352 1519 1353 1520 export type UploadFileData = { 1354 1521 body: Blob | File; ··· 1361 1528 query?: never; 1362 1529 }; 1363 1530 1364 - export type UploadFileResponse = boolean; 1531 + export type UploadFileResponses = { 1532 + 200: boolean; 1533 + }; 1534 + 1535 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1365 1536 1366 1537 export type FileResponseData = { 1367 1538 body?: never; ··· 1375 1546 query?: never; 1376 1547 }; 1377 1548 1378 - export type FileResponseResponse = Blob | File; 1549 + export type FileResponseResponses = { 1550 + /** 1551 + * Success 1552 + */ 1553 + 200: Blob | File; 1554 + }; 1555 + 1556 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1379 1557 1380 1558 export type ComplexTypesData = { 1381 1559 body?: never; ··· 1398 1576 }; 1399 1577 }; 1400 1578 1401 - export type ComplexTypesResponse = Array<ModelWithString>; 1579 + export type ComplexTypesErrors = { 1580 + /** 1581 + * 400 `server` error 1582 + */ 1583 + 400: unknown; 1584 + /** 1585 + * 500 server error 1586 + */ 1587 + 500: unknown; 1588 + }; 1589 + 1590 + export type ComplexTypesResponses = { 1591 + /** 1592 + * Successful response 1593 + */ 1594 + 200: Array<ModelWithString>; 1595 + }; 1596 + 1597 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1402 1598 1403 - export type MultipartResponseResponse = { 1404 - file?: Blob | File; 1405 - metadata?: { 1406 - foo?: string; 1407 - bar?: string; 1599 + export type MultipartResponseResponses = { 1600 + /** 1601 + * OK 1602 + */ 1603 + 200: { 1604 + file?: Blob | File; 1605 + metadata?: { 1606 + foo?: string; 1607 + bar?: string; 1608 + }; 1408 1609 }; 1409 1610 }; 1611 + 1612 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1410 1613 1411 1614 export type MultipartRequestData = { 1412 1615 body?: { ··· 1439 1642 query?: never; 1440 1643 }; 1441 1644 1442 - export type ComplexParamsResponse = ModelWithString; 1645 + export type ComplexParamsResponses = { 1646 + /** 1647 + * Success 1648 + */ 1649 + 200: ModelWithString; 1650 + }; 1651 + 1652 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1653 + 1654 + export type CallWithResultFromHeaderErrors = { 1655 + /** 1656 + * 400 server error 1657 + */ 1658 + 400: unknown; 1659 + /** 1660 + * 500 server error 1661 + */ 1662 + 500: unknown; 1663 + }; 1664 + 1665 + export type CallWithResultFromHeaderResponses = { 1666 + /** 1667 + * Successful response 1668 + */ 1669 + 200: unknown; 1670 + }; 1443 1671 1444 1672 export type TestErrorCodeData = { 1445 1673 body?: never; ··· 1452 1680 }; 1453 1681 }; 1454 1682 1683 + export type TestErrorCodeErrors = { 1684 + /** 1685 + * Custom message: Internal Server Error 1686 + */ 1687 + 500: unknown; 1688 + /** 1689 + * Custom message: Not Implemented 1690 + */ 1691 + 501: unknown; 1692 + /** 1693 + * Custom message: Bad Gateway 1694 + */ 1695 + 502: unknown; 1696 + /** 1697 + * Custom message: Service Unavailable 1698 + */ 1699 + 503: unknown; 1700 + }; 1701 + 1702 + export type TestErrorCodeResponses = { 1703 + /** 1704 + * Custom message: Successful response 1705 + */ 1706 + 200: unknown; 1707 + }; 1708 + 1455 1709 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1456 1710 body?: never; 1457 1711 path?: never; ··· 1463 1717 }; 1464 1718 }; 1465 1719 1466 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1720 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1721 + /** 1722 + * Successful response 1723 + */ 1724 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1725 + }; 1726 + 1727 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1467 1728 1468 1729 export type PutWithFormUrlEncodedData = { 1469 1730 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/types.gen.ts
··· 947 947 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 948 948 }; 949 949 950 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 950 + export type ImportResponses = { 951 + /** 952 + * Success 953 + */ 954 + 200: Model_From_Zendesk; 955 + /** 956 + * Default success response 957 + */ 958 + default: ModelWithReadOnlyAndWriteOnly; 959 + }; 960 + 961 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 951 962 952 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 963 + export type ApiVversionOdataControllerCountResponses = { 964 + /** 965 + * Success 966 + */ 967 + 200: Model_From_Zendesk; 968 + }; 969 + 970 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 953 971 954 972 export type GetApiVbyApiVersionSimpleOperationData = { 955 973 body?: never; ··· 962 980 query?: never; 963 981 }; 964 982 965 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 983 + export type GetApiVbyApiVersionSimpleOperationErrors = { 984 + /** 985 + * Default error response 986 + */ 987 + default: ModelWithBoolean; 988 + }; 966 989 967 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 990 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 991 + 992 + export type GetApiVbyApiVersionSimpleOperationResponses = { 993 + /** 994 + * Response is a simple number 995 + */ 996 + 200: number; 997 + }; 998 + 999 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 968 1000 969 1001 export type DeleteFooData3 = { 970 1002 body?: never; ··· 1136 1168 }; 1137 1169 }; 1138 1170 1139 - export type PostCallWithOptionalParamResponse = number | void; 1171 + export type PostCallWithOptionalParamResponses = { 1172 + /** 1173 + * Response is a simple number 1174 + */ 1175 + 200: number; 1176 + /** 1177 + * Success 1178 + */ 1179 + 204: void; 1180 + }; 1181 + 1182 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1140 1183 1141 1184 export type PostApiVbyApiVersionRequestBodyData = { 1142 1185 /** ··· 1259 1302 }; 1260 1303 }; 1261 1304 1262 - export type CallWithNoContentResponseResponse = void; 1305 + export type CallWithNoContentResponseResponses = { 1306 + /** 1307 + * Success 1308 + */ 1309 + 204: void; 1310 + }; 1263 1311 1264 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1312 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1265 1313 1266 - export type DummyAResponse = _400; 1314 + export type CallWithResponseAndNoContentResponseResponses = { 1315 + /** 1316 + * Response is a simple number 1317 + */ 1318 + 200: number; 1319 + /** 1320 + * Success 1321 + */ 1322 + 204: void; 1323 + }; 1267 1324 1268 - export type DummyBResponse = void; 1325 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1269 1326 1270 - export type CallWithResponseResponse = _import; 1327 + export type DummyAResponses = { 1328 + 200: _400; 1329 + }; 1271 1330 1272 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1331 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1273 1332 1274 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1333 + export type DummyBResponses = { 1334 + /** 1335 + * Success 1336 + */ 1337 + 204: void; 1338 + }; 1339 + 1340 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1275 1341 1276 - export type CallWithResponsesError = ModelWithStringError; 1342 + export type CallWithResponseResponses = { 1343 + default: _import; 1344 + }; 1345 + 1346 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1347 + 1348 + export type CallWithDuplicateResponsesErrors = { 1349 + /** 1350 + * Message for 500 error 1351 + */ 1352 + 500: ModelWithStringError; 1353 + /** 1354 + * Message for 501 error 1355 + */ 1356 + 501: ModelWithStringError; 1357 + /** 1358 + * Message for 502 error 1359 + */ 1360 + 502: ModelWithStringError; 1361 + /** 1362 + * Message for 4XX errors 1363 + */ 1364 + '4XX': DictionaryWithArray; 1365 + /** 1366 + * Default error response 1367 + */ 1368 + default: ModelWithBoolean; 1369 + }; 1370 + 1371 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1372 + 1373 + export type CallWithDuplicateResponsesResponses = { 1374 + /** 1375 + * Message for 200 response 1376 + */ 1377 + 200: ModelWithBoolean & ModelWithInteger; 1378 + /** 1379 + * Message for 201 response 1380 + */ 1381 + 201: ModelWithString; 1382 + /** 1383 + * Message for 202 response 1384 + */ 1385 + 202: ModelWithString; 1386 + }; 1387 + 1388 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1389 + 1390 + export type CallWithResponsesErrors = { 1391 + /** 1392 + * Message for 500 error 1393 + */ 1394 + 500: ModelWithStringError; 1395 + /** 1396 + * Message for 501 error 1397 + */ 1398 + 501: ModelWithStringError; 1399 + /** 1400 + * Message for 502 error 1401 + */ 1402 + 502: ModelWithStringError; 1403 + /** 1404 + * Message for default response 1405 + */ 1406 + default: ModelWithStringError; 1407 + }; 1408 + 1409 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1410 + 1411 + export type CallWithResponsesResponses = { 1412 + /** 1413 + * Message for 200 response 1414 + */ 1415 + 200: { 1416 + readonly '@namespace.string'?: string; 1417 + readonly '@namespace.integer'?: number; 1418 + readonly value?: Array<ModelWithString>; 1419 + }; 1420 + /** 1421 + * Message for 201 response 1422 + */ 1423 + 201: ModelThatExtends; 1424 + /** 1425 + * Message for 202 response 1426 + */ 1427 + 202: ModelThatExtendsExtends; 1428 + }; 1277 1429 1278 - export type CallWithResponsesResponse = { 1279 - readonly '@namespace.string'?: string; 1280 - readonly '@namespace.integer'?: number; 1281 - readonly value?: Array<ModelWithString>; 1282 - } | ModelThatExtends | ModelThatExtendsExtends; 1430 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1283 1431 1284 1432 export type CollectionFormatData = { 1285 1433 body?: never; ··· 1348 1496 }; 1349 1497 }; 1350 1498 1351 - export type TypesResponse = number | string | boolean | {}; 1499 + export type TypesResponses = { 1500 + /** 1501 + * Response is a simple number 1502 + */ 1503 + 200: number; 1504 + /** 1505 + * Response is a simple string 1506 + */ 1507 + 201: string; 1508 + /** 1509 + * Response is a simple boolean 1510 + */ 1511 + 202: boolean; 1512 + /** 1513 + * Response is a simple object 1514 + */ 1515 + 203: {}; 1516 + }; 1517 + 1518 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1352 1519 1353 1520 export type UploadFileData = { 1354 1521 body: Blob | File; ··· 1361 1528 query?: never; 1362 1529 }; 1363 1530 1364 - export type UploadFileResponse = boolean; 1531 + export type UploadFileResponses = { 1532 + 200: boolean; 1533 + }; 1534 + 1535 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1365 1536 1366 1537 export type FileResponseData = { 1367 1538 body?: never; ··· 1375 1546 query?: never; 1376 1547 }; 1377 1548 1378 - export type FileResponseResponse = Blob | File; 1549 + export type FileResponseResponses = { 1550 + /** 1551 + * Success 1552 + */ 1553 + 200: Blob | File; 1554 + }; 1555 + 1556 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1379 1557 1380 1558 export type ComplexTypesData = { 1381 1559 body?: never; ··· 1398 1576 }; 1399 1577 }; 1400 1578 1401 - export type ComplexTypesResponse = Array<ModelWithString>; 1579 + export type ComplexTypesErrors = { 1580 + /** 1581 + * 400 `server` error 1582 + */ 1583 + 400: unknown; 1584 + /** 1585 + * 500 server error 1586 + */ 1587 + 500: unknown; 1588 + }; 1589 + 1590 + export type ComplexTypesResponses = { 1591 + /** 1592 + * Successful response 1593 + */ 1594 + 200: Array<ModelWithString>; 1595 + }; 1596 + 1597 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1402 1598 1403 - export type MultipartResponseResponse = { 1404 - file?: Blob | File; 1405 - metadata?: { 1406 - foo?: string; 1407 - bar?: string; 1599 + export type MultipartResponseResponses = { 1600 + /** 1601 + * OK 1602 + */ 1603 + 200: { 1604 + file?: Blob | File; 1605 + metadata?: { 1606 + foo?: string; 1607 + bar?: string; 1608 + }; 1408 1609 }; 1409 1610 }; 1611 + 1612 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1410 1613 1411 1614 export type MultipartRequestData = { 1412 1615 body?: { ··· 1439 1642 query?: never; 1440 1643 }; 1441 1644 1442 - export type ComplexParamsResponse = ModelWithString; 1645 + export type ComplexParamsResponses = { 1646 + /** 1647 + * Success 1648 + */ 1649 + 200: ModelWithString; 1650 + }; 1651 + 1652 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1653 + 1654 + export type CallWithResultFromHeaderErrors = { 1655 + /** 1656 + * 400 server error 1657 + */ 1658 + 400: unknown; 1659 + /** 1660 + * 500 server error 1661 + */ 1662 + 500: unknown; 1663 + }; 1664 + 1665 + export type CallWithResultFromHeaderResponses = { 1666 + /** 1667 + * Successful response 1668 + */ 1669 + 200: unknown; 1670 + }; 1443 1671 1444 1672 export type TestErrorCodeData = { 1445 1673 body?: never; ··· 1452 1680 }; 1453 1681 }; 1454 1682 1683 + export type TestErrorCodeErrors = { 1684 + /** 1685 + * Custom message: Internal Server Error 1686 + */ 1687 + 500: unknown; 1688 + /** 1689 + * Custom message: Not Implemented 1690 + */ 1691 + 501: unknown; 1692 + /** 1693 + * Custom message: Bad Gateway 1694 + */ 1695 + 502: unknown; 1696 + /** 1697 + * Custom message: Service Unavailable 1698 + */ 1699 + 503: unknown; 1700 + }; 1701 + 1702 + export type TestErrorCodeResponses = { 1703 + /** 1704 + * Custom message: Successful response 1705 + */ 1706 + 200: unknown; 1707 + }; 1708 + 1455 1709 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1456 1710 body?: never; 1457 1711 path?: never; ··· 1463 1717 }; 1464 1718 }; 1465 1719 1466 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1720 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1721 + /** 1722 + * Successful response 1723 + */ 1724 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1725 + }; 1726 + 1727 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1467 1728 1468 1729 export type PutWithFormUrlEncodedData = { 1469 1730 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/types.gen.ts
··· 947 947 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 948 948 }; 949 949 950 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 950 + export type ImportResponses = { 951 + /** 952 + * Success 953 + */ 954 + 200: Model_From_Zendesk; 955 + /** 956 + * Default success response 957 + */ 958 + default: ModelWithReadOnlyAndWriteOnly; 959 + }; 960 + 961 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 951 962 952 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 963 + export type ApiVversionOdataControllerCountResponses = { 964 + /** 965 + * Success 966 + */ 967 + 200: Model_From_Zendesk; 968 + }; 969 + 970 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 953 971 954 972 export type GetApiVbyApiVersionSimpleOperationData = { 955 973 body?: never; ··· 962 980 query?: never; 963 981 }; 964 982 965 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 983 + export type GetApiVbyApiVersionSimpleOperationErrors = { 984 + /** 985 + * Default error response 986 + */ 987 + default: ModelWithBoolean; 988 + }; 966 989 967 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 990 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 991 + 992 + export type GetApiVbyApiVersionSimpleOperationResponses = { 993 + /** 994 + * Response is a simple number 995 + */ 996 + 200: number; 997 + }; 998 + 999 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 968 1000 969 1001 export type DeleteFooData3 = { 970 1002 body?: never; ··· 1136 1168 }; 1137 1169 }; 1138 1170 1139 - export type PostCallWithOptionalParamResponse = number | void; 1171 + export type PostCallWithOptionalParamResponses = { 1172 + /** 1173 + * Response is a simple number 1174 + */ 1175 + 200: number; 1176 + /** 1177 + * Success 1178 + */ 1179 + 204: void; 1180 + }; 1181 + 1182 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1140 1183 1141 1184 export type PostApiVbyApiVersionRequestBodyData = { 1142 1185 /** ··· 1259 1302 }; 1260 1303 }; 1261 1304 1262 - export type CallWithNoContentResponseResponse = void; 1305 + export type CallWithNoContentResponseResponses = { 1306 + /** 1307 + * Success 1308 + */ 1309 + 204: void; 1310 + }; 1263 1311 1264 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1312 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1265 1313 1266 - export type DummyAResponse = _400; 1314 + export type CallWithResponseAndNoContentResponseResponses = { 1315 + /** 1316 + * Response is a simple number 1317 + */ 1318 + 200: number; 1319 + /** 1320 + * Success 1321 + */ 1322 + 204: void; 1323 + }; 1267 1324 1268 - export type DummyBResponse = void; 1325 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1269 1326 1270 - export type CallWithResponseResponse = _import; 1327 + export type DummyAResponses = { 1328 + 200: _400; 1329 + }; 1271 1330 1272 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1331 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1273 1332 1274 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1333 + export type DummyBResponses = { 1334 + /** 1335 + * Success 1336 + */ 1337 + 204: void; 1338 + }; 1339 + 1340 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1275 1341 1276 - export type CallWithResponsesError = ModelWithStringError; 1342 + export type CallWithResponseResponses = { 1343 + default: _import; 1344 + }; 1345 + 1346 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1347 + 1348 + export type CallWithDuplicateResponsesErrors = { 1349 + /** 1350 + * Message for 500 error 1351 + */ 1352 + 500: ModelWithStringError; 1353 + /** 1354 + * Message for 501 error 1355 + */ 1356 + 501: ModelWithStringError; 1357 + /** 1358 + * Message for 502 error 1359 + */ 1360 + 502: ModelWithStringError; 1361 + /** 1362 + * Message for 4XX errors 1363 + */ 1364 + '4XX': DictionaryWithArray; 1365 + /** 1366 + * Default error response 1367 + */ 1368 + default: ModelWithBoolean; 1369 + }; 1370 + 1371 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1372 + 1373 + export type CallWithDuplicateResponsesResponses = { 1374 + /** 1375 + * Message for 200 response 1376 + */ 1377 + 200: ModelWithBoolean & ModelWithInteger; 1378 + /** 1379 + * Message for 201 response 1380 + */ 1381 + 201: ModelWithString; 1382 + /** 1383 + * Message for 202 response 1384 + */ 1385 + 202: ModelWithString; 1386 + }; 1387 + 1388 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1389 + 1390 + export type CallWithResponsesErrors = { 1391 + /** 1392 + * Message for 500 error 1393 + */ 1394 + 500: ModelWithStringError; 1395 + /** 1396 + * Message for 501 error 1397 + */ 1398 + 501: ModelWithStringError; 1399 + /** 1400 + * Message for 502 error 1401 + */ 1402 + 502: ModelWithStringError; 1403 + /** 1404 + * Message for default response 1405 + */ 1406 + default: ModelWithStringError; 1407 + }; 1408 + 1409 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1410 + 1411 + export type CallWithResponsesResponses = { 1412 + /** 1413 + * Message for 200 response 1414 + */ 1415 + 200: { 1416 + readonly '@namespace.string'?: string; 1417 + readonly '@namespace.integer'?: number; 1418 + readonly value?: Array<ModelWithString>; 1419 + }; 1420 + /** 1421 + * Message for 201 response 1422 + */ 1423 + 201: ModelThatExtends; 1424 + /** 1425 + * Message for 202 response 1426 + */ 1427 + 202: ModelThatExtendsExtends; 1428 + }; 1277 1429 1278 - export type CallWithResponsesResponse = { 1279 - readonly '@namespace.string'?: string; 1280 - readonly '@namespace.integer'?: number; 1281 - readonly value?: Array<ModelWithString>; 1282 - } | ModelThatExtends | ModelThatExtendsExtends; 1430 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1283 1431 1284 1432 export type CollectionFormatData = { 1285 1433 body?: never; ··· 1348 1496 }; 1349 1497 }; 1350 1498 1351 - export type TypesResponse = number | string | boolean | {}; 1499 + export type TypesResponses = { 1500 + /** 1501 + * Response is a simple number 1502 + */ 1503 + 200: number; 1504 + /** 1505 + * Response is a simple string 1506 + */ 1507 + 201: string; 1508 + /** 1509 + * Response is a simple boolean 1510 + */ 1511 + 202: boolean; 1512 + /** 1513 + * Response is a simple object 1514 + */ 1515 + 203: {}; 1516 + }; 1517 + 1518 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1352 1519 1353 1520 export type UploadFileData = { 1354 1521 body: Blob | File; ··· 1361 1528 query?: never; 1362 1529 }; 1363 1530 1364 - export type UploadFileResponse = boolean; 1531 + export type UploadFileResponses = { 1532 + 200: boolean; 1533 + }; 1534 + 1535 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1365 1536 1366 1537 export type FileResponseData = { 1367 1538 body?: never; ··· 1375 1546 query?: never; 1376 1547 }; 1377 1548 1378 - export type FileResponseResponse = Blob | File; 1549 + export type FileResponseResponses = { 1550 + /** 1551 + * Success 1552 + */ 1553 + 200: Blob | File; 1554 + }; 1555 + 1556 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1379 1557 1380 1558 export type ComplexTypesData = { 1381 1559 body?: never; ··· 1398 1576 }; 1399 1577 }; 1400 1578 1401 - export type ComplexTypesResponse = Array<ModelWithString>; 1579 + export type ComplexTypesErrors = { 1580 + /** 1581 + * 400 `server` error 1582 + */ 1583 + 400: unknown; 1584 + /** 1585 + * 500 server error 1586 + */ 1587 + 500: unknown; 1588 + }; 1589 + 1590 + export type ComplexTypesResponses = { 1591 + /** 1592 + * Successful response 1593 + */ 1594 + 200: Array<ModelWithString>; 1595 + }; 1596 + 1597 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1402 1598 1403 - export type MultipartResponseResponse = { 1404 - file?: Blob | File; 1405 - metadata?: { 1406 - foo?: string; 1407 - bar?: string; 1599 + export type MultipartResponseResponses = { 1600 + /** 1601 + * OK 1602 + */ 1603 + 200: { 1604 + file?: Blob | File; 1605 + metadata?: { 1606 + foo?: string; 1607 + bar?: string; 1608 + }; 1408 1609 }; 1409 1610 }; 1611 + 1612 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1410 1613 1411 1614 export type MultipartRequestData = { 1412 1615 body?: { ··· 1439 1642 query?: never; 1440 1643 }; 1441 1644 1442 - export type ComplexParamsResponse = ModelWithString; 1645 + export type ComplexParamsResponses = { 1646 + /** 1647 + * Success 1648 + */ 1649 + 200: ModelWithString; 1650 + }; 1651 + 1652 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1653 + 1654 + export type CallWithResultFromHeaderErrors = { 1655 + /** 1656 + * 400 server error 1657 + */ 1658 + 400: unknown; 1659 + /** 1660 + * 500 server error 1661 + */ 1662 + 500: unknown; 1663 + }; 1664 + 1665 + export type CallWithResultFromHeaderResponses = { 1666 + /** 1667 + * Successful response 1668 + */ 1669 + 200: unknown; 1670 + }; 1443 1671 1444 1672 export type TestErrorCodeData = { 1445 1673 body?: never; ··· 1452 1680 }; 1453 1681 }; 1454 1682 1683 + export type TestErrorCodeErrors = { 1684 + /** 1685 + * Custom message: Internal Server Error 1686 + */ 1687 + 500: unknown; 1688 + /** 1689 + * Custom message: Not Implemented 1690 + */ 1691 + 501: unknown; 1692 + /** 1693 + * Custom message: Bad Gateway 1694 + */ 1695 + 502: unknown; 1696 + /** 1697 + * Custom message: Service Unavailable 1698 + */ 1699 + 503: unknown; 1700 + }; 1701 + 1702 + export type TestErrorCodeResponses = { 1703 + /** 1704 + * Custom message: Successful response 1705 + */ 1706 + 200: unknown; 1707 + }; 1708 + 1455 1709 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1456 1710 body?: never; 1457 1711 path?: never; ··· 1463 1717 }; 1464 1718 }; 1465 1719 1466 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1720 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1721 + /** 1722 + * Successful response 1723 + */ 1724 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1725 + }; 1726 + 1727 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1467 1728 1468 1729 export type PutWithFormUrlEncodedData = { 1469 1730 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/types.gen.ts
··· 947 947 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 948 948 }; 949 949 950 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 950 + export type ImportResponses = { 951 + /** 952 + * Success 953 + */ 954 + 200: Model_From_Zendesk; 955 + /** 956 + * Default success response 957 + */ 958 + default: ModelWithReadOnlyAndWriteOnly; 959 + }; 960 + 961 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 951 962 952 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 963 + export type ApiVversionOdataControllerCountResponses = { 964 + /** 965 + * Success 966 + */ 967 + 200: Model_From_Zendesk; 968 + }; 969 + 970 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 953 971 954 972 export type GetApiVbyApiVersionSimpleOperationData = { 955 973 body?: never; ··· 962 980 query?: never; 963 981 }; 964 982 965 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 983 + export type GetApiVbyApiVersionSimpleOperationErrors = { 984 + /** 985 + * Default error response 986 + */ 987 + default: ModelWithBoolean; 988 + }; 966 989 967 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 990 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 991 + 992 + export type GetApiVbyApiVersionSimpleOperationResponses = { 993 + /** 994 + * Response is a simple number 995 + */ 996 + 200: number; 997 + }; 998 + 999 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 968 1000 969 1001 export type DeleteFooData3 = { 970 1002 body?: never; ··· 1136 1168 }; 1137 1169 }; 1138 1170 1139 - export type PostCallWithOptionalParamResponse = number | void; 1171 + export type PostCallWithOptionalParamResponses = { 1172 + /** 1173 + * Response is a simple number 1174 + */ 1175 + 200: number; 1176 + /** 1177 + * Success 1178 + */ 1179 + 204: void; 1180 + }; 1181 + 1182 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1140 1183 1141 1184 export type PostApiVbyApiVersionRequestBodyData = { 1142 1185 /** ··· 1259 1302 }; 1260 1303 }; 1261 1304 1262 - export type CallWithNoContentResponseResponse = void; 1305 + export type CallWithNoContentResponseResponses = { 1306 + /** 1307 + * Success 1308 + */ 1309 + 204: void; 1310 + }; 1263 1311 1264 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1312 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1265 1313 1266 - export type DummyAResponse = _400; 1314 + export type CallWithResponseAndNoContentResponseResponses = { 1315 + /** 1316 + * Response is a simple number 1317 + */ 1318 + 200: number; 1319 + /** 1320 + * Success 1321 + */ 1322 + 204: void; 1323 + }; 1267 1324 1268 - export type DummyBResponse = void; 1325 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1269 1326 1270 - export type CallWithResponseResponse = _import; 1327 + export type DummyAResponses = { 1328 + 200: _400; 1329 + }; 1271 1330 1272 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1331 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1273 1332 1274 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1333 + export type DummyBResponses = { 1334 + /** 1335 + * Success 1336 + */ 1337 + 204: void; 1338 + }; 1339 + 1340 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1275 1341 1276 - export type CallWithResponsesError = ModelWithStringError; 1342 + export type CallWithResponseResponses = { 1343 + default: _import; 1344 + }; 1345 + 1346 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1347 + 1348 + export type CallWithDuplicateResponsesErrors = { 1349 + /** 1350 + * Message for 500 error 1351 + */ 1352 + 500: ModelWithStringError; 1353 + /** 1354 + * Message for 501 error 1355 + */ 1356 + 501: ModelWithStringError; 1357 + /** 1358 + * Message for 502 error 1359 + */ 1360 + 502: ModelWithStringError; 1361 + /** 1362 + * Message for 4XX errors 1363 + */ 1364 + '4XX': DictionaryWithArray; 1365 + /** 1366 + * Default error response 1367 + */ 1368 + default: ModelWithBoolean; 1369 + }; 1370 + 1371 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1372 + 1373 + export type CallWithDuplicateResponsesResponses = { 1374 + /** 1375 + * Message for 200 response 1376 + */ 1377 + 200: ModelWithBoolean & ModelWithInteger; 1378 + /** 1379 + * Message for 201 response 1380 + */ 1381 + 201: ModelWithString; 1382 + /** 1383 + * Message for 202 response 1384 + */ 1385 + 202: ModelWithString; 1386 + }; 1387 + 1388 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1389 + 1390 + export type CallWithResponsesErrors = { 1391 + /** 1392 + * Message for 500 error 1393 + */ 1394 + 500: ModelWithStringError; 1395 + /** 1396 + * Message for 501 error 1397 + */ 1398 + 501: ModelWithStringError; 1399 + /** 1400 + * Message for 502 error 1401 + */ 1402 + 502: ModelWithStringError; 1403 + /** 1404 + * Message for default response 1405 + */ 1406 + default: ModelWithStringError; 1407 + }; 1408 + 1409 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1410 + 1411 + export type CallWithResponsesResponses = { 1412 + /** 1413 + * Message for 200 response 1414 + */ 1415 + 200: { 1416 + readonly '@namespace.string'?: string; 1417 + readonly '@namespace.integer'?: number; 1418 + readonly value?: Array<ModelWithString>; 1419 + }; 1420 + /** 1421 + * Message for 201 response 1422 + */ 1423 + 201: ModelThatExtends; 1424 + /** 1425 + * Message for 202 response 1426 + */ 1427 + 202: ModelThatExtendsExtends; 1428 + }; 1277 1429 1278 - export type CallWithResponsesResponse = { 1279 - readonly '@namespace.string'?: string; 1280 - readonly '@namespace.integer'?: number; 1281 - readonly value?: Array<ModelWithString>; 1282 - } | ModelThatExtends | ModelThatExtendsExtends; 1430 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1283 1431 1284 1432 export type CollectionFormatData = { 1285 1433 body?: never; ··· 1348 1496 }; 1349 1497 }; 1350 1498 1351 - export type TypesResponse = number | string | boolean | {}; 1499 + export type TypesResponses = { 1500 + /** 1501 + * Response is a simple number 1502 + */ 1503 + 200: number; 1504 + /** 1505 + * Response is a simple string 1506 + */ 1507 + 201: string; 1508 + /** 1509 + * Response is a simple boolean 1510 + */ 1511 + 202: boolean; 1512 + /** 1513 + * Response is a simple object 1514 + */ 1515 + 203: {}; 1516 + }; 1517 + 1518 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1352 1519 1353 1520 export type UploadFileData = { 1354 1521 body: Blob | File; ··· 1361 1528 query?: never; 1362 1529 }; 1363 1530 1364 - export type UploadFileResponse = boolean; 1531 + export type UploadFileResponses = { 1532 + 200: boolean; 1533 + }; 1534 + 1535 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1365 1536 1366 1537 export type FileResponseData = { 1367 1538 body?: never; ··· 1375 1546 query?: never; 1376 1547 }; 1377 1548 1378 - export type FileResponseResponse = Blob | File; 1549 + export type FileResponseResponses = { 1550 + /** 1551 + * Success 1552 + */ 1553 + 200: Blob | File; 1554 + }; 1555 + 1556 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1379 1557 1380 1558 export type ComplexTypesData = { 1381 1559 body?: never; ··· 1398 1576 }; 1399 1577 }; 1400 1578 1401 - export type ComplexTypesResponse = Array<ModelWithString>; 1579 + export type ComplexTypesErrors = { 1580 + /** 1581 + * 400 `server` error 1582 + */ 1583 + 400: unknown; 1584 + /** 1585 + * 500 server error 1586 + */ 1587 + 500: unknown; 1588 + }; 1589 + 1590 + export type ComplexTypesResponses = { 1591 + /** 1592 + * Successful response 1593 + */ 1594 + 200: Array<ModelWithString>; 1595 + }; 1596 + 1597 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1402 1598 1403 - export type MultipartResponseResponse = { 1404 - file?: Blob | File; 1405 - metadata?: { 1406 - foo?: string; 1407 - bar?: string; 1599 + export type MultipartResponseResponses = { 1600 + /** 1601 + * OK 1602 + */ 1603 + 200: { 1604 + file?: Blob | File; 1605 + metadata?: { 1606 + foo?: string; 1607 + bar?: string; 1608 + }; 1408 1609 }; 1409 1610 }; 1611 + 1612 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1410 1613 1411 1614 export type MultipartRequestData = { 1412 1615 body?: { ··· 1439 1642 query?: never; 1440 1643 }; 1441 1644 1442 - export type ComplexParamsResponse = ModelWithString; 1645 + export type ComplexParamsResponses = { 1646 + /** 1647 + * Success 1648 + */ 1649 + 200: ModelWithString; 1650 + }; 1651 + 1652 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1653 + 1654 + export type CallWithResultFromHeaderErrors = { 1655 + /** 1656 + * 400 server error 1657 + */ 1658 + 400: unknown; 1659 + /** 1660 + * 500 server error 1661 + */ 1662 + 500: unknown; 1663 + }; 1664 + 1665 + export type CallWithResultFromHeaderResponses = { 1666 + /** 1667 + * Successful response 1668 + */ 1669 + 200: unknown; 1670 + }; 1443 1671 1444 1672 export type TestErrorCodeData = { 1445 1673 body?: never; ··· 1452 1680 }; 1453 1681 }; 1454 1682 1683 + export type TestErrorCodeErrors = { 1684 + /** 1685 + * Custom message: Internal Server Error 1686 + */ 1687 + 500: unknown; 1688 + /** 1689 + * Custom message: Not Implemented 1690 + */ 1691 + 501: unknown; 1692 + /** 1693 + * Custom message: Bad Gateway 1694 + */ 1695 + 502: unknown; 1696 + /** 1697 + * Custom message: Service Unavailable 1698 + */ 1699 + 503: unknown; 1700 + }; 1701 + 1702 + export type TestErrorCodeResponses = { 1703 + /** 1704 + * Custom message: Successful response 1705 + */ 1706 + 200: unknown; 1707 + }; 1708 + 1455 1709 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1456 1710 body?: never; 1457 1711 path?: never; ··· 1463 1717 }; 1464 1718 }; 1465 1719 1466 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1720 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1721 + /** 1722 + * Successful response 1723 + */ 1724 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1725 + }; 1726 + 1727 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1467 1728 1468 1729 export type PutWithFormUrlEncodedData = { 1469 1730 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/types.gen.ts
··· 947 947 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 948 948 }; 949 949 950 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 950 + export type ImportResponses = { 951 + /** 952 + * Success 953 + */ 954 + 200: Model_From_Zendesk; 955 + /** 956 + * Default success response 957 + */ 958 + default: ModelWithReadOnlyAndWriteOnly; 959 + }; 960 + 961 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 951 962 952 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 963 + export type ApiVversionOdataControllerCountResponses = { 964 + /** 965 + * Success 966 + */ 967 + 200: Model_From_Zendesk; 968 + }; 969 + 970 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 953 971 954 972 export type GetApiVbyApiVersionSimpleOperationData = { 955 973 body?: never; ··· 962 980 query?: never; 963 981 }; 964 982 965 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 983 + export type GetApiVbyApiVersionSimpleOperationErrors = { 984 + /** 985 + * Default error response 986 + */ 987 + default: ModelWithBoolean; 988 + }; 966 989 967 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 990 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 991 + 992 + export type GetApiVbyApiVersionSimpleOperationResponses = { 993 + /** 994 + * Response is a simple number 995 + */ 996 + 200: number; 997 + }; 998 + 999 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 968 1000 969 1001 export type DeleteFooData3 = { 970 1002 body?: never; ··· 1136 1168 }; 1137 1169 }; 1138 1170 1139 - export type PostCallWithOptionalParamResponse = number | void; 1171 + export type PostCallWithOptionalParamResponses = { 1172 + /** 1173 + * Response is a simple number 1174 + */ 1175 + 200: number; 1176 + /** 1177 + * Success 1178 + */ 1179 + 204: void; 1180 + }; 1181 + 1182 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1140 1183 1141 1184 export type PostApiVbyApiVersionRequestBodyData = { 1142 1185 /** ··· 1259 1302 }; 1260 1303 }; 1261 1304 1262 - export type CallWithNoContentResponseResponse = void; 1305 + export type CallWithNoContentResponseResponses = { 1306 + /** 1307 + * Success 1308 + */ 1309 + 204: void; 1310 + }; 1263 1311 1264 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1312 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1265 1313 1266 - export type DummyAResponse = _400; 1314 + export type CallWithResponseAndNoContentResponseResponses = { 1315 + /** 1316 + * Response is a simple number 1317 + */ 1318 + 200: number; 1319 + /** 1320 + * Success 1321 + */ 1322 + 204: void; 1323 + }; 1267 1324 1268 - export type DummyBResponse = void; 1325 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1269 1326 1270 - export type CallWithResponseResponse = _import; 1327 + export type DummyAResponses = { 1328 + 200: _400; 1329 + }; 1271 1330 1272 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1331 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1273 1332 1274 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1333 + export type DummyBResponses = { 1334 + /** 1335 + * Success 1336 + */ 1337 + 204: void; 1338 + }; 1339 + 1340 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1275 1341 1276 - export type CallWithResponsesError = ModelWithStringError; 1342 + export type CallWithResponseResponses = { 1343 + default: _import; 1344 + }; 1345 + 1346 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1347 + 1348 + export type CallWithDuplicateResponsesErrors = { 1349 + /** 1350 + * Message for 500 error 1351 + */ 1352 + 500: ModelWithStringError; 1353 + /** 1354 + * Message for 501 error 1355 + */ 1356 + 501: ModelWithStringError; 1357 + /** 1358 + * Message for 502 error 1359 + */ 1360 + 502: ModelWithStringError; 1361 + /** 1362 + * Message for 4XX errors 1363 + */ 1364 + '4XX': DictionaryWithArray; 1365 + /** 1366 + * Default error response 1367 + */ 1368 + default: ModelWithBoolean; 1369 + }; 1370 + 1371 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1372 + 1373 + export type CallWithDuplicateResponsesResponses = { 1374 + /** 1375 + * Message for 200 response 1376 + */ 1377 + 200: ModelWithBoolean & ModelWithInteger; 1378 + /** 1379 + * Message for 201 response 1380 + */ 1381 + 201: ModelWithString; 1382 + /** 1383 + * Message for 202 response 1384 + */ 1385 + 202: ModelWithString; 1386 + }; 1387 + 1388 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1389 + 1390 + export type CallWithResponsesErrors = { 1391 + /** 1392 + * Message for 500 error 1393 + */ 1394 + 500: ModelWithStringError; 1395 + /** 1396 + * Message for 501 error 1397 + */ 1398 + 501: ModelWithStringError; 1399 + /** 1400 + * Message for 502 error 1401 + */ 1402 + 502: ModelWithStringError; 1403 + /** 1404 + * Message for default response 1405 + */ 1406 + default: ModelWithStringError; 1407 + }; 1408 + 1409 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1410 + 1411 + export type CallWithResponsesResponses = { 1412 + /** 1413 + * Message for 200 response 1414 + */ 1415 + 200: { 1416 + readonly '@namespace.string'?: string; 1417 + readonly '@namespace.integer'?: number; 1418 + readonly value?: Array<ModelWithString>; 1419 + }; 1420 + /** 1421 + * Message for 201 response 1422 + */ 1423 + 201: ModelThatExtends; 1424 + /** 1425 + * Message for 202 response 1426 + */ 1427 + 202: ModelThatExtendsExtends; 1428 + }; 1277 1429 1278 - export type CallWithResponsesResponse = { 1279 - readonly '@namespace.string'?: string; 1280 - readonly '@namespace.integer'?: number; 1281 - readonly value?: Array<ModelWithString>; 1282 - } | ModelThatExtends | ModelThatExtendsExtends; 1430 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1283 1431 1284 1432 export type CollectionFormatData = { 1285 1433 body?: never; ··· 1348 1496 }; 1349 1497 }; 1350 1498 1351 - export type TypesResponse = number | string | boolean | {}; 1499 + export type TypesResponses = { 1500 + /** 1501 + * Response is a simple number 1502 + */ 1503 + 200: number; 1504 + /** 1505 + * Response is a simple string 1506 + */ 1507 + 201: string; 1508 + /** 1509 + * Response is a simple boolean 1510 + */ 1511 + 202: boolean; 1512 + /** 1513 + * Response is a simple object 1514 + */ 1515 + 203: {}; 1516 + }; 1517 + 1518 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1352 1519 1353 1520 export type UploadFileData = { 1354 1521 body: Blob | File; ··· 1361 1528 query?: never; 1362 1529 }; 1363 1530 1364 - export type UploadFileResponse = boolean; 1531 + export type UploadFileResponses = { 1532 + 200: boolean; 1533 + }; 1534 + 1535 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1365 1536 1366 1537 export type FileResponseData = { 1367 1538 body?: never; ··· 1375 1546 query?: never; 1376 1547 }; 1377 1548 1378 - export type FileResponseResponse = Blob | File; 1549 + export type FileResponseResponses = { 1550 + /** 1551 + * Success 1552 + */ 1553 + 200: Blob | File; 1554 + }; 1555 + 1556 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1379 1557 1380 1558 export type ComplexTypesData = { 1381 1559 body?: never; ··· 1398 1576 }; 1399 1577 }; 1400 1578 1401 - export type ComplexTypesResponse = Array<ModelWithString>; 1579 + export type ComplexTypesErrors = { 1580 + /** 1581 + * 400 `server` error 1582 + */ 1583 + 400: unknown; 1584 + /** 1585 + * 500 server error 1586 + */ 1587 + 500: unknown; 1588 + }; 1589 + 1590 + export type ComplexTypesResponses = { 1591 + /** 1592 + * Successful response 1593 + */ 1594 + 200: Array<ModelWithString>; 1595 + }; 1596 + 1597 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1402 1598 1403 - export type MultipartResponseResponse = { 1404 - file?: Blob | File; 1405 - metadata?: { 1406 - foo?: string; 1407 - bar?: string; 1599 + export type MultipartResponseResponses = { 1600 + /** 1601 + * OK 1602 + */ 1603 + 200: { 1604 + file?: Blob | File; 1605 + metadata?: { 1606 + foo?: string; 1607 + bar?: string; 1608 + }; 1408 1609 }; 1409 1610 }; 1611 + 1612 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1410 1613 1411 1614 export type MultipartRequestData = { 1412 1615 body?: { ··· 1439 1642 query?: never; 1440 1643 }; 1441 1644 1442 - export type ComplexParamsResponse = ModelWithString; 1645 + export type ComplexParamsResponses = { 1646 + /** 1647 + * Success 1648 + */ 1649 + 200: ModelWithString; 1650 + }; 1651 + 1652 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1653 + 1654 + export type CallWithResultFromHeaderErrors = { 1655 + /** 1656 + * 400 server error 1657 + */ 1658 + 400: unknown; 1659 + /** 1660 + * 500 server error 1661 + */ 1662 + 500: unknown; 1663 + }; 1664 + 1665 + export type CallWithResultFromHeaderResponses = { 1666 + /** 1667 + * Successful response 1668 + */ 1669 + 200: unknown; 1670 + }; 1443 1671 1444 1672 export type TestErrorCodeData = { 1445 1673 body?: never; ··· 1452 1680 }; 1453 1681 }; 1454 1682 1683 + export type TestErrorCodeErrors = { 1684 + /** 1685 + * Custom message: Internal Server Error 1686 + */ 1687 + 500: unknown; 1688 + /** 1689 + * Custom message: Not Implemented 1690 + */ 1691 + 501: unknown; 1692 + /** 1693 + * Custom message: Bad Gateway 1694 + */ 1695 + 502: unknown; 1696 + /** 1697 + * Custom message: Service Unavailable 1698 + */ 1699 + 503: unknown; 1700 + }; 1701 + 1702 + export type TestErrorCodeResponses = { 1703 + /** 1704 + * Custom message: Successful response 1705 + */ 1706 + 200: unknown; 1707 + }; 1708 + 1455 1709 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1456 1710 body?: never; 1457 1711 path?: never; ··· 1463 1717 }; 1464 1718 }; 1465 1719 1466 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1720 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1721 + /** 1722 + * Successful response 1723 + */ 1724 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1725 + }; 1726 + 1727 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1467 1728 1468 1729 export type PutWithFormUrlEncodedData = { 1469 1730 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/types.gen.ts
··· 947 947 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 948 948 }; 949 949 950 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 950 + export type ImportResponses = { 951 + /** 952 + * Success 953 + */ 954 + 200: Model_From_Zendesk; 955 + /** 956 + * Default success response 957 + */ 958 + default: ModelWithReadOnlyAndWriteOnly; 959 + }; 960 + 961 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 951 962 952 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 963 + export type ApiVversionOdataControllerCountResponses = { 964 + /** 965 + * Success 966 + */ 967 + 200: Model_From_Zendesk; 968 + }; 969 + 970 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 953 971 954 972 export type GetApiVbyApiVersionSimpleOperationData = { 955 973 body?: never; ··· 962 980 query?: never; 963 981 }; 964 982 965 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 983 + export type GetApiVbyApiVersionSimpleOperationErrors = { 984 + /** 985 + * Default error response 986 + */ 987 + default: ModelWithBoolean; 988 + }; 966 989 967 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 990 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 991 + 992 + export type GetApiVbyApiVersionSimpleOperationResponses = { 993 + /** 994 + * Response is a simple number 995 + */ 996 + 200: number; 997 + }; 998 + 999 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 968 1000 969 1001 export type DeleteFooData3 = { 970 1002 body?: never; ··· 1136 1168 }; 1137 1169 }; 1138 1170 1139 - export type PostCallWithOptionalParamResponse = number | void; 1171 + export type PostCallWithOptionalParamResponses = { 1172 + /** 1173 + * Response is a simple number 1174 + */ 1175 + 200: number; 1176 + /** 1177 + * Success 1178 + */ 1179 + 204: void; 1180 + }; 1181 + 1182 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1140 1183 1141 1184 export type PostApiVbyApiVersionRequestBodyData = { 1142 1185 /** ··· 1259 1302 }; 1260 1303 }; 1261 1304 1262 - export type CallWithNoContentResponseResponse = void; 1305 + export type CallWithNoContentResponseResponses = { 1306 + /** 1307 + * Success 1308 + */ 1309 + 204: void; 1310 + }; 1263 1311 1264 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1312 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1265 1313 1266 - export type DummyAResponse = _400; 1314 + export type CallWithResponseAndNoContentResponseResponses = { 1315 + /** 1316 + * Response is a simple number 1317 + */ 1318 + 200: number; 1319 + /** 1320 + * Success 1321 + */ 1322 + 204: void; 1323 + }; 1267 1324 1268 - export type DummyBResponse = void; 1325 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1269 1326 1270 - export type CallWithResponseResponse = _import; 1327 + export type DummyAResponses = { 1328 + 200: _400; 1329 + }; 1271 1330 1272 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1331 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1273 1332 1274 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1333 + export type DummyBResponses = { 1334 + /** 1335 + * Success 1336 + */ 1337 + 204: void; 1338 + }; 1339 + 1340 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1275 1341 1276 - export type CallWithResponsesError = ModelWithStringError; 1342 + export type CallWithResponseResponses = { 1343 + default: _import; 1344 + }; 1345 + 1346 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1347 + 1348 + export type CallWithDuplicateResponsesErrors = { 1349 + /** 1350 + * Message for 500 error 1351 + */ 1352 + 500: ModelWithStringError; 1353 + /** 1354 + * Message for 501 error 1355 + */ 1356 + 501: ModelWithStringError; 1357 + /** 1358 + * Message for 502 error 1359 + */ 1360 + 502: ModelWithStringError; 1361 + /** 1362 + * Message for 4XX errors 1363 + */ 1364 + '4XX': DictionaryWithArray; 1365 + /** 1366 + * Default error response 1367 + */ 1368 + default: ModelWithBoolean; 1369 + }; 1370 + 1371 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1372 + 1373 + export type CallWithDuplicateResponsesResponses = { 1374 + /** 1375 + * Message for 200 response 1376 + */ 1377 + 200: ModelWithBoolean & ModelWithInteger; 1378 + /** 1379 + * Message for 201 response 1380 + */ 1381 + 201: ModelWithString; 1382 + /** 1383 + * Message for 202 response 1384 + */ 1385 + 202: ModelWithString; 1386 + }; 1387 + 1388 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1389 + 1390 + export type CallWithResponsesErrors = { 1391 + /** 1392 + * Message for 500 error 1393 + */ 1394 + 500: ModelWithStringError; 1395 + /** 1396 + * Message for 501 error 1397 + */ 1398 + 501: ModelWithStringError; 1399 + /** 1400 + * Message for 502 error 1401 + */ 1402 + 502: ModelWithStringError; 1403 + /** 1404 + * Message for default response 1405 + */ 1406 + default: ModelWithStringError; 1407 + }; 1408 + 1409 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1410 + 1411 + export type CallWithResponsesResponses = { 1412 + /** 1413 + * Message for 200 response 1414 + */ 1415 + 200: { 1416 + readonly '@namespace.string'?: string; 1417 + readonly '@namespace.integer'?: number; 1418 + readonly value?: Array<ModelWithString>; 1419 + }; 1420 + /** 1421 + * Message for 201 response 1422 + */ 1423 + 201: ModelThatExtends; 1424 + /** 1425 + * Message for 202 response 1426 + */ 1427 + 202: ModelThatExtendsExtends; 1428 + }; 1277 1429 1278 - export type CallWithResponsesResponse = { 1279 - readonly '@namespace.string'?: string; 1280 - readonly '@namespace.integer'?: number; 1281 - readonly value?: Array<ModelWithString>; 1282 - } | ModelThatExtends | ModelThatExtendsExtends; 1430 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1283 1431 1284 1432 export type CollectionFormatData = { 1285 1433 body?: never; ··· 1348 1496 }; 1349 1497 }; 1350 1498 1351 - export type TypesResponse = number | string | boolean | {}; 1499 + export type TypesResponses = { 1500 + /** 1501 + * Response is a simple number 1502 + */ 1503 + 200: number; 1504 + /** 1505 + * Response is a simple string 1506 + */ 1507 + 201: string; 1508 + /** 1509 + * Response is a simple boolean 1510 + */ 1511 + 202: boolean; 1512 + /** 1513 + * Response is a simple object 1514 + */ 1515 + 203: {}; 1516 + }; 1517 + 1518 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1352 1519 1353 1520 export type UploadFileData = { 1354 1521 body: Blob | File; ··· 1361 1528 query?: never; 1362 1529 }; 1363 1530 1364 - export type UploadFileResponse = boolean; 1531 + export type UploadFileResponses = { 1532 + 200: boolean; 1533 + }; 1534 + 1535 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1365 1536 1366 1537 export type FileResponseData = { 1367 1538 body?: never; ··· 1375 1546 query?: never; 1376 1547 }; 1377 1548 1378 - export type FileResponseResponse = Blob | File; 1549 + export type FileResponseResponses = { 1550 + /** 1551 + * Success 1552 + */ 1553 + 200: Blob | File; 1554 + }; 1555 + 1556 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1379 1557 1380 1558 export type ComplexTypesData = { 1381 1559 body?: never; ··· 1398 1576 }; 1399 1577 }; 1400 1578 1401 - export type ComplexTypesResponse = Array<ModelWithString>; 1579 + export type ComplexTypesErrors = { 1580 + /** 1581 + * 400 `server` error 1582 + */ 1583 + 400: unknown; 1584 + /** 1585 + * 500 server error 1586 + */ 1587 + 500: unknown; 1588 + }; 1589 + 1590 + export type ComplexTypesResponses = { 1591 + /** 1592 + * Successful response 1593 + */ 1594 + 200: Array<ModelWithString>; 1595 + }; 1596 + 1597 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1402 1598 1403 - export type MultipartResponseResponse = { 1404 - file?: Blob | File; 1405 - metadata?: { 1406 - foo?: string; 1407 - bar?: string; 1599 + export type MultipartResponseResponses = { 1600 + /** 1601 + * OK 1602 + */ 1603 + 200: { 1604 + file?: Blob | File; 1605 + metadata?: { 1606 + foo?: string; 1607 + bar?: string; 1608 + }; 1408 1609 }; 1409 1610 }; 1611 + 1612 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1410 1613 1411 1614 export type MultipartRequestData = { 1412 1615 body?: { ··· 1439 1642 query?: never; 1440 1643 }; 1441 1644 1442 - export type ComplexParamsResponse = ModelWithString; 1645 + export type ComplexParamsResponses = { 1646 + /** 1647 + * Success 1648 + */ 1649 + 200: ModelWithString; 1650 + }; 1651 + 1652 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1653 + 1654 + export type CallWithResultFromHeaderErrors = { 1655 + /** 1656 + * 400 server error 1657 + */ 1658 + 400: unknown; 1659 + /** 1660 + * 500 server error 1661 + */ 1662 + 500: unknown; 1663 + }; 1664 + 1665 + export type CallWithResultFromHeaderResponses = { 1666 + /** 1667 + * Successful response 1668 + */ 1669 + 200: unknown; 1670 + }; 1443 1671 1444 1672 export type TestErrorCodeData = { 1445 1673 body?: never; ··· 1452 1680 }; 1453 1681 }; 1454 1682 1683 + export type TestErrorCodeErrors = { 1684 + /** 1685 + * Custom message: Internal Server Error 1686 + */ 1687 + 500: unknown; 1688 + /** 1689 + * Custom message: Not Implemented 1690 + */ 1691 + 501: unknown; 1692 + /** 1693 + * Custom message: Bad Gateway 1694 + */ 1695 + 502: unknown; 1696 + /** 1697 + * Custom message: Service Unavailable 1698 + */ 1699 + 503: unknown; 1700 + }; 1701 + 1702 + export type TestErrorCodeResponses = { 1703 + /** 1704 + * Custom message: Successful response 1705 + */ 1706 + 200: unknown; 1707 + }; 1708 + 1455 1709 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1456 1710 body?: never; 1457 1711 path?: never; ··· 1463 1717 }; 1464 1718 }; 1465 1719 1466 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1720 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1721 + /** 1722 + * Successful response 1723 + */ 1724 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1725 + }; 1726 + 1727 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1467 1728 1468 1729 export type PutWithFormUrlEncodedData = { 1469 1730 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/types.gen.ts
··· 947 947 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 948 948 }; 949 949 950 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 950 + export type ImportResponses = { 951 + /** 952 + * Success 953 + */ 954 + 200: Model_From_Zendesk; 955 + /** 956 + * Default success response 957 + */ 958 + default: ModelWithReadOnlyAndWriteOnly; 959 + }; 960 + 961 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 951 962 952 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 963 + export type ApiVversionOdataControllerCountResponses = { 964 + /** 965 + * Success 966 + */ 967 + 200: Model_From_Zendesk; 968 + }; 969 + 970 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 953 971 954 972 export type GetApiVbyApiVersionSimpleOperationData = { 955 973 body?: never; ··· 962 980 query?: never; 963 981 }; 964 982 965 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 983 + export type GetApiVbyApiVersionSimpleOperationErrors = { 984 + /** 985 + * Default error response 986 + */ 987 + default: ModelWithBoolean; 988 + }; 966 989 967 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 990 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 991 + 992 + export type GetApiVbyApiVersionSimpleOperationResponses = { 993 + /** 994 + * Response is a simple number 995 + */ 996 + 200: number; 997 + }; 998 + 999 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 968 1000 969 1001 export type DeleteFooData3 = { 970 1002 body?: never; ··· 1136 1168 }; 1137 1169 }; 1138 1170 1139 - export type PostCallWithOptionalParamResponse = number | void; 1171 + export type PostCallWithOptionalParamResponses = { 1172 + /** 1173 + * Response is a simple number 1174 + */ 1175 + 200: number; 1176 + /** 1177 + * Success 1178 + */ 1179 + 204: void; 1180 + }; 1181 + 1182 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1140 1183 1141 1184 export type PostApiVbyApiVersionRequestBodyData = { 1142 1185 /** ··· 1259 1302 }; 1260 1303 }; 1261 1304 1262 - export type CallWithNoContentResponseResponse = void; 1305 + export type CallWithNoContentResponseResponses = { 1306 + /** 1307 + * Success 1308 + */ 1309 + 204: void; 1310 + }; 1263 1311 1264 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1312 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1265 1313 1266 - export type DummyAResponse = _400; 1314 + export type CallWithResponseAndNoContentResponseResponses = { 1315 + /** 1316 + * Response is a simple number 1317 + */ 1318 + 200: number; 1319 + /** 1320 + * Success 1321 + */ 1322 + 204: void; 1323 + }; 1267 1324 1268 - export type DummyBResponse = void; 1325 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1269 1326 1270 - export type CallWithResponseResponse = _import; 1327 + export type DummyAResponses = { 1328 + 200: _400; 1329 + }; 1271 1330 1272 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1331 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1273 1332 1274 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1333 + export type DummyBResponses = { 1334 + /** 1335 + * Success 1336 + */ 1337 + 204: void; 1338 + }; 1339 + 1340 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1275 1341 1276 - export type CallWithResponsesError = ModelWithStringError; 1342 + export type CallWithResponseResponses = { 1343 + default: _import; 1344 + }; 1345 + 1346 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1347 + 1348 + export type CallWithDuplicateResponsesErrors = { 1349 + /** 1350 + * Message for 500 error 1351 + */ 1352 + 500: ModelWithStringError; 1353 + /** 1354 + * Message for 501 error 1355 + */ 1356 + 501: ModelWithStringError; 1357 + /** 1358 + * Message for 502 error 1359 + */ 1360 + 502: ModelWithStringError; 1361 + /** 1362 + * Message for 4XX errors 1363 + */ 1364 + '4XX': DictionaryWithArray; 1365 + /** 1366 + * Default error response 1367 + */ 1368 + default: ModelWithBoolean; 1369 + }; 1370 + 1371 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1372 + 1373 + export type CallWithDuplicateResponsesResponses = { 1374 + /** 1375 + * Message for 200 response 1376 + */ 1377 + 200: ModelWithBoolean & ModelWithInteger; 1378 + /** 1379 + * Message for 201 response 1380 + */ 1381 + 201: ModelWithString; 1382 + /** 1383 + * Message for 202 response 1384 + */ 1385 + 202: ModelWithString; 1386 + }; 1387 + 1388 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1389 + 1390 + export type CallWithResponsesErrors = { 1391 + /** 1392 + * Message for 500 error 1393 + */ 1394 + 500: ModelWithStringError; 1395 + /** 1396 + * Message for 501 error 1397 + */ 1398 + 501: ModelWithStringError; 1399 + /** 1400 + * Message for 502 error 1401 + */ 1402 + 502: ModelWithStringError; 1403 + /** 1404 + * Message for default response 1405 + */ 1406 + default: ModelWithStringError; 1407 + }; 1408 + 1409 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1410 + 1411 + export type CallWithResponsesResponses = { 1412 + /** 1413 + * Message for 200 response 1414 + */ 1415 + 200: { 1416 + readonly '@namespace.string'?: string; 1417 + readonly '@namespace.integer'?: number; 1418 + readonly value?: Array<ModelWithString>; 1419 + }; 1420 + /** 1421 + * Message for 201 response 1422 + */ 1423 + 201: ModelThatExtends; 1424 + /** 1425 + * Message for 202 response 1426 + */ 1427 + 202: ModelThatExtendsExtends; 1428 + }; 1277 1429 1278 - export type CallWithResponsesResponse = { 1279 - readonly '@namespace.string'?: string; 1280 - readonly '@namespace.integer'?: number; 1281 - readonly value?: Array<ModelWithString>; 1282 - } | ModelThatExtends | ModelThatExtendsExtends; 1430 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1283 1431 1284 1432 export type CollectionFormatData = { 1285 1433 body?: never; ··· 1348 1496 }; 1349 1497 }; 1350 1498 1351 - export type TypesResponse = number | string | boolean | {}; 1499 + export type TypesResponses = { 1500 + /** 1501 + * Response is a simple number 1502 + */ 1503 + 200: number; 1504 + /** 1505 + * Response is a simple string 1506 + */ 1507 + 201: string; 1508 + /** 1509 + * Response is a simple boolean 1510 + */ 1511 + 202: boolean; 1512 + /** 1513 + * Response is a simple object 1514 + */ 1515 + 203: {}; 1516 + }; 1517 + 1518 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1352 1519 1353 1520 export type UploadFileData = { 1354 1521 body: Blob | File; ··· 1361 1528 query?: never; 1362 1529 }; 1363 1530 1364 - export type UploadFileResponse = boolean; 1531 + export type UploadFileResponses = { 1532 + 200: boolean; 1533 + }; 1534 + 1535 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1365 1536 1366 1537 export type FileResponseData = { 1367 1538 body?: never; ··· 1375 1546 query?: never; 1376 1547 }; 1377 1548 1378 - export type FileResponseResponse = Blob | File; 1549 + export type FileResponseResponses = { 1550 + /** 1551 + * Success 1552 + */ 1553 + 200: Blob | File; 1554 + }; 1555 + 1556 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1379 1557 1380 1558 export type ComplexTypesData = { 1381 1559 body?: never; ··· 1398 1576 }; 1399 1577 }; 1400 1578 1401 - export type ComplexTypesResponse = Array<ModelWithString>; 1579 + export type ComplexTypesErrors = { 1580 + /** 1581 + * 400 `server` error 1582 + */ 1583 + 400: unknown; 1584 + /** 1585 + * 500 server error 1586 + */ 1587 + 500: unknown; 1588 + }; 1589 + 1590 + export type ComplexTypesResponses = { 1591 + /** 1592 + * Successful response 1593 + */ 1594 + 200: Array<ModelWithString>; 1595 + }; 1596 + 1597 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1402 1598 1403 - export type MultipartResponseResponse = { 1404 - file?: Blob | File; 1405 - metadata?: { 1406 - foo?: string; 1407 - bar?: string; 1599 + export type MultipartResponseResponses = { 1600 + /** 1601 + * OK 1602 + */ 1603 + 200: { 1604 + file?: Blob | File; 1605 + metadata?: { 1606 + foo?: string; 1607 + bar?: string; 1608 + }; 1408 1609 }; 1409 1610 }; 1611 + 1612 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1410 1613 1411 1614 export type MultipartRequestData = { 1412 1615 body?: { ··· 1439 1642 query?: never; 1440 1643 }; 1441 1644 1442 - export type ComplexParamsResponse = ModelWithString; 1645 + export type ComplexParamsResponses = { 1646 + /** 1647 + * Success 1648 + */ 1649 + 200: ModelWithString; 1650 + }; 1651 + 1652 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1653 + 1654 + export type CallWithResultFromHeaderErrors = { 1655 + /** 1656 + * 400 server error 1657 + */ 1658 + 400: unknown; 1659 + /** 1660 + * 500 server error 1661 + */ 1662 + 500: unknown; 1663 + }; 1664 + 1665 + export type CallWithResultFromHeaderResponses = { 1666 + /** 1667 + * Successful response 1668 + */ 1669 + 200: unknown; 1670 + }; 1443 1671 1444 1672 export type TestErrorCodeData = { 1445 1673 body?: never; ··· 1452 1680 }; 1453 1681 }; 1454 1682 1683 + export type TestErrorCodeErrors = { 1684 + /** 1685 + * Custom message: Internal Server Error 1686 + */ 1687 + 500: unknown; 1688 + /** 1689 + * Custom message: Not Implemented 1690 + */ 1691 + 501: unknown; 1692 + /** 1693 + * Custom message: Bad Gateway 1694 + */ 1695 + 502: unknown; 1696 + /** 1697 + * Custom message: Service Unavailable 1698 + */ 1699 + 503: unknown; 1700 + }; 1701 + 1702 + export type TestErrorCodeResponses = { 1703 + /** 1704 + * Custom message: Successful response 1705 + */ 1706 + 200: unknown; 1707 + }; 1708 + 1455 1709 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1456 1710 body?: never; 1457 1711 path?: never; ··· 1463 1717 }; 1464 1718 }; 1465 1719 1466 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1720 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1721 + /** 1722 + * Successful response 1723 + */ 1724 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1725 + }; 1726 + 1727 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1467 1728 1468 1729 export type PutWithFormUrlEncodedData = { 1469 1730 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/types.gen.ts
··· 947 947 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 948 948 }; 949 949 950 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 950 + export type ImportResponses = { 951 + /** 952 + * Success 953 + */ 954 + 200: Model_From_Zendesk; 955 + /** 956 + * Default success response 957 + */ 958 + default: ModelWithReadOnlyAndWriteOnly; 959 + }; 960 + 961 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 951 962 952 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 963 + export type ApiVversionOdataControllerCountResponses = { 964 + /** 965 + * Success 966 + */ 967 + 200: Model_From_Zendesk; 968 + }; 969 + 970 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 953 971 954 972 export type GetApiVbyApiVersionSimpleOperationData = { 955 973 body?: never; ··· 962 980 query?: never; 963 981 }; 964 982 965 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 983 + export type GetApiVbyApiVersionSimpleOperationErrors = { 984 + /** 985 + * Default error response 986 + */ 987 + default: ModelWithBoolean; 988 + }; 966 989 967 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 990 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 991 + 992 + export type GetApiVbyApiVersionSimpleOperationResponses = { 993 + /** 994 + * Response is a simple number 995 + */ 996 + 200: number; 997 + }; 998 + 999 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 968 1000 969 1001 export type DeleteFooData3 = { 970 1002 body?: never; ··· 1136 1168 }; 1137 1169 }; 1138 1170 1139 - export type PostCallWithOptionalParamResponse = number | void; 1171 + export type PostCallWithOptionalParamResponses = { 1172 + /** 1173 + * Response is a simple number 1174 + */ 1175 + 200: number; 1176 + /** 1177 + * Success 1178 + */ 1179 + 204: void; 1180 + }; 1181 + 1182 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1140 1183 1141 1184 export type PostApiVbyApiVersionRequestBodyData = { 1142 1185 /** ··· 1259 1302 }; 1260 1303 }; 1261 1304 1262 - export type CallWithNoContentResponseResponse = void; 1305 + export type CallWithNoContentResponseResponses = { 1306 + /** 1307 + * Success 1308 + */ 1309 + 204: void; 1310 + }; 1263 1311 1264 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1312 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1265 1313 1266 - export type DummyAResponse = _400; 1314 + export type CallWithResponseAndNoContentResponseResponses = { 1315 + /** 1316 + * Response is a simple number 1317 + */ 1318 + 200: number; 1319 + /** 1320 + * Success 1321 + */ 1322 + 204: void; 1323 + }; 1267 1324 1268 - export type DummyBResponse = void; 1325 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1269 1326 1270 - export type CallWithResponseResponse = _import; 1327 + export type DummyAResponses = { 1328 + 200: _400; 1329 + }; 1271 1330 1272 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1331 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1273 1332 1274 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1333 + export type DummyBResponses = { 1334 + /** 1335 + * Success 1336 + */ 1337 + 204: void; 1338 + }; 1339 + 1340 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1275 1341 1276 - export type CallWithResponsesError = ModelWithStringError; 1342 + export type CallWithResponseResponses = { 1343 + default: _import; 1344 + }; 1345 + 1346 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1347 + 1348 + export type CallWithDuplicateResponsesErrors = { 1349 + /** 1350 + * Message for 500 error 1351 + */ 1352 + 500: ModelWithStringError; 1353 + /** 1354 + * Message for 501 error 1355 + */ 1356 + 501: ModelWithStringError; 1357 + /** 1358 + * Message for 502 error 1359 + */ 1360 + 502: ModelWithStringError; 1361 + /** 1362 + * Message for 4XX errors 1363 + */ 1364 + '4XX': DictionaryWithArray; 1365 + /** 1366 + * Default error response 1367 + */ 1368 + default: ModelWithBoolean; 1369 + }; 1370 + 1371 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1372 + 1373 + export type CallWithDuplicateResponsesResponses = { 1374 + /** 1375 + * Message for 200 response 1376 + */ 1377 + 200: ModelWithBoolean & ModelWithInteger; 1378 + /** 1379 + * Message for 201 response 1380 + */ 1381 + 201: ModelWithString; 1382 + /** 1383 + * Message for 202 response 1384 + */ 1385 + 202: ModelWithString; 1386 + }; 1387 + 1388 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1389 + 1390 + export type CallWithResponsesErrors = { 1391 + /** 1392 + * Message for 500 error 1393 + */ 1394 + 500: ModelWithStringError; 1395 + /** 1396 + * Message for 501 error 1397 + */ 1398 + 501: ModelWithStringError; 1399 + /** 1400 + * Message for 502 error 1401 + */ 1402 + 502: ModelWithStringError; 1403 + /** 1404 + * Message for default response 1405 + */ 1406 + default: ModelWithStringError; 1407 + }; 1408 + 1409 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1410 + 1411 + export type CallWithResponsesResponses = { 1412 + /** 1413 + * Message for 200 response 1414 + */ 1415 + 200: { 1416 + readonly '@namespace.string'?: string; 1417 + readonly '@namespace.integer'?: number; 1418 + readonly value?: Array<ModelWithString>; 1419 + }; 1420 + /** 1421 + * Message for 201 response 1422 + */ 1423 + 201: ModelThatExtends; 1424 + /** 1425 + * Message for 202 response 1426 + */ 1427 + 202: ModelThatExtendsExtends; 1428 + }; 1277 1429 1278 - export type CallWithResponsesResponse = { 1279 - readonly '@namespace.string'?: string; 1280 - readonly '@namespace.integer'?: number; 1281 - readonly value?: Array<ModelWithString>; 1282 - } | ModelThatExtends | ModelThatExtendsExtends; 1430 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1283 1431 1284 1432 export type CollectionFormatData = { 1285 1433 body?: never; ··· 1348 1496 }; 1349 1497 }; 1350 1498 1351 - export type TypesResponse = number | string | boolean | {}; 1499 + export type TypesResponses = { 1500 + /** 1501 + * Response is a simple number 1502 + */ 1503 + 200: number; 1504 + /** 1505 + * Response is a simple string 1506 + */ 1507 + 201: string; 1508 + /** 1509 + * Response is a simple boolean 1510 + */ 1511 + 202: boolean; 1512 + /** 1513 + * Response is a simple object 1514 + */ 1515 + 203: {}; 1516 + }; 1517 + 1518 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1352 1519 1353 1520 export type UploadFileData = { 1354 1521 body: Blob | File; ··· 1361 1528 query?: never; 1362 1529 }; 1363 1530 1364 - export type UploadFileResponse = boolean; 1531 + export type UploadFileResponses = { 1532 + 200: boolean; 1533 + }; 1534 + 1535 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1365 1536 1366 1537 export type FileResponseData = { 1367 1538 body?: never; ··· 1375 1546 query?: never; 1376 1547 }; 1377 1548 1378 - export type FileResponseResponse = Blob | File; 1549 + export type FileResponseResponses = { 1550 + /** 1551 + * Success 1552 + */ 1553 + 200: Blob | File; 1554 + }; 1555 + 1556 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1379 1557 1380 1558 export type ComplexTypesData = { 1381 1559 body?: never; ··· 1398 1576 }; 1399 1577 }; 1400 1578 1401 - export type ComplexTypesResponse = Array<ModelWithString>; 1579 + export type ComplexTypesErrors = { 1580 + /** 1581 + * 400 `server` error 1582 + */ 1583 + 400: unknown; 1584 + /** 1585 + * 500 server error 1586 + */ 1587 + 500: unknown; 1588 + }; 1589 + 1590 + export type ComplexTypesResponses = { 1591 + /** 1592 + * Successful response 1593 + */ 1594 + 200: Array<ModelWithString>; 1595 + }; 1596 + 1597 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1402 1598 1403 - export type MultipartResponseResponse = { 1404 - file?: Blob | File; 1405 - metadata?: { 1406 - foo?: string; 1407 - bar?: string; 1599 + export type MultipartResponseResponses = { 1600 + /** 1601 + * OK 1602 + */ 1603 + 200: { 1604 + file?: Blob | File; 1605 + metadata?: { 1606 + foo?: string; 1607 + bar?: string; 1608 + }; 1408 1609 }; 1409 1610 }; 1611 + 1612 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1410 1613 1411 1614 export type MultipartRequestData = { 1412 1615 body?: { ··· 1439 1642 query?: never; 1440 1643 }; 1441 1644 1442 - export type ComplexParamsResponse = ModelWithString; 1645 + export type ComplexParamsResponses = { 1646 + /** 1647 + * Success 1648 + */ 1649 + 200: ModelWithString; 1650 + }; 1651 + 1652 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1653 + 1654 + export type CallWithResultFromHeaderErrors = { 1655 + /** 1656 + * 400 server error 1657 + */ 1658 + 400: unknown; 1659 + /** 1660 + * 500 server error 1661 + */ 1662 + 500: unknown; 1663 + }; 1664 + 1665 + export type CallWithResultFromHeaderResponses = { 1666 + /** 1667 + * Successful response 1668 + */ 1669 + 200: unknown; 1670 + }; 1443 1671 1444 1672 export type TestErrorCodeData = { 1445 1673 body?: never; ··· 1452 1680 }; 1453 1681 }; 1454 1682 1683 + export type TestErrorCodeErrors = { 1684 + /** 1685 + * Custom message: Internal Server Error 1686 + */ 1687 + 500: unknown; 1688 + /** 1689 + * Custom message: Not Implemented 1690 + */ 1691 + 501: unknown; 1692 + /** 1693 + * Custom message: Bad Gateway 1694 + */ 1695 + 502: unknown; 1696 + /** 1697 + * Custom message: Service Unavailable 1698 + */ 1699 + 503: unknown; 1700 + }; 1701 + 1702 + export type TestErrorCodeResponses = { 1703 + /** 1704 + * Custom message: Successful response 1705 + */ 1706 + 200: unknown; 1707 + }; 1708 + 1455 1709 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1456 1710 body?: never; 1457 1711 path?: never; ··· 1463 1717 }; 1464 1718 }; 1465 1719 1466 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1720 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1721 + /** 1722 + * Successful response 1723 + */ 1724 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1725 + }; 1726 + 1727 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1467 1728 1468 1729 export type PutWithFormUrlEncodedData = { 1469 1730 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/types.gen.ts
··· 947 947 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 948 948 }; 949 949 950 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 950 + export type ImportResponses = { 951 + /** 952 + * Success 953 + */ 954 + 200: Model_From_Zendesk; 955 + /** 956 + * Default success response 957 + */ 958 + default: ModelWithReadOnlyAndWriteOnly; 959 + }; 960 + 961 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 951 962 952 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 963 + export type ApiVversionOdataControllerCountResponses = { 964 + /** 965 + * Success 966 + */ 967 + 200: Model_From_Zendesk; 968 + }; 969 + 970 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 953 971 954 972 export type GetApiVbyApiVersionSimpleOperationData = { 955 973 body?: never; ··· 962 980 query?: never; 963 981 }; 964 982 965 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 983 + export type GetApiVbyApiVersionSimpleOperationErrors = { 984 + /** 985 + * Default error response 986 + */ 987 + default: ModelWithBoolean; 988 + }; 966 989 967 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 990 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 991 + 992 + export type GetApiVbyApiVersionSimpleOperationResponses = { 993 + /** 994 + * Response is a simple number 995 + */ 996 + 200: number; 997 + }; 998 + 999 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 968 1000 969 1001 export type DeleteFooData3 = { 970 1002 body?: never; ··· 1136 1168 }; 1137 1169 }; 1138 1170 1139 - export type PostCallWithOptionalParamResponse = number | void; 1171 + export type PostCallWithOptionalParamResponses = { 1172 + /** 1173 + * Response is a simple number 1174 + */ 1175 + 200: number; 1176 + /** 1177 + * Success 1178 + */ 1179 + 204: void; 1180 + }; 1181 + 1182 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1140 1183 1141 1184 export type PostApiVbyApiVersionRequestBodyData = { 1142 1185 /** ··· 1259 1302 }; 1260 1303 }; 1261 1304 1262 - export type CallWithNoContentResponseResponse = void; 1305 + export type CallWithNoContentResponseResponses = { 1306 + /** 1307 + * Success 1308 + */ 1309 + 204: void; 1310 + }; 1263 1311 1264 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1312 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1265 1313 1266 - export type DummyAResponse = _400; 1314 + export type CallWithResponseAndNoContentResponseResponses = { 1315 + /** 1316 + * Response is a simple number 1317 + */ 1318 + 200: number; 1319 + /** 1320 + * Success 1321 + */ 1322 + 204: void; 1323 + }; 1267 1324 1268 - export type DummyBResponse = void; 1325 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1269 1326 1270 - export type CallWithResponseResponse = _import; 1327 + export type DummyAResponses = { 1328 + 200: _400; 1329 + }; 1271 1330 1272 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1331 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1273 1332 1274 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1333 + export type DummyBResponses = { 1334 + /** 1335 + * Success 1336 + */ 1337 + 204: void; 1338 + }; 1339 + 1340 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1275 1341 1276 - export type CallWithResponsesError = ModelWithStringError; 1342 + export type CallWithResponseResponses = { 1343 + default: _import; 1344 + }; 1345 + 1346 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1347 + 1348 + export type CallWithDuplicateResponsesErrors = { 1349 + /** 1350 + * Message for 500 error 1351 + */ 1352 + 500: ModelWithStringError; 1353 + /** 1354 + * Message for 501 error 1355 + */ 1356 + 501: ModelWithStringError; 1357 + /** 1358 + * Message for 502 error 1359 + */ 1360 + 502: ModelWithStringError; 1361 + /** 1362 + * Message for 4XX errors 1363 + */ 1364 + '4XX': DictionaryWithArray; 1365 + /** 1366 + * Default error response 1367 + */ 1368 + default: ModelWithBoolean; 1369 + }; 1370 + 1371 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1372 + 1373 + export type CallWithDuplicateResponsesResponses = { 1374 + /** 1375 + * Message for 200 response 1376 + */ 1377 + 200: ModelWithBoolean & ModelWithInteger; 1378 + /** 1379 + * Message for 201 response 1380 + */ 1381 + 201: ModelWithString; 1382 + /** 1383 + * Message for 202 response 1384 + */ 1385 + 202: ModelWithString; 1386 + }; 1387 + 1388 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1389 + 1390 + export type CallWithResponsesErrors = { 1391 + /** 1392 + * Message for 500 error 1393 + */ 1394 + 500: ModelWithStringError; 1395 + /** 1396 + * Message for 501 error 1397 + */ 1398 + 501: ModelWithStringError; 1399 + /** 1400 + * Message for 502 error 1401 + */ 1402 + 502: ModelWithStringError; 1403 + /** 1404 + * Message for default response 1405 + */ 1406 + default: ModelWithStringError; 1407 + }; 1408 + 1409 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1410 + 1411 + export type CallWithResponsesResponses = { 1412 + /** 1413 + * Message for 200 response 1414 + */ 1415 + 200: { 1416 + readonly '@namespace.string'?: string; 1417 + readonly '@namespace.integer'?: number; 1418 + readonly value?: Array<ModelWithString>; 1419 + }; 1420 + /** 1421 + * Message for 201 response 1422 + */ 1423 + 201: ModelThatExtends; 1424 + /** 1425 + * Message for 202 response 1426 + */ 1427 + 202: ModelThatExtendsExtends; 1428 + }; 1277 1429 1278 - export type CallWithResponsesResponse = { 1279 - readonly '@namespace.string'?: string; 1280 - readonly '@namespace.integer'?: number; 1281 - readonly value?: Array<ModelWithString>; 1282 - } | ModelThatExtends | ModelThatExtendsExtends; 1430 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1283 1431 1284 1432 export type CollectionFormatData = { 1285 1433 body?: never; ··· 1348 1496 }; 1349 1497 }; 1350 1498 1351 - export type TypesResponse = number | string | boolean | {}; 1499 + export type TypesResponses = { 1500 + /** 1501 + * Response is a simple number 1502 + */ 1503 + 200: number; 1504 + /** 1505 + * Response is a simple string 1506 + */ 1507 + 201: string; 1508 + /** 1509 + * Response is a simple boolean 1510 + */ 1511 + 202: boolean; 1512 + /** 1513 + * Response is a simple object 1514 + */ 1515 + 203: {}; 1516 + }; 1517 + 1518 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1352 1519 1353 1520 export type UploadFileData = { 1354 1521 body: Blob | File; ··· 1361 1528 query?: never; 1362 1529 }; 1363 1530 1364 - export type UploadFileResponse = boolean; 1531 + export type UploadFileResponses = { 1532 + 200: boolean; 1533 + }; 1534 + 1535 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1365 1536 1366 1537 export type FileResponseData = { 1367 1538 body?: never; ··· 1375 1546 query?: never; 1376 1547 }; 1377 1548 1378 - export type FileResponseResponse = Blob | File; 1549 + export type FileResponseResponses = { 1550 + /** 1551 + * Success 1552 + */ 1553 + 200: Blob | File; 1554 + }; 1555 + 1556 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1379 1557 1380 1558 export type ComplexTypesData = { 1381 1559 body?: never; ··· 1398 1576 }; 1399 1577 }; 1400 1578 1401 - export type ComplexTypesResponse = Array<ModelWithString>; 1579 + export type ComplexTypesErrors = { 1580 + /** 1581 + * 400 `server` error 1582 + */ 1583 + 400: unknown; 1584 + /** 1585 + * 500 server error 1586 + */ 1587 + 500: unknown; 1588 + }; 1589 + 1590 + export type ComplexTypesResponses = { 1591 + /** 1592 + * Successful response 1593 + */ 1594 + 200: Array<ModelWithString>; 1595 + }; 1596 + 1597 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1402 1598 1403 - export type MultipartResponseResponse = { 1404 - file?: Blob | File; 1405 - metadata?: { 1406 - foo?: string; 1407 - bar?: string; 1599 + export type MultipartResponseResponses = { 1600 + /** 1601 + * OK 1602 + */ 1603 + 200: { 1604 + file?: Blob | File; 1605 + metadata?: { 1606 + foo?: string; 1607 + bar?: string; 1608 + }; 1408 1609 }; 1409 1610 }; 1611 + 1612 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1410 1613 1411 1614 export type MultipartRequestData = { 1412 1615 body?: { ··· 1439 1642 query?: never; 1440 1643 }; 1441 1644 1442 - export type ComplexParamsResponse = ModelWithString; 1645 + export type ComplexParamsResponses = { 1646 + /** 1647 + * Success 1648 + */ 1649 + 200: ModelWithString; 1650 + }; 1651 + 1652 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1653 + 1654 + export type CallWithResultFromHeaderErrors = { 1655 + /** 1656 + * 400 server error 1657 + */ 1658 + 400: unknown; 1659 + /** 1660 + * 500 server error 1661 + */ 1662 + 500: unknown; 1663 + }; 1664 + 1665 + export type CallWithResultFromHeaderResponses = { 1666 + /** 1667 + * Successful response 1668 + */ 1669 + 200: unknown; 1670 + }; 1443 1671 1444 1672 export type TestErrorCodeData = { 1445 1673 body?: never; ··· 1452 1680 }; 1453 1681 }; 1454 1682 1683 + export type TestErrorCodeErrors = { 1684 + /** 1685 + * Custom message: Internal Server Error 1686 + */ 1687 + 500: unknown; 1688 + /** 1689 + * Custom message: Not Implemented 1690 + */ 1691 + 501: unknown; 1692 + /** 1693 + * Custom message: Bad Gateway 1694 + */ 1695 + 502: unknown; 1696 + /** 1697 + * Custom message: Service Unavailable 1698 + */ 1699 + 503: unknown; 1700 + }; 1701 + 1702 + export type TestErrorCodeResponses = { 1703 + /** 1704 + * Custom message: Successful response 1705 + */ 1706 + 200: unknown; 1707 + }; 1708 + 1455 1709 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1456 1710 body?: never; 1457 1711 path?: never; ··· 1463 1717 }; 1464 1718 }; 1465 1719 1466 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1720 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1721 + /** 1722 + * Successful response 1723 + */ 1724 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1725 + }; 1726 + 1727 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1467 1728 1468 1729 export type PutWithFormUrlEncodedData = { 1469 1730 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/types.gen.ts
··· 947 947 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 948 948 }; 949 949 950 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 950 + export type ImportResponses = { 951 + /** 952 + * Success 953 + */ 954 + 200: Model_From_Zendesk; 955 + /** 956 + * Default success response 957 + */ 958 + default: ModelWithReadOnlyAndWriteOnly; 959 + }; 960 + 961 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 951 962 952 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 963 + export type ApiVversionOdataControllerCountResponses = { 964 + /** 965 + * Success 966 + */ 967 + 200: Model_From_Zendesk; 968 + }; 969 + 970 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 953 971 954 972 export type GetApiVbyApiVersionSimpleOperationData = { 955 973 body?: never; ··· 962 980 query?: never; 963 981 }; 964 982 965 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 983 + export type GetApiVbyApiVersionSimpleOperationErrors = { 984 + /** 985 + * Default error response 986 + */ 987 + default: ModelWithBoolean; 988 + }; 966 989 967 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 990 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 991 + 992 + export type GetApiVbyApiVersionSimpleOperationResponses = { 993 + /** 994 + * Response is a simple number 995 + */ 996 + 200: number; 997 + }; 998 + 999 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 968 1000 969 1001 export type DeleteFooData3 = { 970 1002 body?: never; ··· 1136 1168 }; 1137 1169 }; 1138 1170 1139 - export type PostCallWithOptionalParamResponse = number | void; 1171 + export type PostCallWithOptionalParamResponses = { 1172 + /** 1173 + * Response is a simple number 1174 + */ 1175 + 200: number; 1176 + /** 1177 + * Success 1178 + */ 1179 + 204: void; 1180 + }; 1181 + 1182 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1140 1183 1141 1184 export type PostApiVbyApiVersionRequestBodyData = { 1142 1185 /** ··· 1259 1302 }; 1260 1303 }; 1261 1304 1262 - export type CallWithNoContentResponseResponse = void; 1305 + export type CallWithNoContentResponseResponses = { 1306 + /** 1307 + * Success 1308 + */ 1309 + 204: void; 1310 + }; 1263 1311 1264 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1312 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1265 1313 1266 - export type DummyAResponse = _400; 1314 + export type CallWithResponseAndNoContentResponseResponses = { 1315 + /** 1316 + * Response is a simple number 1317 + */ 1318 + 200: number; 1319 + /** 1320 + * Success 1321 + */ 1322 + 204: void; 1323 + }; 1267 1324 1268 - export type DummyBResponse = void; 1325 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1269 1326 1270 - export type CallWithResponseResponse = _import; 1327 + export type DummyAResponses = { 1328 + 200: _400; 1329 + }; 1271 1330 1272 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1331 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1273 1332 1274 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1333 + export type DummyBResponses = { 1334 + /** 1335 + * Success 1336 + */ 1337 + 204: void; 1338 + }; 1339 + 1340 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1275 1341 1276 - export type CallWithResponsesError = ModelWithStringError; 1342 + export type CallWithResponseResponses = { 1343 + default: _import; 1344 + }; 1345 + 1346 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1347 + 1348 + export type CallWithDuplicateResponsesErrors = { 1349 + /** 1350 + * Message for 500 error 1351 + */ 1352 + 500: ModelWithStringError; 1353 + /** 1354 + * Message for 501 error 1355 + */ 1356 + 501: ModelWithStringError; 1357 + /** 1358 + * Message for 502 error 1359 + */ 1360 + 502: ModelWithStringError; 1361 + /** 1362 + * Message for 4XX errors 1363 + */ 1364 + '4XX': DictionaryWithArray; 1365 + /** 1366 + * Default error response 1367 + */ 1368 + default: ModelWithBoolean; 1369 + }; 1370 + 1371 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1372 + 1373 + export type CallWithDuplicateResponsesResponses = { 1374 + /** 1375 + * Message for 200 response 1376 + */ 1377 + 200: ModelWithBoolean & ModelWithInteger; 1378 + /** 1379 + * Message for 201 response 1380 + */ 1381 + 201: ModelWithString; 1382 + /** 1383 + * Message for 202 response 1384 + */ 1385 + 202: ModelWithString; 1386 + }; 1387 + 1388 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1389 + 1390 + export type CallWithResponsesErrors = { 1391 + /** 1392 + * Message for 500 error 1393 + */ 1394 + 500: ModelWithStringError; 1395 + /** 1396 + * Message for 501 error 1397 + */ 1398 + 501: ModelWithStringError; 1399 + /** 1400 + * Message for 502 error 1401 + */ 1402 + 502: ModelWithStringError; 1403 + /** 1404 + * Message for default response 1405 + */ 1406 + default: ModelWithStringError; 1407 + }; 1408 + 1409 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1410 + 1411 + export type CallWithResponsesResponses = { 1412 + /** 1413 + * Message for 200 response 1414 + */ 1415 + 200: { 1416 + readonly '@namespace.string'?: string; 1417 + readonly '@namespace.integer'?: number; 1418 + readonly value?: Array<ModelWithString>; 1419 + }; 1420 + /** 1421 + * Message for 201 response 1422 + */ 1423 + 201: ModelThatExtends; 1424 + /** 1425 + * Message for 202 response 1426 + */ 1427 + 202: ModelThatExtendsExtends; 1428 + }; 1277 1429 1278 - export type CallWithResponsesResponse = { 1279 - readonly '@namespace.string'?: string; 1280 - readonly '@namespace.integer'?: number; 1281 - readonly value?: Array<ModelWithString>; 1282 - } | ModelThatExtends | ModelThatExtendsExtends; 1430 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1283 1431 1284 1432 export type CollectionFormatData = { 1285 1433 body?: never; ··· 1348 1496 }; 1349 1497 }; 1350 1498 1351 - export type TypesResponse = number | string | boolean | {}; 1499 + export type TypesResponses = { 1500 + /** 1501 + * Response is a simple number 1502 + */ 1503 + 200: number; 1504 + /** 1505 + * Response is a simple string 1506 + */ 1507 + 201: string; 1508 + /** 1509 + * Response is a simple boolean 1510 + */ 1511 + 202: boolean; 1512 + /** 1513 + * Response is a simple object 1514 + */ 1515 + 203: {}; 1516 + }; 1517 + 1518 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1352 1519 1353 1520 export type UploadFileData = { 1354 1521 body: Blob | File; ··· 1361 1528 query?: never; 1362 1529 }; 1363 1530 1364 - export type UploadFileResponse = boolean; 1531 + export type UploadFileResponses = { 1532 + 200: boolean; 1533 + }; 1534 + 1535 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1365 1536 1366 1537 export type FileResponseData = { 1367 1538 body?: never; ··· 1375 1546 query?: never; 1376 1547 }; 1377 1548 1378 - export type FileResponseResponse = Blob | File; 1549 + export type FileResponseResponses = { 1550 + /** 1551 + * Success 1552 + */ 1553 + 200: Blob | File; 1554 + }; 1555 + 1556 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1379 1557 1380 1558 export type ComplexTypesData = { 1381 1559 body?: never; ··· 1398 1576 }; 1399 1577 }; 1400 1578 1401 - export type ComplexTypesResponse = Array<ModelWithString>; 1579 + export type ComplexTypesErrors = { 1580 + /** 1581 + * 400 `server` error 1582 + */ 1583 + 400: unknown; 1584 + /** 1585 + * 500 server error 1586 + */ 1587 + 500: unknown; 1588 + }; 1589 + 1590 + export type ComplexTypesResponses = { 1591 + /** 1592 + * Successful response 1593 + */ 1594 + 200: Array<ModelWithString>; 1595 + }; 1596 + 1597 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1402 1598 1403 - export type MultipartResponseResponse = { 1404 - file?: Blob | File; 1405 - metadata?: { 1406 - foo?: string; 1407 - bar?: string; 1599 + export type MultipartResponseResponses = { 1600 + /** 1601 + * OK 1602 + */ 1603 + 200: { 1604 + file?: Blob | File; 1605 + metadata?: { 1606 + foo?: string; 1607 + bar?: string; 1608 + }; 1408 1609 }; 1409 1610 }; 1611 + 1612 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1410 1613 1411 1614 export type MultipartRequestData = { 1412 1615 body?: { ··· 1439 1642 query?: never; 1440 1643 }; 1441 1644 1442 - export type ComplexParamsResponse = ModelWithString; 1645 + export type ComplexParamsResponses = { 1646 + /** 1647 + * Success 1648 + */ 1649 + 200: ModelWithString; 1650 + }; 1651 + 1652 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1653 + 1654 + export type CallWithResultFromHeaderErrors = { 1655 + /** 1656 + * 400 server error 1657 + */ 1658 + 400: unknown; 1659 + /** 1660 + * 500 server error 1661 + */ 1662 + 500: unknown; 1663 + }; 1664 + 1665 + export type CallWithResultFromHeaderResponses = { 1666 + /** 1667 + * Successful response 1668 + */ 1669 + 200: unknown; 1670 + }; 1443 1671 1444 1672 export type TestErrorCodeData = { 1445 1673 body?: never; ··· 1452 1680 }; 1453 1681 }; 1454 1682 1683 + export type TestErrorCodeErrors = { 1684 + /** 1685 + * Custom message: Internal Server Error 1686 + */ 1687 + 500: unknown; 1688 + /** 1689 + * Custom message: Not Implemented 1690 + */ 1691 + 501: unknown; 1692 + /** 1693 + * Custom message: Bad Gateway 1694 + */ 1695 + 502: unknown; 1696 + /** 1697 + * Custom message: Service Unavailable 1698 + */ 1699 + 503: unknown; 1700 + }; 1701 + 1702 + export type TestErrorCodeResponses = { 1703 + /** 1704 + * Custom message: Successful response 1705 + */ 1706 + 200: unknown; 1707 + }; 1708 + 1455 1709 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1456 1710 body?: never; 1457 1711 path?: never; ··· 1463 1717 }; 1464 1718 }; 1465 1719 1466 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1720 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1721 + /** 1722 + * Successful response 1723 + */ 1724 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1725 + }; 1726 + 1727 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1467 1728 1468 1729 export type PutWithFormUrlEncodedData = { 1469 1730 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/types.gen.ts
··· 947 947 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 948 948 }; 949 949 950 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 950 + export type ImportResponses = { 951 + /** 952 + * Success 953 + */ 954 + 200: Model_From_Zendesk; 955 + /** 956 + * Default success response 957 + */ 958 + default: ModelWithReadOnlyAndWriteOnly; 959 + }; 960 + 961 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 951 962 952 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 963 + export type ApiVversionOdataControllerCountResponses = { 964 + /** 965 + * Success 966 + */ 967 + 200: Model_From_Zendesk; 968 + }; 969 + 970 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 953 971 954 972 export type GetApiVbyApiVersionSimpleOperationData = { 955 973 body?: never; ··· 962 980 query?: never; 963 981 }; 964 982 965 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 983 + export type GetApiVbyApiVersionSimpleOperationErrors = { 984 + /** 985 + * Default error response 986 + */ 987 + default: ModelWithBoolean; 988 + }; 966 989 967 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 990 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 991 + 992 + export type GetApiVbyApiVersionSimpleOperationResponses = { 993 + /** 994 + * Response is a simple number 995 + */ 996 + 200: number; 997 + }; 998 + 999 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 968 1000 969 1001 export type DeleteFooData3 = { 970 1002 body?: never; ··· 1136 1168 }; 1137 1169 }; 1138 1170 1139 - export type PostCallWithOptionalParamResponse = number | void; 1171 + export type PostCallWithOptionalParamResponses = { 1172 + /** 1173 + * Response is a simple number 1174 + */ 1175 + 200: number; 1176 + /** 1177 + * Success 1178 + */ 1179 + 204: void; 1180 + }; 1181 + 1182 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1140 1183 1141 1184 export type PostApiVbyApiVersionRequestBodyData = { 1142 1185 /** ··· 1259 1302 }; 1260 1303 }; 1261 1304 1262 - export type CallWithNoContentResponseResponse = void; 1305 + export type CallWithNoContentResponseResponses = { 1306 + /** 1307 + * Success 1308 + */ 1309 + 204: void; 1310 + }; 1263 1311 1264 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1312 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1265 1313 1266 - export type DummyAResponse = _400; 1314 + export type CallWithResponseAndNoContentResponseResponses = { 1315 + /** 1316 + * Response is a simple number 1317 + */ 1318 + 200: number; 1319 + /** 1320 + * Success 1321 + */ 1322 + 204: void; 1323 + }; 1267 1324 1268 - export type DummyBResponse = void; 1325 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1269 1326 1270 - export type CallWithResponseResponse = _import; 1327 + export type DummyAResponses = { 1328 + 200: _400; 1329 + }; 1271 1330 1272 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1331 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1273 1332 1274 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1333 + export type DummyBResponses = { 1334 + /** 1335 + * Success 1336 + */ 1337 + 204: void; 1338 + }; 1339 + 1340 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1275 1341 1276 - export type CallWithResponsesError = ModelWithStringError; 1342 + export type CallWithResponseResponses = { 1343 + default: _import; 1344 + }; 1345 + 1346 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1347 + 1348 + export type CallWithDuplicateResponsesErrors = { 1349 + /** 1350 + * Message for 500 error 1351 + */ 1352 + 500: ModelWithStringError; 1353 + /** 1354 + * Message for 501 error 1355 + */ 1356 + 501: ModelWithStringError; 1357 + /** 1358 + * Message for 502 error 1359 + */ 1360 + 502: ModelWithStringError; 1361 + /** 1362 + * Message for 4XX errors 1363 + */ 1364 + '4XX': DictionaryWithArray; 1365 + /** 1366 + * Default error response 1367 + */ 1368 + default: ModelWithBoolean; 1369 + }; 1370 + 1371 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1372 + 1373 + export type CallWithDuplicateResponsesResponses = { 1374 + /** 1375 + * Message for 200 response 1376 + */ 1377 + 200: ModelWithBoolean & ModelWithInteger; 1378 + /** 1379 + * Message for 201 response 1380 + */ 1381 + 201: ModelWithString; 1382 + /** 1383 + * Message for 202 response 1384 + */ 1385 + 202: ModelWithString; 1386 + }; 1387 + 1388 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1389 + 1390 + export type CallWithResponsesErrors = { 1391 + /** 1392 + * Message for 500 error 1393 + */ 1394 + 500: ModelWithStringError; 1395 + /** 1396 + * Message for 501 error 1397 + */ 1398 + 501: ModelWithStringError; 1399 + /** 1400 + * Message for 502 error 1401 + */ 1402 + 502: ModelWithStringError; 1403 + /** 1404 + * Message for default response 1405 + */ 1406 + default: ModelWithStringError; 1407 + }; 1408 + 1409 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1410 + 1411 + export type CallWithResponsesResponses = { 1412 + /** 1413 + * Message for 200 response 1414 + */ 1415 + 200: { 1416 + readonly '@namespace.string'?: string; 1417 + readonly '@namespace.integer'?: number; 1418 + readonly value?: Array<ModelWithString>; 1419 + }; 1420 + /** 1421 + * Message for 201 response 1422 + */ 1423 + 201: ModelThatExtends; 1424 + /** 1425 + * Message for 202 response 1426 + */ 1427 + 202: ModelThatExtendsExtends; 1428 + }; 1277 1429 1278 - export type CallWithResponsesResponse = { 1279 - readonly '@namespace.string'?: string; 1280 - readonly '@namespace.integer'?: number; 1281 - readonly value?: Array<ModelWithString>; 1282 - } | ModelThatExtends | ModelThatExtendsExtends; 1430 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1283 1431 1284 1432 export type CollectionFormatData = { 1285 1433 body?: never; ··· 1348 1496 }; 1349 1497 }; 1350 1498 1351 - export type TypesResponse = number | string | boolean | {}; 1499 + export type TypesResponses = { 1500 + /** 1501 + * Response is a simple number 1502 + */ 1503 + 200: number; 1504 + /** 1505 + * Response is a simple string 1506 + */ 1507 + 201: string; 1508 + /** 1509 + * Response is a simple boolean 1510 + */ 1511 + 202: boolean; 1512 + /** 1513 + * Response is a simple object 1514 + */ 1515 + 203: {}; 1516 + }; 1517 + 1518 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1352 1519 1353 1520 export type UploadFileData = { 1354 1521 body: Blob | File; ··· 1361 1528 query?: never; 1362 1529 }; 1363 1530 1364 - export type UploadFileResponse = boolean; 1531 + export type UploadFileResponses = { 1532 + 200: boolean; 1533 + }; 1534 + 1535 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1365 1536 1366 1537 export type FileResponseData = { 1367 1538 body?: never; ··· 1375 1546 query?: never; 1376 1547 }; 1377 1548 1378 - export type FileResponseResponse = Blob | File; 1549 + export type FileResponseResponses = { 1550 + /** 1551 + * Success 1552 + */ 1553 + 200: Blob | File; 1554 + }; 1555 + 1556 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1379 1557 1380 1558 export type ComplexTypesData = { 1381 1559 body?: never; ··· 1398 1576 }; 1399 1577 }; 1400 1578 1401 - export type ComplexTypesResponse = Array<ModelWithString>; 1579 + export type ComplexTypesErrors = { 1580 + /** 1581 + * 400 `server` error 1582 + */ 1583 + 400: unknown; 1584 + /** 1585 + * 500 server error 1586 + */ 1587 + 500: unknown; 1588 + }; 1589 + 1590 + export type ComplexTypesResponses = { 1591 + /** 1592 + * Successful response 1593 + */ 1594 + 200: Array<ModelWithString>; 1595 + }; 1596 + 1597 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1402 1598 1403 - export type MultipartResponseResponse = { 1404 - file?: Blob | File; 1405 - metadata?: { 1406 - foo?: string; 1407 - bar?: string; 1599 + export type MultipartResponseResponses = { 1600 + /** 1601 + * OK 1602 + */ 1603 + 200: { 1604 + file?: Blob | File; 1605 + metadata?: { 1606 + foo?: string; 1607 + bar?: string; 1608 + }; 1408 1609 }; 1409 1610 }; 1611 + 1612 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1410 1613 1411 1614 export type MultipartRequestData = { 1412 1615 body?: { ··· 1439 1642 query?: never; 1440 1643 }; 1441 1644 1442 - export type ComplexParamsResponse = ModelWithString; 1645 + export type ComplexParamsResponses = { 1646 + /** 1647 + * Success 1648 + */ 1649 + 200: ModelWithString; 1650 + }; 1651 + 1652 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1653 + 1654 + export type CallWithResultFromHeaderErrors = { 1655 + /** 1656 + * 400 server error 1657 + */ 1658 + 400: unknown; 1659 + /** 1660 + * 500 server error 1661 + */ 1662 + 500: unknown; 1663 + }; 1664 + 1665 + export type CallWithResultFromHeaderResponses = { 1666 + /** 1667 + * Successful response 1668 + */ 1669 + 200: unknown; 1670 + }; 1443 1671 1444 1672 export type TestErrorCodeData = { 1445 1673 body?: never; ··· 1452 1680 }; 1453 1681 }; 1454 1682 1683 + export type TestErrorCodeErrors = { 1684 + /** 1685 + * Custom message: Internal Server Error 1686 + */ 1687 + 500: unknown; 1688 + /** 1689 + * Custom message: Not Implemented 1690 + */ 1691 + 501: unknown; 1692 + /** 1693 + * Custom message: Bad Gateway 1694 + */ 1695 + 502: unknown; 1696 + /** 1697 + * Custom message: Service Unavailable 1698 + */ 1699 + 503: unknown; 1700 + }; 1701 + 1702 + export type TestErrorCodeResponses = { 1703 + /** 1704 + * Custom message: Successful response 1705 + */ 1706 + 200: unknown; 1707 + }; 1708 + 1455 1709 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1456 1710 body?: never; 1457 1711 path?: never; ··· 1463 1717 }; 1464 1718 }; 1465 1719 1466 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1720 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1721 + /** 1722 + * Successful response 1723 + */ 1724 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1725 + }; 1726 + 1727 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1467 1728 1468 1729 export type PutWithFormUrlEncodedData = { 1469 1730 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/types.gen.ts
··· 947 947 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 948 948 }; 949 949 950 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 950 + export type ImportResponses = { 951 + /** 952 + * Success 953 + */ 954 + 200: Model_From_Zendesk; 955 + /** 956 + * Default success response 957 + */ 958 + default: ModelWithReadOnlyAndWriteOnly; 959 + }; 960 + 961 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 951 962 952 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 963 + export type ApiVversionOdataControllerCountResponses = { 964 + /** 965 + * Success 966 + */ 967 + 200: Model_From_Zendesk; 968 + }; 969 + 970 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 953 971 954 972 export type GetApiVbyApiVersionSimpleOperationData = { 955 973 body?: never; ··· 962 980 query?: never; 963 981 }; 964 982 965 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 983 + export type GetApiVbyApiVersionSimpleOperationErrors = { 984 + /** 985 + * Default error response 986 + */ 987 + default: ModelWithBoolean; 988 + }; 966 989 967 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 990 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 991 + 992 + export type GetApiVbyApiVersionSimpleOperationResponses = { 993 + /** 994 + * Response is a simple number 995 + */ 996 + 200: number; 997 + }; 998 + 999 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 968 1000 969 1001 export type DeleteFooData3 = { 970 1002 body?: never; ··· 1136 1168 }; 1137 1169 }; 1138 1170 1139 - export type PostCallWithOptionalParamResponse = number | void; 1171 + export type PostCallWithOptionalParamResponses = { 1172 + /** 1173 + * Response is a simple number 1174 + */ 1175 + 200: number; 1176 + /** 1177 + * Success 1178 + */ 1179 + 204: void; 1180 + }; 1181 + 1182 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1140 1183 1141 1184 export type PostApiVbyApiVersionRequestBodyData = { 1142 1185 /** ··· 1259 1302 }; 1260 1303 }; 1261 1304 1262 - export type CallWithNoContentResponseResponse = void; 1305 + export type CallWithNoContentResponseResponses = { 1306 + /** 1307 + * Success 1308 + */ 1309 + 204: void; 1310 + }; 1263 1311 1264 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1312 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1265 1313 1266 - export type DummyAResponse = _400; 1314 + export type CallWithResponseAndNoContentResponseResponses = { 1315 + /** 1316 + * Response is a simple number 1317 + */ 1318 + 200: number; 1319 + /** 1320 + * Success 1321 + */ 1322 + 204: void; 1323 + }; 1267 1324 1268 - export type DummyBResponse = void; 1325 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1269 1326 1270 - export type CallWithResponseResponse = _import; 1327 + export type DummyAResponses = { 1328 + 200: _400; 1329 + }; 1271 1330 1272 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1331 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1273 1332 1274 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1333 + export type DummyBResponses = { 1334 + /** 1335 + * Success 1336 + */ 1337 + 204: void; 1338 + }; 1339 + 1340 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1275 1341 1276 - export type CallWithResponsesError = ModelWithStringError; 1342 + export type CallWithResponseResponses = { 1343 + default: _import; 1344 + }; 1345 + 1346 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1347 + 1348 + export type CallWithDuplicateResponsesErrors = { 1349 + /** 1350 + * Message for 500 error 1351 + */ 1352 + 500: ModelWithStringError; 1353 + /** 1354 + * Message for 501 error 1355 + */ 1356 + 501: ModelWithStringError; 1357 + /** 1358 + * Message for 502 error 1359 + */ 1360 + 502: ModelWithStringError; 1361 + /** 1362 + * Message for 4XX errors 1363 + */ 1364 + '4XX': DictionaryWithArray; 1365 + /** 1366 + * Default error response 1367 + */ 1368 + default: ModelWithBoolean; 1369 + }; 1370 + 1371 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1372 + 1373 + export type CallWithDuplicateResponsesResponses = { 1374 + /** 1375 + * Message for 200 response 1376 + */ 1377 + 200: ModelWithBoolean & ModelWithInteger; 1378 + /** 1379 + * Message for 201 response 1380 + */ 1381 + 201: ModelWithString; 1382 + /** 1383 + * Message for 202 response 1384 + */ 1385 + 202: ModelWithString; 1386 + }; 1387 + 1388 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1389 + 1390 + export type CallWithResponsesErrors = { 1391 + /** 1392 + * Message for 500 error 1393 + */ 1394 + 500: ModelWithStringError; 1395 + /** 1396 + * Message for 501 error 1397 + */ 1398 + 501: ModelWithStringError; 1399 + /** 1400 + * Message for 502 error 1401 + */ 1402 + 502: ModelWithStringError; 1403 + /** 1404 + * Message for default response 1405 + */ 1406 + default: ModelWithStringError; 1407 + }; 1408 + 1409 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1410 + 1411 + export type CallWithResponsesResponses = { 1412 + /** 1413 + * Message for 200 response 1414 + */ 1415 + 200: { 1416 + readonly '@namespace.string'?: string; 1417 + readonly '@namespace.integer'?: number; 1418 + readonly value?: Array<ModelWithString>; 1419 + }; 1420 + /** 1421 + * Message for 201 response 1422 + */ 1423 + 201: ModelThatExtends; 1424 + /** 1425 + * Message for 202 response 1426 + */ 1427 + 202: ModelThatExtendsExtends; 1428 + }; 1277 1429 1278 - export type CallWithResponsesResponse = { 1279 - readonly '@namespace.string'?: string; 1280 - readonly '@namespace.integer'?: number; 1281 - readonly value?: Array<ModelWithString>; 1282 - } | ModelThatExtends | ModelThatExtendsExtends; 1430 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1283 1431 1284 1432 export type CollectionFormatData = { 1285 1433 body?: never; ··· 1348 1496 }; 1349 1497 }; 1350 1498 1351 - export type TypesResponse = number | string | boolean | {}; 1499 + export type TypesResponses = { 1500 + /** 1501 + * Response is a simple number 1502 + */ 1503 + 200: number; 1504 + /** 1505 + * Response is a simple string 1506 + */ 1507 + 201: string; 1508 + /** 1509 + * Response is a simple boolean 1510 + */ 1511 + 202: boolean; 1512 + /** 1513 + * Response is a simple object 1514 + */ 1515 + 203: {}; 1516 + }; 1517 + 1518 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1352 1519 1353 1520 export type UploadFileData = { 1354 1521 body: Blob | File; ··· 1361 1528 query?: never; 1362 1529 }; 1363 1530 1364 - export type UploadFileResponse = boolean; 1531 + export type UploadFileResponses = { 1532 + 200: boolean; 1533 + }; 1534 + 1535 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1365 1536 1366 1537 export type FileResponseData = { 1367 1538 body?: never; ··· 1375 1546 query?: never; 1376 1547 }; 1377 1548 1378 - export type FileResponseResponse = Blob | File; 1549 + export type FileResponseResponses = { 1550 + /** 1551 + * Success 1552 + */ 1553 + 200: Blob | File; 1554 + }; 1555 + 1556 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1379 1557 1380 1558 export type ComplexTypesData = { 1381 1559 body?: never; ··· 1398 1576 }; 1399 1577 }; 1400 1578 1401 - export type ComplexTypesResponse = Array<ModelWithString>; 1579 + export type ComplexTypesErrors = { 1580 + /** 1581 + * 400 `server` error 1582 + */ 1583 + 400: unknown; 1584 + /** 1585 + * 500 server error 1586 + */ 1587 + 500: unknown; 1588 + }; 1589 + 1590 + export type ComplexTypesResponses = { 1591 + /** 1592 + * Successful response 1593 + */ 1594 + 200: Array<ModelWithString>; 1595 + }; 1596 + 1597 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1402 1598 1403 - export type MultipartResponseResponse = { 1404 - file?: Blob | File; 1405 - metadata?: { 1406 - foo?: string; 1407 - bar?: string; 1599 + export type MultipartResponseResponses = { 1600 + /** 1601 + * OK 1602 + */ 1603 + 200: { 1604 + file?: Blob | File; 1605 + metadata?: { 1606 + foo?: string; 1607 + bar?: string; 1608 + }; 1408 1609 }; 1409 1610 }; 1611 + 1612 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1410 1613 1411 1614 export type MultipartRequestData = { 1412 1615 body?: { ··· 1439 1642 query?: never; 1440 1643 }; 1441 1644 1442 - export type ComplexParamsResponse = ModelWithString; 1645 + export type ComplexParamsResponses = { 1646 + /** 1647 + * Success 1648 + */ 1649 + 200: ModelWithString; 1650 + }; 1651 + 1652 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1653 + 1654 + export type CallWithResultFromHeaderErrors = { 1655 + /** 1656 + * 400 server error 1657 + */ 1658 + 400: unknown; 1659 + /** 1660 + * 500 server error 1661 + */ 1662 + 500: unknown; 1663 + }; 1664 + 1665 + export type CallWithResultFromHeaderResponses = { 1666 + /** 1667 + * Successful response 1668 + */ 1669 + 200: unknown; 1670 + }; 1443 1671 1444 1672 export type TestErrorCodeData = { 1445 1673 body?: never; ··· 1452 1680 }; 1453 1681 }; 1454 1682 1683 + export type TestErrorCodeErrors = { 1684 + /** 1685 + * Custom message: Internal Server Error 1686 + */ 1687 + 500: unknown; 1688 + /** 1689 + * Custom message: Not Implemented 1690 + */ 1691 + 501: unknown; 1692 + /** 1693 + * Custom message: Bad Gateway 1694 + */ 1695 + 502: unknown; 1696 + /** 1697 + * Custom message: Service Unavailable 1698 + */ 1699 + 503: unknown; 1700 + }; 1701 + 1702 + export type TestErrorCodeResponses = { 1703 + /** 1704 + * Custom message: Successful response 1705 + */ 1706 + 200: unknown; 1707 + }; 1708 + 1455 1709 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1456 1710 body?: never; 1457 1711 path?: never; ··· 1463 1717 }; 1464 1718 }; 1465 1719 1466 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1720 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1721 + /** 1722 + * Successful response 1723 + */ 1724 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1725 + }; 1726 + 1727 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1467 1728 1468 1729 export type PutWithFormUrlEncodedData = { 1469 1730 body: ArrayWithStrings;
+21 -1048
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/fastify/default/fastify.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 + import type { ImportData, ImportResponses, ApiVversionOdataControllerCountResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, CallWithNoContentResponseResponses, CallWithResponseAndNoContentResponseResponses, DummyAResponses, DummyBResponses, CallWithResponseResponses, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithResponsesErrors, CallWithResponsesResponses, CollectionFormatData, TypesData, TypesResponses, UploadFileData, UploadFileResponses, FileResponseData, FileResponseResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, MultipartResponseResponses, MultipartRequestData, ComplexParamsData, ComplexParamsResponses, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, PutWithFormUrlEncodedData } from './types.gen'; 3 4 import type { RouteHandler } from 'fastify'; 4 - import type { ImportData, GetApiVbyApiVersionSimpleOperationData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, CollectionFormatData, TypesData, UploadFileData, FileResponseData, ComplexTypesData, MultipartRequestData, ComplexParamsData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, PutWithFormUrlEncodedData } from './types.gen'; 5 - 6 - /** 7 - * Model with number-only name 8 - */ 9 - export type _400 = string; 10 - 11 - /** 12 - * Testing multiline comments in string: First line 13 - * Second line 14 - * 15 - * Fourth line 16 - */ 17 - export type camelCaseCommentWithBreaks = number; 18 - 19 - /** 20 - * Testing multiline comments in string: First line 21 - * Second line 22 - * 23 - * Fourth line 24 - */ 25 - export type CommentWithBreaks = number; 26 - 27 - /** 28 - * Testing backticks in string: `backticks` and ```multiple backticks``` should work 29 - */ 30 - export type CommentWithBackticks = number; 31 - 32 - /** 33 - * Testing backticks and quotes in string: `backticks`, 'quotes', "double quotes" and ```multiple backticks``` should work 34 - */ 35 - export type CommentWithBackticksAndQuotes = number; 36 - 37 - /** 38 - * Testing slashes in string: \backwards\\\ and /forwards/// should work 39 - */ 40 - export type CommentWithSlashes = number; 41 - 42 - /** 43 - * Testing expression placeholders in string: ${expression} should work 44 - */ 45 - export type CommentWithExpressionPlaceholders = number; 46 - 47 - /** 48 - * Testing quotes in string: 'single quote''' and "double quotes""" should work 49 - */ 50 - export type CommentWithQuotes = number; 51 - 52 - /** 53 - * Testing reserved characters in string: * inline * and ** inline ** should work 54 - */ 55 - export type CommentWithReservedCharacters = number; 56 - 57 - /** 58 - * This is a simple number 59 - */ 60 - export type SimpleInteger = number; 61 - 62 - /** 63 - * This is a simple boolean 64 - */ 65 - export type SimpleBoolean = boolean; 66 - 67 - /** 68 - * This is a simple string 69 - */ 70 - export type SimpleString = string; 71 - 72 - /** 73 - * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串) 74 - */ 75 - export type NonAsciiStringæøåÆØÅöôêÊ字符串 = string; 76 - 77 - /** 78 - * This is a simple file 79 - */ 80 - export type SimpleFile = Blob | File; 81 - 82 - /** 83 - * This is a simple reference 84 - */ 85 - export type SimpleReference = ModelWithString; 86 - 87 - /** 88 - * This is a simple string 89 - */ 90 - export type SimpleStringWithPattern = string | null; 91 - 92 - /** 93 - * This is a simple enum with strings 94 - */ 95 - export type EnumWithStrings = 'Success' | 'Warning' | 'Error' | "'Single Quote'" | '"Double Quotes"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串'; 96 - 97 - export type EnumWithReplacedCharacters = "'Single Quote'" | '"Double Quotes"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | ''; 98 - 99 - /** 100 - * This is a simple enum with numbers 101 - */ 102 - export type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3; 103 - 104 - /** 105 - * Success=1,Warning=2,Error=3 106 - */ 107 - export type EnumFromDescription = number; 108 - 109 - /** 110 - * This is a simple enum with numbers 111 - */ 112 - export type EnumWithExtensions = 200 | 400 | 500; 113 - 114 - export type EnumWithXEnumNames = 0 | 1 | 2; 115 - 116 - /** 117 - * This is a simple array with numbers 118 - */ 119 - export type ArrayWithNumbers = Array<number>; 120 - 121 - /** 122 - * This is a simple array with booleans 123 - */ 124 - export type ArrayWithBooleans = Array<boolean>; 125 - 126 - /** 127 - * This is a simple array with strings 128 - */ 129 - export type ArrayWithStrings = Array<string>; 130 - 131 - /** 132 - * This is a simple array with references 133 - */ 134 - export type ArrayWithReferences = Array<ModelWithString>; 135 - 136 - /** 137 - * This is a simple array containing an array 138 - */ 139 - export type ArrayWithArray = Array<Array<ModelWithString>>; 140 - 141 - /** 142 - * This is a simple array with properties 143 - */ 144 - export type ArrayWithProperties = Array<{ 145 - '16x16'?: camelCaseCommentWithBreaks; 146 - bar?: string; 147 - }>; 148 - 149 - /** 150 - * This is a simple array with any of properties 151 - */ 152 - export type ArrayWithAnyOfProperties = Array<{ 153 - foo?: string; 154 - } | { 155 - bar?: string; 156 - }>; 157 - 158 - export type AnyOfAnyAndNull = { 159 - data?: unknown; 160 - }; 161 - 162 - /** 163 - * This is a simple array with any of properties 164 - */ 165 - export type AnyOfArrays = { 166 - results?: Array<{ 167 - foo?: string; 168 - } | { 169 - bar?: string; 170 - }>; 171 - }; 172 - 173 - /** 174 - * This is a string dictionary 175 - */ 176 - export type DictionaryWithString = { 177 - [key: string]: string; 178 - }; 179 - 180 - export type DictionaryWithPropertiesAndAdditionalProperties = { 181 - foo?: number; 182 - bar?: boolean; 183 - [key: string]: string | number | boolean | undefined; 184 - }; 185 - 186 - /** 187 - * This is a string reference 188 - */ 189 - export type DictionaryWithReference = { 190 - [key: string]: ModelWithString; 191 - }; 192 - 193 - /** 194 - * This is a complex dictionary 195 - */ 196 - export type DictionaryWithArray = { 197 - [key: string]: Array<ModelWithString>; 198 - }; 199 - 200 - /** 201 - * This is a string dictionary 202 - */ 203 - export type DictionaryWithDictionary = { 204 - [key: string]: { 205 - [key: string]: string; 206 - }; 207 - }; 208 - 209 - /** 210 - * This is a complex dictionary 211 - */ 212 - export type DictionaryWithProperties = { 213 - [key: string]: { 214 - foo?: string; 215 - bar?: string; 216 - }; 217 - }; 218 - 219 - /** 220 - * This is a model with one number property 221 - */ 222 - export type ModelWithInteger = { 223 - /** 224 - * This is a simple number property 225 - */ 226 - prop?: number; 227 - }; 228 - 229 - /** 230 - * This is a model with one boolean property 231 - */ 232 - export type ModelWithBoolean = { 233 - /** 234 - * This is a simple boolean property 235 - */ 236 - prop?: boolean; 237 - }; 238 - 239 - /** 240 - * This is a model with one string property 241 - */ 242 - export type ModelWithString = { 243 - /** 244 - * This is a simple string property 245 - */ 246 - prop?: string; 247 - }; 248 - 249 - /** 250 - * This is a model with one string property 251 - */ 252 - export type ModelWithStringError = { 253 - /** 254 - * This is a simple string property 255 - */ 256 - prop?: string; 257 - }; 258 - 259 - /** 260 - * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets) 261 - */ 262 - export type Model_From_Zendesk = string; 263 - 264 - /** 265 - * This is a model with one string property 266 - */ 267 - export type ModelWithNullableString = { 268 - /** 269 - * This is a simple string property 270 - */ 271 - nullableProp1?: string | null; 272 - /** 273 - * This is a simple string property 274 - */ 275 - nullableRequiredProp1: string | null; 276 - /** 277 - * This is a simple string property 278 - */ 279 - nullableProp2?: string | null; 280 - /** 281 - * This is a simple string property 282 - */ 283 - nullableRequiredProp2: string | null; 284 - /** 285 - * This is a simple enum with strings 286 - */ 287 - 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; 288 - }; 289 - 290 - /** 291 - * This is a model with one enum 292 - */ 293 - export type ModelWithEnum = { 294 - /** 295 - * This is a simple enum with strings 296 - */ 297 - 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; 298 - /** 299 - * These are the HTTP error code enums 300 - */ 301 - statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar'; 302 - /** 303 - * Simple boolean enum 304 - */ 305 - bool?: true; 306 - }; 307 - 308 - /** 309 - * This is a model with one enum with escaped name 310 - */ 311 - export type ModelWithEnumWithHyphen = { 312 - 'foo-bar-baz-qux'?: '3.0'; 313 - }; 314 - 315 - /** 316 - * This is a model with one enum 317 - */ 318 - export type ModelWithEnumFromDescription = { 319 - /** 320 - * Success=1,Warning=2,Error=3 321 - */ 322 - test?: number; 323 - }; 324 - 325 - /** 326 - * This is a model with nested enums 327 - */ 328 - export type ModelWithNestedEnums = { 329 - dictionaryWithEnum?: { 330 - [key: string]: 'Success' | 'Warning' | 'Error'; 331 - }; 332 - dictionaryWithEnumFromDescription?: { 333 - [key: string]: number; 334 - }; 335 - arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>; 336 - arrayWithDescription?: Array<number>; 337 - /** 338 - * This is a simple enum with strings 339 - */ 340 - 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; 341 - }; 342 - 343 - /** 344 - * This is a model with one property containing a reference 345 - */ 346 - export type ModelWithReference = { 347 - prop?: ModelWithProperties; 348 - }; 349 - 350 - /** 351 - * This is a model with one property containing an array 352 - */ 353 - export type ModelWithArrayReadOnlyAndWriteOnly = { 354 - prop?: Array<ModelWithReadOnlyAndWriteOnly>; 355 - propWithFile?: Array<Blob | File>; 356 - propWithNumber?: Array<number>; 357 - }; 358 - 359 - /** 360 - * This is a model with one property containing an array 361 - */ 362 - export type ModelWithArray = { 363 - prop?: Array<ModelWithString>; 364 - propWithFile?: Array<Blob | File>; 365 - propWithNumber?: Array<number>; 366 - }; 367 - 368 - /** 369 - * This is a model with one property containing a dictionary 370 - */ 371 - export type ModelWithDictionary = { 372 - prop?: { 373 - [key: string]: string; 374 - }; 375 - }; 376 - 377 - /** 378 - * This is a deprecated model with a deprecated property 379 - * @deprecated 380 - */ 381 - export type DeprecatedModel = { 382 - /** 383 - * This is a deprecated property 384 - * @deprecated 385 - */ 386 - prop?: string; 387 - }; 388 - 389 - /** 390 - * This is a model with one property containing a circular reference 391 - */ 392 - export type ModelWithCircularReference = { 393 - prop?: ModelWithCircularReference; 394 - }; 395 - 396 - /** 397 - * This is a model with one property with a 'one of' relationship 398 - */ 399 - export type CompositionWithOneOf = { 400 - propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; 401 - }; 402 - 403 - /** 404 - * This is a model with one property with a 'one of' relationship where the options are not $ref 405 - */ 406 - export type CompositionWithOneOfAnonymous = { 407 - propA?: { 408 - propA?: string; 409 - } | string | number; 410 - }; 411 - 412 - /** 413 - * Circle 414 - */ 415 - export type ModelCircle = { 416 - kind: string; 417 - radius?: number; 418 - }; 419 - 420 - /** 421 - * Square 422 - */ 423 - export type ModelSquare = { 424 - kind: string; 425 - sideLength?: number; 426 - }; 427 - 428 - /** 429 - * This is a model with one property with a 'one of' relationship where the options are not $ref 430 - */ 431 - export type CompositionWithOneOfDiscriminator = ({ 432 - kind?: 'circle'; 433 - } & ModelCircle) | ({ 434 - kind?: 'square'; 435 - } & ModelSquare); 436 - 437 - /** 438 - * This is a model with one property with a 'any of' relationship 439 - */ 440 - export type CompositionWithAnyOf = { 441 - propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; 442 - }; 443 - 444 - /** 445 - * This is a model with one property with a 'any of' relationship where the options are not $ref 446 - */ 447 - export type CompositionWithAnyOfAnonymous = { 448 - propA?: { 449 - propA?: string; 450 - } | string | number; 451 - }; 452 - 453 - /** 454 - * This is a model with nested 'any of' property with a type null 455 - */ 456 - export type CompositionWithNestedAnyAndTypeNull = { 457 - propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>; 458 - }; 459 - 460 - export type _3e_num_1Период = 'Bird' | 'Dog'; 461 - 462 - export type ConstValue = 'ConstValue'; 463 - 464 - /** 465 - * This is a model with one property with a 'any of' relationship where the options are not $ref 466 - */ 467 - export type CompositionWithNestedAnyOfAndNull = { 468 - propA?: Array<_3e_num_1Период | ConstValue> | null; 469 - }; 470 - 471 - /** 472 - * This is a model with one property with a 'one of' relationship 473 - */ 474 - export type CompositionWithOneOfAndNullable = { 475 - propA?: { 476 - boolean?: boolean; 477 - } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null; 478 - }; 479 - 480 - /** 481 - * This is a model that contains a simple dictionary within composition 482 - */ 483 - export type CompositionWithOneOfAndSimpleDictionary = { 484 - propA?: boolean | { 485 - [key: string]: number; 486 - }; 487 - }; 488 - 489 - /** 490 - * This is a model that contains a dictionary of simple arrays within composition 491 - */ 492 - export type CompositionWithOneOfAndSimpleArrayDictionary = { 493 - propA?: boolean | { 494 - [key: string]: Array<boolean>; 495 - }; 496 - }; 497 - 498 - /** 499 - * This is a model that contains a dictionary of complex arrays (composited) within composition 500 - */ 501 - export type CompositionWithOneOfAndComplexArrayDictionary = { 502 - propA?: boolean | { 503 - [key: string]: Array<number | string>; 504 - }; 505 - }; 506 - 507 - /** 508 - * This is a model with one property with a 'all of' relationship 509 - */ 510 - export type CompositionWithAllOfAndNullable = { 511 - propA?: ({ 512 - boolean?: boolean; 513 - } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null; 514 - }; 515 - 516 - /** 517 - * This is a model with one property with a 'any of' relationship 518 - */ 519 - export type CompositionWithAnyOfAndNullable = { 520 - propA?: { 521 - boolean?: boolean; 522 - } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null; 523 - }; 524 - 525 - /** 526 - * This is a base model with two simple optional properties 527 - */ 528 - export type CompositionBaseModel = { 529 - firstName?: string; 530 - lastname?: string; 531 - }; 532 - 533 - /** 534 - * This is a model that extends the base model 535 - */ 536 - export type CompositionExtendedModel = CompositionBaseModel & { 537 - age: number; 538 - firstName: string; 539 - lastname: string; 540 - }; 541 - 542 - /** 543 - * This is a model with one nested property 544 - */ 545 - export type ModelWithProperties = { 546 - required: string; 547 - readonly requiredAndReadOnly: string; 548 - requiredAndNullable: string | null; 549 - string?: string; 550 - number?: number; 551 - boolean?: boolean; 552 - reference?: ModelWithString; 553 - 'property with space'?: string; 554 - default?: string; 555 - try?: string; 556 - readonly '@namespace.string'?: string; 557 - readonly '@namespace.integer'?: number; 558 - }; 559 - 560 - /** 561 - * This is a model with one nested property 562 - */ 563 - export type ModelWithNestedProperties = { 564 - readonly first: { 565 - readonly second: { 566 - readonly third: string | null; 567 - } | null; 568 - } | null; 569 - }; 570 - 571 - /** 572 - * This is a model with duplicated properties 573 - */ 574 - export type ModelWithDuplicateProperties = { 575 - prop?: ModelWithString; 576 - }; 577 - 578 - /** 579 - * This is a model with ordered properties 580 - */ 581 - export type ModelWithOrderedProperties = { 582 - zebra?: string; 583 - apple?: string; 584 - hawaii?: string; 585 - }; 586 - 587 - /** 588 - * This is a model with duplicated imports 589 - */ 590 - export type ModelWithDuplicateImports = { 591 - propA?: ModelWithString; 592 - propB?: ModelWithString; 593 - propC?: ModelWithString; 594 - }; 595 - 596 - /** 597 - * This is a model that extends another model 598 - */ 599 - export type ModelThatExtends = ModelWithString & { 600 - propExtendsA?: string; 601 - propExtendsB?: ModelWithString; 602 - }; 603 - 604 - /** 605 - * This is a model that extends another model 606 - */ 607 - export type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & { 608 - propExtendsC?: string; 609 - propExtendsD?: ModelWithString; 610 - }; 611 - 612 - /** 613 - * This is a model that contains a some patterns 614 - */ 615 - export type ModelWithPattern = { 616 - key: string; 617 - name: string; 618 - readonly enabled?: boolean; 619 - readonly modified?: string; 620 - id?: string; 621 - text?: string; 622 - patternWithSingleQuotes?: string; 623 - patternWithNewline?: string; 624 - patternWithBacktick?: string; 625 - }; 626 - 627 - export type File = { 628 - readonly id?: string; 629 - readonly updated_at?: string; 630 - readonly created_at?: string; 631 - mime: string; 632 - readonly file?: string; 633 - }; 634 - 635 - export type _default = { 636 - name?: string; 637 - }; 638 - 639 - export type Pageable = { 640 - page?: number; 641 - size?: number; 642 - sort?: Array<string>; 643 - }; 644 - 645 - /** 646 - * This is a free-form object without additionalProperties. 647 - */ 648 - export type FreeFormObjectWithoutAdditionalProperties = {}; 649 - 650 - /** 651 - * This is a free-form object with additionalProperties: true. 652 - */ 653 - export type FreeFormObjectWithAdditionalPropertiesEqTrue = { 654 - [key: string]: unknown; 655 - }; 656 - 657 - /** 658 - * This is a free-form object with additionalProperties: {}. 659 - */ 660 - export type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {}; 661 - 662 - export type ModelWithConst = { 663 - String?: 'String'; 664 - number?: 0; 665 - null?: unknown; 666 - withType?: 'Some string'; 667 - }; 668 - 669 - /** 670 - * This is a model with one property and additionalProperties: true 671 - */ 672 - export type ModelWithAdditionalPropertiesEqTrue = { 673 - /** 674 - * This is a simple string property 675 - */ 676 - prop?: string; 677 - [key: string]: unknown | string | undefined; 678 - }; 679 - 680 - export type NestedAnyOfArraysNullable = { 681 - nullableArray?: Array<string | boolean> | null; 682 - }; 683 - 684 - export type CompositionWithOneOfAndProperties = ({ 685 - foo: SimpleParameter; 686 - } | { 687 - bar: NonAsciiStringæøåÆØÅöôêÊ字符串; 688 - }) & { 689 - baz: number | null; 690 - qux: number; 691 - }; 692 - 693 - /** 694 - * An object that can be null 695 - */ 696 - export type NullableObject = { 697 - foo?: string; 698 - } | null; 699 - 700 - /** 701 - * Some % character 702 - */ 703 - export type CharactersInDescription = string; 704 - 705 - export type ModelWithNullableObject = { 706 - data?: NullableObject; 707 - }; 708 - 709 - export type ModelWithOneOfEnum = { 710 - foo: 'Bar'; 711 - } | { 712 - foo: 'Baz'; 713 - } | { 714 - foo: 'Qux'; 715 - } | { 716 - content: string; 717 - foo: 'Quux'; 718 - } | { 719 - content: [ 720 - string, 721 - string 722 - ]; 723 - foo: 'Corge'; 724 - }; 725 - 726 - export type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar'; 727 - 728 - export type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux'; 729 - 730 - export type ModelWithNestedArrayEnumsData = { 731 - foo?: Array<ModelWithNestedArrayEnumsDataFoo>; 732 - bar?: Array<ModelWithNestedArrayEnumsDataBar>; 733 - }; 734 - 735 - export type ModelWithNestedArrayEnums = { 736 - array_strings?: Array<string>; 737 - data?: ModelWithNestedArrayEnumsData; 738 - }; 739 - 740 - export type ModelWithNestedCompositionEnums = { 741 - foo?: ModelWithNestedArrayEnumsDataFoo; 742 - }; 743 - 744 - export type ModelWithReadOnlyAndWriteOnly = { 745 - foo: string; 746 - readonly bar: string; 747 - baz: string; 748 - }; 749 - 750 - export type ModelWithConstantSizeArray = [ 751 - number, 752 - number 753 - ]; 754 - 755 - export type ModelWithAnyOfConstantSizeArray = [ 756 - number | string, 757 - number | string, 758 - number | string 759 - ]; 760 - 761 - export type ModelWithPrefixItemsConstantSizeArray = Array<ModelWithInteger | number | string>; 762 - 763 - export type ModelWithAnyOfConstantSizeArrayNullable = [ 764 - number | null | string, 765 - number | null | string, 766 - number | null | string 767 - ]; 768 - 769 - export type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [ 770 - number | _import, 771 - number | _import 772 - ]; 773 - 774 - export type ModelWithAnyOfConstantSizeArrayAndIntersect = [ 775 - number & string, 776 - number & string 777 - ]; 778 - 779 - export type ModelWithNumericEnumUnion = { 780 - /** 781 - * Период 782 - */ 783 - value?: -10 | -1 | 0 | 1 | 3 | 6 | 12; 784 - }; 785 - 786 - /** 787 - * Some description with `back ticks` 788 - */ 789 - export type ModelWithBackticksInDescription = { 790 - /** 791 - * The template `that` should be used for parsing and importing the contents of the CSV file. 792 - * 793 - * <br/><p>There is one placeholder currently supported:<ul> <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p> 794 - * <pre> 795 - * [ 796 - * { 797 - * "resourceType": "Asset", 798 - * "identifier": { 799 - * "name": "${1}", 800 - * "domain": { 801 - * "name": "${2}", 802 - * "community": { 803 - * "name": "Some Community" 804 - * } 805 - * } 806 - * }, 807 - * "attributes" : { 808 - * "00000000-0000-0000-0000-000000003115" : [ { 809 - * "value" : "${3}" 810 - * } ], 811 - * "00000000-0000-0000-0000-000000000222" : [ { 812 - * "value" : "${4}" 813 - * } ] 814 - * } 815 - * } 816 - * ] 817 - * </pre> 818 - */ 819 - template?: string; 820 - }; 821 - 822 - export type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆØÅöôêÊ字符串) & { 823 - baz: number | null; 824 - qux: number; 825 - }; 826 - 827 - /** 828 - * Model used to test deduplication strategy (unused) 829 - */ 830 - export type ParameterSimpleParameterUnused = string; 831 - 832 - /** 833 - * Model used to test deduplication strategy 834 - */ 835 - export type PostServiceWithEmptyTagResponse = string; 836 - 837 - /** 838 - * Model used to test deduplication strategy 839 - */ 840 - export type PostServiceWithEmptyTagResponse2 = string; 841 - 842 - /** 843 - * Model used to test deduplication strategy 844 - */ 845 - export type DeleteFooData = string; 846 - 847 - /** 848 - * Model used to test deduplication strategy 849 - */ 850 - export type DeleteFooData2 = string; 851 - 852 - /** 853 - * Model with restricted keyword name 854 - */ 855 - export type _import = string; 856 - 857 - export type SchemaWithFormRestrictedKeys = { 858 - description?: string; 859 - 'x-enum-descriptions'?: string; 860 - 'x-enum-varnames'?: string; 861 - 'x-enumNames'?: string; 862 - title?: string; 863 - object?: { 864 - description?: string; 865 - 'x-enum-descriptions'?: string; 866 - 'x-enum-varnames'?: string; 867 - 'x-enumNames'?: string; 868 - title?: string; 869 - }; 870 - array?: Array<{ 871 - description?: string; 872 - 'x-enum-descriptions'?: string; 873 - 'x-enum-varnames'?: string; 874 - 'x-enumNames'?: string; 875 - title?: string; 876 - }>; 877 - }; 878 - 879 - /** 880 - * This schema was giving PascalCase transformations a hard time 881 - */ 882 - export type io_k8s_apimachinery_pkg_apis_meta_v1_DeleteOptions = { 883 - /** 884 - * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned. 885 - */ 886 - preconditions?: io_k8s_apimachinery_pkg_apis_meta_v1_Preconditions; 887 - }; 888 - 889 - /** 890 - * This schema was giving PascalCase transformations a hard time 891 - */ 892 - export type io_k8s_apimachinery_pkg_apis_meta_v1_Preconditions = { 893 - /** 894 - * Specifies the target ResourceVersion 895 - */ 896 - resourceVersion?: string; 897 - /** 898 - * Specifies the target UID. 899 - */ 900 - uid?: string; 901 - }; 902 - 903 - export type AdditionalPropertiesUnknownIssue = { 904 - [key: string]: string | number; 905 - }; 906 - 907 - export type AdditionalPropertiesUnknownIssue2 = { 908 - [key: string]: string | number; 909 - }; 910 - 911 - export type AdditionalPropertiesUnknownIssue3 = string & { 912 - entries: { 913 - [key: string]: AdditionalPropertiesUnknownIssue; 914 - }; 915 - }; 916 - 917 - export type AdditionalPropertiesIntegerIssue = { 918 - value: number; 919 - [key: string]: number; 920 - }; 921 - 922 - export type OneOfAllOfIssue = ((ConstValue | Generic_Schema_Duplicate_Issue_1_System_Boolean_) & _3e_num_1Период) | Generic_Schema_Duplicate_Issue_1_System_String_; 923 - 924 - export type Generic_Schema_Duplicate_Issue_1_System_Boolean_ = { 925 - item?: boolean; 926 - error?: string | null; 927 - readonly hasError?: boolean; 928 - data?: { 929 - [key: string]: never; 930 - }; 931 - }; 932 - 933 - export type Generic_Schema_Duplicate_Issue_1_System_String_ = { 934 - item?: string | null; 935 - error?: string | null; 936 - readonly hasError?: boolean; 937 - }; 938 - 939 - /** 940 - * This is a reusable parameter 941 - */ 942 - export type SimpleParameter = string; 943 - 944 - /** 945 - * Parameter with illegal characters 946 - */ 947 - export type x_Foo_Bar = ModelWithString; 948 5 949 6 export type RouteHandlers = { 950 - export: RouteHandler<{}>; 951 7 import: RouteHandler<{ 952 8 Body: ImportData['body']; 953 - Reply: { 954 - '200': Model_From_Zendesk; 955 - }; 9 + Reply: ImportResponses; 956 10 }>; 957 11 apiVVersionOdataControllerCount: RouteHandler<{ 958 - Reply: { 959 - '200': Model_From_Zendesk; 960 - }; 12 + Reply: ApiVversionOdataControllerCountResponses; 961 13 }>; 962 14 getApiVbyApiVersionSimpleOperation: RouteHandler<{ 963 15 Params: GetApiVbyApiVersionSimpleOperationData['path']; 964 - Reply: { 965 - '200': number; 966 - }; 16 + Reply: GetApiVbyApiVersionSimpleOperationErrors & GetApiVbyApiVersionSimpleOperationResponses; 967 17 }>; 968 - deleteCallWithoutParametersAndResponse: RouteHandler<{}>; 969 - getCallWithoutParametersAndResponse: RouteHandler<{}>; 970 - headCallWithoutParametersAndResponse: RouteHandler<{}>; 971 - optionsCallWithoutParametersAndResponse: RouteHandler<{}>; 972 - patchCallWithoutParametersAndResponse: RouteHandler<{}>; 973 - postCallWithoutParametersAndResponse: RouteHandler<{}>; 974 - putCallWithoutParametersAndResponse: RouteHandler<{}>; 975 18 deleteFoo: RouteHandler<{ 976 19 Headers: DeleteFooData3['headers']; 977 20 Params: DeleteFooData3['path']; ··· 1001 44 postCallWithOptionalParam: RouteHandler<{ 1002 45 Body: PostCallWithOptionalParamData['body']; 1003 46 Querystring: PostCallWithOptionalParamData['query']; 1004 - Reply: { 1005 - '200': number; 1006 - '204': void; 1007 - }; 47 + Reply: PostCallWithOptionalParamResponses; 1008 48 }>; 1009 49 postApiVbyApiVersionRequestBody: RouteHandler<{ 1010 50 Body: PostApiVbyApiVersionRequestBodyData['body']; ··· 1023 63 callToTestOrderOfParams: RouteHandler<{ 1024 64 Querystring: CallToTestOrderOfParamsData['query']; 1025 65 }>; 1026 - duplicateName: RouteHandler<{}>; 1027 - duplicateName2: RouteHandler<{}>; 1028 - duplicateName3: RouteHandler<{}>; 1029 - duplicateName4: RouteHandler<{}>; 1030 66 callWithNoContentResponse: RouteHandler<{ 1031 - Reply: { 1032 - '204': void; 1033 - }; 67 + Reply: CallWithNoContentResponseResponses; 1034 68 }>; 1035 69 callWithResponseAndNoContentResponse: RouteHandler<{ 1036 - Reply: { 1037 - '200': number; 1038 - '204': void; 1039 - }; 70 + Reply: CallWithResponseAndNoContentResponseResponses; 1040 71 }>; 1041 72 dummyA: RouteHandler<{ 1042 - Reply: { 1043 - '200': _400; 1044 - }; 73 + Reply: DummyAResponses; 1045 74 }>; 1046 75 dummyB: RouteHandler<{ 1047 - Reply: { 1048 - '204': void; 1049 - }; 76 + Reply: DummyBResponses; 1050 77 }>; 1051 78 callWithResponse: RouteHandler<{ 1052 - Reply: {}; 79 + Reply: CallWithResponseResponses; 1053 80 }>; 1054 81 callWithDuplicateResponses: RouteHandler<{ 1055 - Reply: { 1056 - '200': ModelWithBoolean & ModelWithInteger; 1057 - '201': ModelWithString; 1058 - '202': ModelWithString; 1059 - '500': ModelWithStringError; 1060 - '501': ModelWithStringError; 1061 - '502': ModelWithStringError; 1062 - '4XX': DictionaryWithArray; 1063 - }; 82 + Reply: CallWithDuplicateResponsesErrors & CallWithDuplicateResponsesResponses; 1064 83 }>; 1065 84 callWithResponses: RouteHandler<{ 1066 - Reply: { 1067 - '200': { 1068 - readonly '@namespace.string'?: string; 1069 - readonly '@namespace.integer'?: number; 1070 - readonly value?: Array<ModelWithString>; 1071 - }; 1072 - '201': ModelThatExtends; 1073 - '202': ModelThatExtendsExtends; 1074 - '500': ModelWithStringError; 1075 - '501': ModelWithStringError; 1076 - '502': ModelWithStringError; 1077 - }; 85 + Reply: CallWithResponsesErrors & CallWithResponsesResponses; 1078 86 }>; 1079 87 collectionFormat: RouteHandler<{ 1080 88 Querystring: CollectionFormatData['query']; ··· 1082 90 types: RouteHandler<{ 1083 91 Params?: TypesData['path']; 1084 92 Querystring: TypesData['query']; 1085 - Reply: { 1086 - '200': number; 1087 - '201': string; 1088 - '202': boolean; 1089 - '203': {}; 1090 - }; 93 + Reply: TypesResponses; 1091 94 }>; 1092 95 uploadFile: RouteHandler<{ 1093 96 Body: UploadFileData['body']; 1094 97 Params: UploadFileData['path']; 1095 - Reply: { 1096 - '200': boolean; 1097 - }; 98 + Reply: UploadFileResponses; 1098 99 }>; 1099 100 fileResponse: RouteHandler<{ 1100 101 Params: FileResponseData['path']; 1101 - Reply: { 1102 - '200': Blob | File; 1103 - }; 102 + Reply: FileResponseResponses; 1104 103 }>; 1105 104 complexTypes: RouteHandler<{ 1106 105 Querystring: ComplexTypesData['query']; 1107 - Reply: { 1108 - '200': Array<ModelWithString>; 1109 - '400': unknown; 1110 - '500': unknown; 1111 - }; 106 + Reply: ComplexTypesErrors & ComplexTypesResponses; 1112 107 }>; 1113 108 multipartResponse: RouteHandler<{ 1114 - Reply: { 1115 - '200': { 1116 - file?: Blob | File; 1117 - metadata?: { 1118 - foo?: string; 1119 - bar?: string; 1120 - }; 1121 - }; 1122 - }; 109 + Reply: MultipartResponseResponses; 1123 110 }>; 1124 111 multipartRequest: RouteHandler<{ 1125 112 Body: MultipartRequestData['body']; ··· 1127 114 complexParams: RouteHandler<{ 1128 115 Body: ComplexParamsData['body']; 1129 116 Params: ComplexParamsData['path']; 1130 - Reply: { 1131 - '200': ModelWithString; 1132 - }; 117 + Reply: ComplexParamsResponses; 1133 118 }>; 1134 119 callWithResultFromHeader: RouteHandler<{ 1135 - Reply: { 1136 - '200': unknown; 1137 - '400': unknown; 1138 - '500': unknown; 1139 - }; 120 + Reply: CallWithResultFromHeaderErrors & CallWithResultFromHeaderResponses; 1140 121 }>; 1141 122 testErrorCode: RouteHandler<{ 1142 123 Querystring: TestErrorCodeData['query']; 1143 - Reply: { 1144 - '200': unknown; 1145 - '500': unknown; 1146 - '501': unknown; 1147 - '502': unknown; 1148 - '503': unknown; 1149 - }; 124 + Reply: TestErrorCodeErrors & TestErrorCodeResponses; 1150 125 }>; 1151 126 nonAsciiæøåÆøÅöôêÊ字符串: RouteHandler<{ 1152 127 Querystring: NonAsciiæøåÆøÅöôêÊ字符串Data['query']; 1153 - Reply: { 1154 - '200': Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1155 - }; 128 + Reply: NonAsciiæøåÆøÅöôêÊ字符串Responses; 1156 129 }>; 1157 130 putWithFormUrlEncoded: RouteHandler<{ 1158 131 Body: PutWithFormUrlEncodedData['body'];
+290 -29
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/fastify/default/types.gen.ts
··· 947 947 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 948 948 }; 949 949 950 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 950 + export type ImportResponses = { 951 + /** 952 + * Success 953 + */ 954 + 200: Model_From_Zendesk; 955 + /** 956 + * Default success response 957 + */ 958 + default: ModelWithReadOnlyAndWriteOnly; 959 + }; 960 + 961 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 951 962 952 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 963 + export type ApiVversionOdataControllerCountResponses = { 964 + /** 965 + * Success 966 + */ 967 + 200: Model_From_Zendesk; 968 + }; 969 + 970 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 953 971 954 972 export type GetApiVbyApiVersionSimpleOperationData = { 955 973 body?: never; ··· 962 980 query?: never; 963 981 }; 964 982 965 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 983 + export type GetApiVbyApiVersionSimpleOperationErrors = { 984 + /** 985 + * Default error response 986 + */ 987 + default: ModelWithBoolean; 988 + }; 966 989 967 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 990 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 991 + 992 + export type GetApiVbyApiVersionSimpleOperationResponses = { 993 + /** 994 + * Response is a simple number 995 + */ 996 + 200: number; 997 + }; 998 + 999 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 968 1000 969 1001 export type DeleteFooData3 = { 970 1002 body?: never; ··· 1136 1168 }; 1137 1169 }; 1138 1170 1139 - export type PostCallWithOptionalParamResponse = number | void; 1171 + export type PostCallWithOptionalParamResponses = { 1172 + /** 1173 + * Response is a simple number 1174 + */ 1175 + 200: number; 1176 + /** 1177 + * Success 1178 + */ 1179 + 204: void; 1180 + }; 1181 + 1182 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1140 1183 1141 1184 export type PostApiVbyApiVersionRequestBodyData = { 1142 1185 /** ··· 1259 1302 }; 1260 1303 }; 1261 1304 1262 - export type CallWithNoContentResponseResponse = void; 1305 + export type CallWithNoContentResponseResponses = { 1306 + /** 1307 + * Success 1308 + */ 1309 + 204: void; 1310 + }; 1263 1311 1264 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1312 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1265 1313 1266 - export type DummyAResponse = _400; 1314 + export type CallWithResponseAndNoContentResponseResponses = { 1315 + /** 1316 + * Response is a simple number 1317 + */ 1318 + 200: number; 1319 + /** 1320 + * Success 1321 + */ 1322 + 204: void; 1323 + }; 1267 1324 1268 - export type DummyBResponse = void; 1325 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1269 1326 1270 - export type CallWithResponseResponse = _import; 1327 + export type DummyAResponses = { 1328 + 200: _400; 1329 + }; 1271 1330 1272 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1331 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1273 1332 1274 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1333 + export type DummyBResponses = { 1334 + /** 1335 + * Success 1336 + */ 1337 + 204: void; 1338 + }; 1339 + 1340 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1275 1341 1276 - export type CallWithResponsesError = ModelWithStringError; 1342 + export type CallWithResponseResponses = { 1343 + default: _import; 1344 + }; 1345 + 1346 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1347 + 1348 + export type CallWithDuplicateResponsesErrors = { 1349 + /** 1350 + * Message for 500 error 1351 + */ 1352 + 500: ModelWithStringError; 1353 + /** 1354 + * Message for 501 error 1355 + */ 1356 + 501: ModelWithStringError; 1357 + /** 1358 + * Message for 502 error 1359 + */ 1360 + 502: ModelWithStringError; 1361 + /** 1362 + * Message for 4XX errors 1363 + */ 1364 + '4XX': DictionaryWithArray; 1365 + /** 1366 + * Default error response 1367 + */ 1368 + default: ModelWithBoolean; 1369 + }; 1370 + 1371 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1372 + 1373 + export type CallWithDuplicateResponsesResponses = { 1374 + /** 1375 + * Message for 200 response 1376 + */ 1377 + 200: ModelWithBoolean & ModelWithInteger; 1378 + /** 1379 + * Message for 201 response 1380 + */ 1381 + 201: ModelWithString; 1382 + /** 1383 + * Message for 202 response 1384 + */ 1385 + 202: ModelWithString; 1386 + }; 1387 + 1388 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1389 + 1390 + export type CallWithResponsesErrors = { 1391 + /** 1392 + * Message for 500 error 1393 + */ 1394 + 500: ModelWithStringError; 1395 + /** 1396 + * Message for 501 error 1397 + */ 1398 + 501: ModelWithStringError; 1399 + /** 1400 + * Message for 502 error 1401 + */ 1402 + 502: ModelWithStringError; 1403 + /** 1404 + * Message for default response 1405 + */ 1406 + default: ModelWithStringError; 1407 + }; 1408 + 1409 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1410 + 1411 + export type CallWithResponsesResponses = { 1412 + /** 1413 + * Message for 200 response 1414 + */ 1415 + 200: { 1416 + readonly '@namespace.string'?: string; 1417 + readonly '@namespace.integer'?: number; 1418 + readonly value?: Array<ModelWithString>; 1419 + }; 1420 + /** 1421 + * Message for 201 response 1422 + */ 1423 + 201: ModelThatExtends; 1424 + /** 1425 + * Message for 202 response 1426 + */ 1427 + 202: ModelThatExtendsExtends; 1428 + }; 1277 1429 1278 - export type CallWithResponsesResponse = { 1279 - readonly '@namespace.string'?: string; 1280 - readonly '@namespace.integer'?: number; 1281 - readonly value?: Array<ModelWithString>; 1282 - } | ModelThatExtends | ModelThatExtendsExtends; 1430 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1283 1431 1284 1432 export type CollectionFormatData = { 1285 1433 body?: never; ··· 1348 1496 }; 1349 1497 }; 1350 1498 1351 - export type TypesResponse = number | string | boolean | {}; 1499 + export type TypesResponses = { 1500 + /** 1501 + * Response is a simple number 1502 + */ 1503 + 200: number; 1504 + /** 1505 + * Response is a simple string 1506 + */ 1507 + 201: string; 1508 + /** 1509 + * Response is a simple boolean 1510 + */ 1511 + 202: boolean; 1512 + /** 1513 + * Response is a simple object 1514 + */ 1515 + 203: {}; 1516 + }; 1517 + 1518 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1352 1519 1353 1520 export type UploadFileData = { 1354 1521 body: Blob | File; ··· 1361 1528 query?: never; 1362 1529 }; 1363 1530 1364 - export type UploadFileResponse = boolean; 1531 + export type UploadFileResponses = { 1532 + 200: boolean; 1533 + }; 1534 + 1535 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1365 1536 1366 1537 export type FileResponseData = { 1367 1538 body?: never; ··· 1375 1546 query?: never; 1376 1547 }; 1377 1548 1378 - export type FileResponseResponse = Blob | File; 1549 + export type FileResponseResponses = { 1550 + /** 1551 + * Success 1552 + */ 1553 + 200: Blob | File; 1554 + }; 1555 + 1556 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1379 1557 1380 1558 export type ComplexTypesData = { 1381 1559 body?: never; ··· 1398 1576 }; 1399 1577 }; 1400 1578 1401 - export type ComplexTypesResponse = Array<ModelWithString>; 1579 + export type ComplexTypesErrors = { 1580 + /** 1581 + * 400 `server` error 1582 + */ 1583 + 400: unknown; 1584 + /** 1585 + * 500 server error 1586 + */ 1587 + 500: unknown; 1588 + }; 1589 + 1590 + export type ComplexTypesResponses = { 1591 + /** 1592 + * Successful response 1593 + */ 1594 + 200: Array<ModelWithString>; 1595 + }; 1596 + 1597 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1402 1598 1403 - export type MultipartResponseResponse = { 1404 - file?: Blob | File; 1405 - metadata?: { 1406 - foo?: string; 1407 - bar?: string; 1599 + export type MultipartResponseResponses = { 1600 + /** 1601 + * OK 1602 + */ 1603 + 200: { 1604 + file?: Blob | File; 1605 + metadata?: { 1606 + foo?: string; 1607 + bar?: string; 1608 + }; 1408 1609 }; 1409 1610 }; 1611 + 1612 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1410 1613 1411 1614 export type MultipartRequestData = { 1412 1615 body?: { ··· 1439 1642 query?: never; 1440 1643 }; 1441 1644 1442 - export type ComplexParamsResponse = ModelWithString; 1645 + export type ComplexParamsResponses = { 1646 + /** 1647 + * Success 1648 + */ 1649 + 200: ModelWithString; 1650 + }; 1651 + 1652 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1653 + 1654 + export type CallWithResultFromHeaderErrors = { 1655 + /** 1656 + * 400 server error 1657 + */ 1658 + 400: unknown; 1659 + /** 1660 + * 500 server error 1661 + */ 1662 + 500: unknown; 1663 + }; 1664 + 1665 + export type CallWithResultFromHeaderResponses = { 1666 + /** 1667 + * Successful response 1668 + */ 1669 + 200: unknown; 1670 + }; 1443 1671 1444 1672 export type TestErrorCodeData = { 1445 1673 body?: never; ··· 1452 1680 }; 1453 1681 }; 1454 1682 1683 + export type TestErrorCodeErrors = { 1684 + /** 1685 + * Custom message: Internal Server Error 1686 + */ 1687 + 500: unknown; 1688 + /** 1689 + * Custom message: Not Implemented 1690 + */ 1691 + 501: unknown; 1692 + /** 1693 + * Custom message: Bad Gateway 1694 + */ 1695 + 502: unknown; 1696 + /** 1697 + * Custom message: Service Unavailable 1698 + */ 1699 + 503: unknown; 1700 + }; 1701 + 1702 + export type TestErrorCodeResponses = { 1703 + /** 1704 + * Custom message: Successful response 1705 + */ 1706 + 200: unknown; 1707 + }; 1708 + 1455 1709 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1456 1710 body?: never; 1457 1711 path?: never; ··· 1463 1717 }; 1464 1718 }; 1465 1719 1466 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1720 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1721 + /** 1722 + * Successful response 1723 + */ 1724 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1725 + }; 1726 + 1727 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1467 1728 1468 1729 export type PutWithFormUrlEncodedData = { 1469 1730 body: ArrayWithStrings;
+12 -1
packages/openapi-ts/test/__snapshots__/3.1.x/operation-204/types.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - export type PostFooResponse = string | void; 3 + export type PostFooResponses = { 4 + /** 5 + * OK 6 + */ 7 + 200: string; 8 + /** 9 + * Created 10 + */ 11 + 204: void; 12 + }; 13 + 14 + export type PostFooResponse = PostFooResponses[keyof PostFooResponses];
+7
packages/openapi-ts/test/__snapshots__/3.1.x/parameter-explode-false/types.gen.ts
··· 6 6 query?: { 7 7 foo?: Array<string>; 8 8 }; 9 + }; 10 + 11 + export type PostFooResponses = { 12 + /** 13 + * OK 14 + */ 15 + default: unknown; 9 16 };
+290 -29
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@hey-api/services/default/types.gen.ts
··· 951 951 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 952 952 }; 953 953 954 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 954 + export type ImportResponses = { 955 + /** 956 + * Success 957 + */ 958 + 200: Model_From_Zendesk; 959 + /** 960 + * Default success response 961 + */ 962 + default: ModelWithReadOnlyAndWriteOnly; 963 + }; 964 + 965 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 955 966 956 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 967 + export type ApiVversionOdataControllerCountResponses = { 968 + /** 969 + * Success 970 + */ 971 + 200: Model_From_Zendesk; 972 + }; 973 + 974 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 957 975 958 976 export type GetApiVbyApiVersionSimpleOperationData = { 959 977 body?: never; ··· 966 984 query?: never; 967 985 }; 968 986 969 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 987 + export type GetApiVbyApiVersionSimpleOperationErrors = { 988 + /** 989 + * Default error response 990 + */ 991 + default: ModelWithBoolean; 992 + }; 970 993 971 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 994 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 995 + 996 + export type GetApiVbyApiVersionSimpleOperationResponses = { 997 + /** 998 + * Response is a simple number 999 + */ 1000 + 200: number; 1001 + }; 1002 + 1003 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 972 1004 973 1005 export type DeleteFooData3 = { 974 1006 body?: never; ··· 1140 1172 }; 1141 1173 }; 1142 1174 1143 - export type PostCallWithOptionalParamResponse = number | void; 1175 + export type PostCallWithOptionalParamResponses = { 1176 + /** 1177 + * Response is a simple number 1178 + */ 1179 + 200: number; 1180 + /** 1181 + * Success 1182 + */ 1183 + 204: void; 1184 + }; 1185 + 1186 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1144 1187 1145 1188 export type PostApiVbyApiVersionRequestBodyData = { 1146 1189 /** ··· 1263 1306 }; 1264 1307 }; 1265 1308 1266 - export type CallWithNoContentResponseResponse = void; 1309 + export type CallWithNoContentResponseResponses = { 1310 + /** 1311 + * Success 1312 + */ 1313 + 204: void; 1314 + }; 1267 1315 1268 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1316 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1269 1317 1270 - export type DummyAResponse = _400; 1318 + export type CallWithResponseAndNoContentResponseResponses = { 1319 + /** 1320 + * Response is a simple number 1321 + */ 1322 + 200: number; 1323 + /** 1324 + * Success 1325 + */ 1326 + 204: void; 1327 + }; 1271 1328 1272 - export type DummyBResponse = void; 1329 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1273 1330 1274 - export type CallWithResponseResponse = _import; 1331 + export type DummyAResponses = { 1332 + 200: _400; 1333 + }; 1275 1334 1276 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1335 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1277 1336 1278 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1337 + export type DummyBResponses = { 1338 + /** 1339 + * Success 1340 + */ 1341 + 204: void; 1342 + }; 1343 + 1344 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1279 1345 1280 - export type CallWithResponsesError = ModelWithStringError; 1346 + export type CallWithResponseResponses = { 1347 + default: _import; 1348 + }; 1349 + 1350 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1351 + 1352 + export type CallWithDuplicateResponsesErrors = { 1353 + /** 1354 + * Message for 500 error 1355 + */ 1356 + 500: ModelWithStringError; 1357 + /** 1358 + * Message for 501 error 1359 + */ 1360 + 501: ModelWithStringError; 1361 + /** 1362 + * Message for 502 error 1363 + */ 1364 + 502: ModelWithStringError; 1365 + /** 1366 + * Message for 4XX errors 1367 + */ 1368 + '4XX': DictionaryWithArray; 1369 + /** 1370 + * Default error response 1371 + */ 1372 + default: ModelWithBoolean; 1373 + }; 1374 + 1375 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1376 + 1377 + export type CallWithDuplicateResponsesResponses = { 1378 + /** 1379 + * Message for 200 response 1380 + */ 1381 + 200: ModelWithBoolean & ModelWithInteger; 1382 + /** 1383 + * Message for 201 response 1384 + */ 1385 + 201: ModelWithString; 1386 + /** 1387 + * Message for 202 response 1388 + */ 1389 + 202: ModelWithString; 1390 + }; 1391 + 1392 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1393 + 1394 + export type CallWithResponsesErrors = { 1395 + /** 1396 + * Message for 500 error 1397 + */ 1398 + 500: ModelWithStringError; 1399 + /** 1400 + * Message for 501 error 1401 + */ 1402 + 501: ModelWithStringError; 1403 + /** 1404 + * Message for 502 error 1405 + */ 1406 + 502: ModelWithStringError; 1407 + /** 1408 + * Message for default response 1409 + */ 1410 + default: ModelWithStringError; 1411 + }; 1412 + 1413 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1414 + 1415 + export type CallWithResponsesResponses = { 1416 + /** 1417 + * Message for 200 response 1418 + */ 1419 + 200: { 1420 + readonly '@namespace.string'?: string; 1421 + readonly '@namespace.integer'?: number; 1422 + readonly value?: Array<ModelWithString>; 1423 + }; 1424 + /** 1425 + * Message for 201 response 1426 + */ 1427 + 201: ModelThatExtends; 1428 + /** 1429 + * Message for 202 response 1430 + */ 1431 + 202: ModelThatExtendsExtends; 1432 + }; 1281 1433 1282 - export type CallWithResponsesResponse = { 1283 - readonly '@namespace.string'?: string; 1284 - readonly '@namespace.integer'?: number; 1285 - readonly value?: Array<ModelWithString>; 1286 - } | ModelThatExtends | ModelThatExtendsExtends; 1434 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1287 1435 1288 1436 export type CollectionFormatData = { 1289 1437 body?: never; ··· 1352 1500 }; 1353 1501 }; 1354 1502 1355 - export type TypesResponse = number | string | boolean | {}; 1503 + export type TypesResponses = { 1504 + /** 1505 + * Response is a simple number 1506 + */ 1507 + 200: number; 1508 + /** 1509 + * Response is a simple string 1510 + */ 1511 + 201: string; 1512 + /** 1513 + * Response is a simple boolean 1514 + */ 1515 + 202: boolean; 1516 + /** 1517 + * Response is a simple object 1518 + */ 1519 + 203: {}; 1520 + }; 1521 + 1522 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1356 1523 1357 1524 export type UploadFileData = { 1358 1525 body: Blob | File; ··· 1365 1532 query?: never; 1366 1533 }; 1367 1534 1368 - export type UploadFileResponse = boolean; 1535 + export type UploadFileResponses = { 1536 + 200: boolean; 1537 + }; 1538 + 1539 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1369 1540 1370 1541 export type FileResponseData = { 1371 1542 body?: never; ··· 1379 1550 query?: never; 1380 1551 }; 1381 1552 1382 - export type FileResponseResponse = Blob | File; 1553 + export type FileResponseResponses = { 1554 + /** 1555 + * Success 1556 + */ 1557 + 200: Blob | File; 1558 + }; 1559 + 1560 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1383 1561 1384 1562 export type ComplexTypesData = { 1385 1563 body?: never; ··· 1402 1580 }; 1403 1581 }; 1404 1582 1405 - export type ComplexTypesResponse = Array<ModelWithString>; 1583 + export type ComplexTypesErrors = { 1584 + /** 1585 + * 400 `server` error 1586 + */ 1587 + 400: unknown; 1588 + /** 1589 + * 500 server error 1590 + */ 1591 + 500: unknown; 1592 + }; 1593 + 1594 + export type ComplexTypesResponses = { 1595 + /** 1596 + * Successful response 1597 + */ 1598 + 200: Array<ModelWithString>; 1599 + }; 1600 + 1601 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1406 1602 1407 - export type MultipartResponseResponse = { 1408 - file?: Blob | File; 1409 - metadata?: { 1410 - foo?: string; 1411 - bar?: string; 1603 + export type MultipartResponseResponses = { 1604 + /** 1605 + * OK 1606 + */ 1607 + 200: { 1608 + file?: Blob | File; 1609 + metadata?: { 1610 + foo?: string; 1611 + bar?: string; 1612 + }; 1412 1613 }; 1413 1614 }; 1615 + 1616 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1414 1617 1415 1618 export type MultipartRequestData = { 1416 1619 body?: { ··· 1443 1646 query?: never; 1444 1647 }; 1445 1648 1446 - export type ComplexParamsResponse = ModelWithString; 1649 + export type ComplexParamsResponses = { 1650 + /** 1651 + * Success 1652 + */ 1653 + 200: ModelWithString; 1654 + }; 1655 + 1656 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1657 + 1658 + export type CallWithResultFromHeaderErrors = { 1659 + /** 1660 + * 400 server error 1661 + */ 1662 + 400: unknown; 1663 + /** 1664 + * 500 server error 1665 + */ 1666 + 500: unknown; 1667 + }; 1668 + 1669 + export type CallWithResultFromHeaderResponses = { 1670 + /** 1671 + * Successful response 1672 + */ 1673 + 200: unknown; 1674 + }; 1447 1675 1448 1676 export type TestErrorCodeData = { 1449 1677 body?: never; ··· 1456 1684 }; 1457 1685 }; 1458 1686 1687 + export type TestErrorCodeErrors = { 1688 + /** 1689 + * Custom message: Internal Server Error 1690 + */ 1691 + 500: unknown; 1692 + /** 1693 + * Custom message: Not Implemented 1694 + */ 1695 + 501: unknown; 1696 + /** 1697 + * Custom message: Bad Gateway 1698 + */ 1699 + 502: unknown; 1700 + /** 1701 + * Custom message: Service Unavailable 1702 + */ 1703 + 503: unknown; 1704 + }; 1705 + 1706 + export type TestErrorCodeResponses = { 1707 + /** 1708 + * Custom message: Successful response 1709 + */ 1710 + 200: unknown; 1711 + }; 1712 + 1459 1713 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1460 1714 body?: never; 1461 1715 path?: never; ··· 1467 1721 }; 1468 1722 }; 1469 1723 1470 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1724 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1725 + /** 1726 + * Successful response 1727 + */ 1728 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1729 + }; 1730 + 1731 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1471 1732 1472 1733 export type PutWithFormUrlEncodedData = { 1473 1734 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/types.gen.ts
··· 951 951 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 952 952 }; 953 953 954 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 954 + export type ImportResponses = { 955 + /** 956 + * Success 957 + */ 958 + 200: Model_From_Zendesk; 959 + /** 960 + * Default success response 961 + */ 962 + default: ModelWithReadOnlyAndWriteOnly; 963 + }; 964 + 965 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 955 966 956 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 967 + export type ApiVversionOdataControllerCountResponses = { 968 + /** 969 + * Success 970 + */ 971 + 200: Model_From_Zendesk; 972 + }; 973 + 974 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 957 975 958 976 export type GetApiVbyApiVersionSimpleOperationData = { 959 977 body?: never; ··· 966 984 query?: never; 967 985 }; 968 986 969 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 987 + export type GetApiVbyApiVersionSimpleOperationErrors = { 988 + /** 989 + * Default error response 990 + */ 991 + default: ModelWithBoolean; 992 + }; 970 993 971 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 994 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 995 + 996 + export type GetApiVbyApiVersionSimpleOperationResponses = { 997 + /** 998 + * Response is a simple number 999 + */ 1000 + 200: number; 1001 + }; 1002 + 1003 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 972 1004 973 1005 export type DeleteFooData3 = { 974 1006 body?: never; ··· 1140 1172 }; 1141 1173 }; 1142 1174 1143 - export type PostCallWithOptionalParamResponse = number | void; 1175 + export type PostCallWithOptionalParamResponses = { 1176 + /** 1177 + * Response is a simple number 1178 + */ 1179 + 200: number; 1180 + /** 1181 + * Success 1182 + */ 1183 + 204: void; 1184 + }; 1185 + 1186 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1144 1187 1145 1188 export type PostApiVbyApiVersionRequestBodyData = { 1146 1189 /** ··· 1263 1306 }; 1264 1307 }; 1265 1308 1266 - export type CallWithNoContentResponseResponse = void; 1309 + export type CallWithNoContentResponseResponses = { 1310 + /** 1311 + * Success 1312 + */ 1313 + 204: void; 1314 + }; 1267 1315 1268 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1316 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1269 1317 1270 - export type DummyAResponse = _400; 1318 + export type CallWithResponseAndNoContentResponseResponses = { 1319 + /** 1320 + * Response is a simple number 1321 + */ 1322 + 200: number; 1323 + /** 1324 + * Success 1325 + */ 1326 + 204: void; 1327 + }; 1271 1328 1272 - export type DummyBResponse = void; 1329 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1273 1330 1274 - export type CallWithResponseResponse = _import; 1331 + export type DummyAResponses = { 1332 + 200: _400; 1333 + }; 1275 1334 1276 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1335 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1277 1336 1278 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1337 + export type DummyBResponses = { 1338 + /** 1339 + * Success 1340 + */ 1341 + 204: void; 1342 + }; 1343 + 1344 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1279 1345 1280 - export type CallWithResponsesError = ModelWithStringError; 1346 + export type CallWithResponseResponses = { 1347 + default: _import; 1348 + }; 1349 + 1350 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1351 + 1352 + export type CallWithDuplicateResponsesErrors = { 1353 + /** 1354 + * Message for 500 error 1355 + */ 1356 + 500: ModelWithStringError; 1357 + /** 1358 + * Message for 501 error 1359 + */ 1360 + 501: ModelWithStringError; 1361 + /** 1362 + * Message for 502 error 1363 + */ 1364 + 502: ModelWithStringError; 1365 + /** 1366 + * Message for 4XX errors 1367 + */ 1368 + '4XX': DictionaryWithArray; 1369 + /** 1370 + * Default error response 1371 + */ 1372 + default: ModelWithBoolean; 1373 + }; 1374 + 1375 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1376 + 1377 + export type CallWithDuplicateResponsesResponses = { 1378 + /** 1379 + * Message for 200 response 1380 + */ 1381 + 200: ModelWithBoolean & ModelWithInteger; 1382 + /** 1383 + * Message for 201 response 1384 + */ 1385 + 201: ModelWithString; 1386 + /** 1387 + * Message for 202 response 1388 + */ 1389 + 202: ModelWithString; 1390 + }; 1391 + 1392 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1393 + 1394 + export type CallWithResponsesErrors = { 1395 + /** 1396 + * Message for 500 error 1397 + */ 1398 + 500: ModelWithStringError; 1399 + /** 1400 + * Message for 501 error 1401 + */ 1402 + 501: ModelWithStringError; 1403 + /** 1404 + * Message for 502 error 1405 + */ 1406 + 502: ModelWithStringError; 1407 + /** 1408 + * Message for default response 1409 + */ 1410 + default: ModelWithStringError; 1411 + }; 1412 + 1413 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1414 + 1415 + export type CallWithResponsesResponses = { 1416 + /** 1417 + * Message for 200 response 1418 + */ 1419 + 200: { 1420 + readonly '@namespace.string'?: string; 1421 + readonly '@namespace.integer'?: number; 1422 + readonly value?: Array<ModelWithString>; 1423 + }; 1424 + /** 1425 + * Message for 201 response 1426 + */ 1427 + 201: ModelThatExtends; 1428 + /** 1429 + * Message for 202 response 1430 + */ 1431 + 202: ModelThatExtendsExtends; 1432 + }; 1281 1433 1282 - export type CallWithResponsesResponse = { 1283 - readonly '@namespace.string'?: string; 1284 - readonly '@namespace.integer'?: number; 1285 - readonly value?: Array<ModelWithString>; 1286 - } | ModelThatExtends | ModelThatExtendsExtends; 1434 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1287 1435 1288 1436 export type CollectionFormatData = { 1289 1437 body?: never; ··· 1352 1500 }; 1353 1501 }; 1354 1502 1355 - export type TypesResponse = number | string | boolean | {}; 1503 + export type TypesResponses = { 1504 + /** 1505 + * Response is a simple number 1506 + */ 1507 + 200: number; 1508 + /** 1509 + * Response is a simple string 1510 + */ 1511 + 201: string; 1512 + /** 1513 + * Response is a simple boolean 1514 + */ 1515 + 202: boolean; 1516 + /** 1517 + * Response is a simple object 1518 + */ 1519 + 203: {}; 1520 + }; 1521 + 1522 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1356 1523 1357 1524 export type UploadFileData = { 1358 1525 body: Blob | File; ··· 1365 1532 query?: never; 1366 1533 }; 1367 1534 1368 - export type UploadFileResponse = boolean; 1535 + export type UploadFileResponses = { 1536 + 200: boolean; 1537 + }; 1538 + 1539 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1369 1540 1370 1541 export type FileResponseData = { 1371 1542 body?: never; ··· 1379 1550 query?: never; 1380 1551 }; 1381 1552 1382 - export type FileResponseResponse = Blob | File; 1553 + export type FileResponseResponses = { 1554 + /** 1555 + * Success 1556 + */ 1557 + 200: Blob | File; 1558 + }; 1559 + 1560 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1383 1561 1384 1562 export type ComplexTypesData = { 1385 1563 body?: never; ··· 1402 1580 }; 1403 1581 }; 1404 1582 1405 - export type ComplexTypesResponse = Array<ModelWithString>; 1583 + export type ComplexTypesErrors = { 1584 + /** 1585 + * 400 `server` error 1586 + */ 1587 + 400: unknown; 1588 + /** 1589 + * 500 server error 1590 + */ 1591 + 500: unknown; 1592 + }; 1593 + 1594 + export type ComplexTypesResponses = { 1595 + /** 1596 + * Successful response 1597 + */ 1598 + 200: Array<ModelWithString>; 1599 + }; 1600 + 1601 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1406 1602 1407 - export type MultipartResponseResponse = { 1408 - file?: Blob | File; 1409 - metadata?: { 1410 - foo?: string; 1411 - bar?: string; 1603 + export type MultipartResponseResponses = { 1604 + /** 1605 + * OK 1606 + */ 1607 + 200: { 1608 + file?: Blob | File; 1609 + metadata?: { 1610 + foo?: string; 1611 + bar?: string; 1612 + }; 1412 1613 }; 1413 1614 }; 1615 + 1616 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1414 1617 1415 1618 export type MultipartRequestData = { 1416 1619 body?: { ··· 1443 1646 query?: never; 1444 1647 }; 1445 1648 1446 - export type ComplexParamsResponse = ModelWithString; 1649 + export type ComplexParamsResponses = { 1650 + /** 1651 + * Success 1652 + */ 1653 + 200: ModelWithString; 1654 + }; 1655 + 1656 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1657 + 1658 + export type CallWithResultFromHeaderErrors = { 1659 + /** 1660 + * 400 server error 1661 + */ 1662 + 400: unknown; 1663 + /** 1664 + * 500 server error 1665 + */ 1666 + 500: unknown; 1667 + }; 1668 + 1669 + export type CallWithResultFromHeaderResponses = { 1670 + /** 1671 + * Successful response 1672 + */ 1673 + 200: unknown; 1674 + }; 1447 1675 1448 1676 export type TestErrorCodeData = { 1449 1677 body?: never; ··· 1456 1684 }; 1457 1685 }; 1458 1686 1687 + export type TestErrorCodeErrors = { 1688 + /** 1689 + * Custom message: Internal Server Error 1690 + */ 1691 + 500: unknown; 1692 + /** 1693 + * Custom message: Not Implemented 1694 + */ 1695 + 501: unknown; 1696 + /** 1697 + * Custom message: Bad Gateway 1698 + */ 1699 + 502: unknown; 1700 + /** 1701 + * Custom message: Service Unavailable 1702 + */ 1703 + 503: unknown; 1704 + }; 1705 + 1706 + export type TestErrorCodeResponses = { 1707 + /** 1708 + * Custom message: Successful response 1709 + */ 1710 + 200: unknown; 1711 + }; 1712 + 1459 1713 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1460 1714 body?: never; 1461 1715 path?: never; ··· 1467 1721 }; 1468 1722 }; 1469 1723 1470 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1724 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1725 + /** 1726 + * Successful response 1727 + */ 1728 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1729 + }; 1730 + 1731 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1471 1732 1472 1733 export type PutWithFormUrlEncodedData = { 1473 1734 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/types.gen.ts
··· 951 951 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 952 952 }; 953 953 954 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 954 + export type ImportResponses = { 955 + /** 956 + * Success 957 + */ 958 + 200: Model_From_Zendesk; 959 + /** 960 + * Default success response 961 + */ 962 + default: ModelWithReadOnlyAndWriteOnly; 963 + }; 964 + 965 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 955 966 956 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 967 + export type ApiVversionOdataControllerCountResponses = { 968 + /** 969 + * Success 970 + */ 971 + 200: Model_From_Zendesk; 972 + }; 973 + 974 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 957 975 958 976 export type GetApiVbyApiVersionSimpleOperationData = { 959 977 body?: never; ··· 966 984 query?: never; 967 985 }; 968 986 969 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 987 + export type GetApiVbyApiVersionSimpleOperationErrors = { 988 + /** 989 + * Default error response 990 + */ 991 + default: ModelWithBoolean; 992 + }; 970 993 971 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 994 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 995 + 996 + export type GetApiVbyApiVersionSimpleOperationResponses = { 997 + /** 998 + * Response is a simple number 999 + */ 1000 + 200: number; 1001 + }; 1002 + 1003 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 972 1004 973 1005 export type DeleteFooData3 = { 974 1006 body?: never; ··· 1140 1172 }; 1141 1173 }; 1142 1174 1143 - export type PostCallWithOptionalParamResponse = number | void; 1175 + export type PostCallWithOptionalParamResponses = { 1176 + /** 1177 + * Response is a simple number 1178 + */ 1179 + 200: number; 1180 + /** 1181 + * Success 1182 + */ 1183 + 204: void; 1184 + }; 1185 + 1186 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1144 1187 1145 1188 export type PostApiVbyApiVersionRequestBodyData = { 1146 1189 /** ··· 1263 1306 }; 1264 1307 }; 1265 1308 1266 - export type CallWithNoContentResponseResponse = void; 1309 + export type CallWithNoContentResponseResponses = { 1310 + /** 1311 + * Success 1312 + */ 1313 + 204: void; 1314 + }; 1267 1315 1268 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1316 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1269 1317 1270 - export type DummyAResponse = _400; 1318 + export type CallWithResponseAndNoContentResponseResponses = { 1319 + /** 1320 + * Response is a simple number 1321 + */ 1322 + 200: number; 1323 + /** 1324 + * Success 1325 + */ 1326 + 204: void; 1327 + }; 1271 1328 1272 - export type DummyBResponse = void; 1329 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1273 1330 1274 - export type CallWithResponseResponse = _import; 1331 + export type DummyAResponses = { 1332 + 200: _400; 1333 + }; 1275 1334 1276 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1335 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1277 1336 1278 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1337 + export type DummyBResponses = { 1338 + /** 1339 + * Success 1340 + */ 1341 + 204: void; 1342 + }; 1343 + 1344 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1279 1345 1280 - export type CallWithResponsesError = ModelWithStringError; 1346 + export type CallWithResponseResponses = { 1347 + default: _import; 1348 + }; 1349 + 1350 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1351 + 1352 + export type CallWithDuplicateResponsesErrors = { 1353 + /** 1354 + * Message for 500 error 1355 + */ 1356 + 500: ModelWithStringError; 1357 + /** 1358 + * Message for 501 error 1359 + */ 1360 + 501: ModelWithStringError; 1361 + /** 1362 + * Message for 502 error 1363 + */ 1364 + 502: ModelWithStringError; 1365 + /** 1366 + * Message for 4XX errors 1367 + */ 1368 + '4XX': DictionaryWithArray; 1369 + /** 1370 + * Default error response 1371 + */ 1372 + default: ModelWithBoolean; 1373 + }; 1374 + 1375 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1376 + 1377 + export type CallWithDuplicateResponsesResponses = { 1378 + /** 1379 + * Message for 200 response 1380 + */ 1381 + 200: ModelWithBoolean & ModelWithInteger; 1382 + /** 1383 + * Message for 201 response 1384 + */ 1385 + 201: ModelWithString; 1386 + /** 1387 + * Message for 202 response 1388 + */ 1389 + 202: ModelWithString; 1390 + }; 1391 + 1392 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1393 + 1394 + export type CallWithResponsesErrors = { 1395 + /** 1396 + * Message for 500 error 1397 + */ 1398 + 500: ModelWithStringError; 1399 + /** 1400 + * Message for 501 error 1401 + */ 1402 + 501: ModelWithStringError; 1403 + /** 1404 + * Message for 502 error 1405 + */ 1406 + 502: ModelWithStringError; 1407 + /** 1408 + * Message for default response 1409 + */ 1410 + default: ModelWithStringError; 1411 + }; 1412 + 1413 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1414 + 1415 + export type CallWithResponsesResponses = { 1416 + /** 1417 + * Message for 200 response 1418 + */ 1419 + 200: { 1420 + readonly '@namespace.string'?: string; 1421 + readonly '@namespace.integer'?: number; 1422 + readonly value?: Array<ModelWithString>; 1423 + }; 1424 + /** 1425 + * Message for 201 response 1426 + */ 1427 + 201: ModelThatExtends; 1428 + /** 1429 + * Message for 202 response 1430 + */ 1431 + 202: ModelThatExtendsExtends; 1432 + }; 1281 1433 1282 - export type CallWithResponsesResponse = { 1283 - readonly '@namespace.string'?: string; 1284 - readonly '@namespace.integer'?: number; 1285 - readonly value?: Array<ModelWithString>; 1286 - } | ModelThatExtends | ModelThatExtendsExtends; 1434 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1287 1435 1288 1436 export type CollectionFormatData = { 1289 1437 body?: never; ··· 1352 1500 }; 1353 1501 }; 1354 1502 1355 - export type TypesResponse = number | string | boolean | {}; 1503 + export type TypesResponses = { 1504 + /** 1505 + * Response is a simple number 1506 + */ 1507 + 200: number; 1508 + /** 1509 + * Response is a simple string 1510 + */ 1511 + 201: string; 1512 + /** 1513 + * Response is a simple boolean 1514 + */ 1515 + 202: boolean; 1516 + /** 1517 + * Response is a simple object 1518 + */ 1519 + 203: {}; 1520 + }; 1521 + 1522 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1356 1523 1357 1524 export type UploadFileData = { 1358 1525 body: Blob | File; ··· 1365 1532 query?: never; 1366 1533 }; 1367 1534 1368 - export type UploadFileResponse = boolean; 1535 + export type UploadFileResponses = { 1536 + 200: boolean; 1537 + }; 1538 + 1539 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1369 1540 1370 1541 export type FileResponseData = { 1371 1542 body?: never; ··· 1379 1550 query?: never; 1380 1551 }; 1381 1552 1382 - export type FileResponseResponse = Blob | File; 1553 + export type FileResponseResponses = { 1554 + /** 1555 + * Success 1556 + */ 1557 + 200: Blob | File; 1558 + }; 1559 + 1560 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1383 1561 1384 1562 export type ComplexTypesData = { 1385 1563 body?: never; ··· 1402 1580 }; 1403 1581 }; 1404 1582 1405 - export type ComplexTypesResponse = Array<ModelWithString>; 1583 + export type ComplexTypesErrors = { 1584 + /** 1585 + * 400 `server` error 1586 + */ 1587 + 400: unknown; 1588 + /** 1589 + * 500 server error 1590 + */ 1591 + 500: unknown; 1592 + }; 1593 + 1594 + export type ComplexTypesResponses = { 1595 + /** 1596 + * Successful response 1597 + */ 1598 + 200: Array<ModelWithString>; 1599 + }; 1600 + 1601 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1406 1602 1407 - export type MultipartResponseResponse = { 1408 - file?: Blob | File; 1409 - metadata?: { 1410 - foo?: string; 1411 - bar?: string; 1603 + export type MultipartResponseResponses = { 1604 + /** 1605 + * OK 1606 + */ 1607 + 200: { 1608 + file?: Blob | File; 1609 + metadata?: { 1610 + foo?: string; 1611 + bar?: string; 1612 + }; 1412 1613 }; 1413 1614 }; 1615 + 1616 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1414 1617 1415 1618 export type MultipartRequestData = { 1416 1619 body?: { ··· 1443 1646 query?: never; 1444 1647 }; 1445 1648 1446 - export type ComplexParamsResponse = ModelWithString; 1649 + export type ComplexParamsResponses = { 1650 + /** 1651 + * Success 1652 + */ 1653 + 200: ModelWithString; 1654 + }; 1655 + 1656 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1657 + 1658 + export type CallWithResultFromHeaderErrors = { 1659 + /** 1660 + * 400 server error 1661 + */ 1662 + 400: unknown; 1663 + /** 1664 + * 500 server error 1665 + */ 1666 + 500: unknown; 1667 + }; 1668 + 1669 + export type CallWithResultFromHeaderResponses = { 1670 + /** 1671 + * Successful response 1672 + */ 1673 + 200: unknown; 1674 + }; 1447 1675 1448 1676 export type TestErrorCodeData = { 1449 1677 body?: never; ··· 1456 1684 }; 1457 1685 }; 1458 1686 1687 + export type TestErrorCodeErrors = { 1688 + /** 1689 + * Custom message: Internal Server Error 1690 + */ 1691 + 500: unknown; 1692 + /** 1693 + * Custom message: Not Implemented 1694 + */ 1695 + 501: unknown; 1696 + /** 1697 + * Custom message: Bad Gateway 1698 + */ 1699 + 502: unknown; 1700 + /** 1701 + * Custom message: Service Unavailable 1702 + */ 1703 + 503: unknown; 1704 + }; 1705 + 1706 + export type TestErrorCodeResponses = { 1707 + /** 1708 + * Custom message: Successful response 1709 + */ 1710 + 200: unknown; 1711 + }; 1712 + 1459 1713 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1460 1714 body?: never; 1461 1715 path?: never; ··· 1467 1721 }; 1468 1722 }; 1469 1723 1470 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1724 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1725 + /** 1726 + * Successful response 1727 + */ 1728 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1729 + }; 1730 + 1731 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1471 1732 1472 1733 export type PutWithFormUrlEncodedData = { 1473 1734 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/types.gen.ts
··· 951 951 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 952 952 }; 953 953 954 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 954 + export type ImportResponses = { 955 + /** 956 + * Success 957 + */ 958 + 200: Model_From_Zendesk; 959 + /** 960 + * Default success response 961 + */ 962 + default: ModelWithReadOnlyAndWriteOnly; 963 + }; 964 + 965 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 955 966 956 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 967 + export type ApiVversionOdataControllerCountResponses = { 968 + /** 969 + * Success 970 + */ 971 + 200: Model_From_Zendesk; 972 + }; 973 + 974 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 957 975 958 976 export type GetApiVbyApiVersionSimpleOperationData = { 959 977 body?: never; ··· 966 984 query?: never; 967 985 }; 968 986 969 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 987 + export type GetApiVbyApiVersionSimpleOperationErrors = { 988 + /** 989 + * Default error response 990 + */ 991 + default: ModelWithBoolean; 992 + }; 970 993 971 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 994 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 995 + 996 + export type GetApiVbyApiVersionSimpleOperationResponses = { 997 + /** 998 + * Response is a simple number 999 + */ 1000 + 200: number; 1001 + }; 1002 + 1003 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 972 1004 973 1005 export type DeleteFooData3 = { 974 1006 body?: never; ··· 1140 1172 }; 1141 1173 }; 1142 1174 1143 - export type PostCallWithOptionalParamResponse = number | void; 1175 + export type PostCallWithOptionalParamResponses = { 1176 + /** 1177 + * Response is a simple number 1178 + */ 1179 + 200: number; 1180 + /** 1181 + * Success 1182 + */ 1183 + 204: void; 1184 + }; 1185 + 1186 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1144 1187 1145 1188 export type PostApiVbyApiVersionRequestBodyData = { 1146 1189 /** ··· 1263 1306 }; 1264 1307 }; 1265 1308 1266 - export type CallWithNoContentResponseResponse = void; 1309 + export type CallWithNoContentResponseResponses = { 1310 + /** 1311 + * Success 1312 + */ 1313 + 204: void; 1314 + }; 1267 1315 1268 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1316 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1269 1317 1270 - export type DummyAResponse = _400; 1318 + export type CallWithResponseAndNoContentResponseResponses = { 1319 + /** 1320 + * Response is a simple number 1321 + */ 1322 + 200: number; 1323 + /** 1324 + * Success 1325 + */ 1326 + 204: void; 1327 + }; 1271 1328 1272 - export type DummyBResponse = void; 1329 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1273 1330 1274 - export type CallWithResponseResponse = _import; 1331 + export type DummyAResponses = { 1332 + 200: _400; 1333 + }; 1275 1334 1276 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1335 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1277 1336 1278 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1337 + export type DummyBResponses = { 1338 + /** 1339 + * Success 1340 + */ 1341 + 204: void; 1342 + }; 1343 + 1344 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1279 1345 1280 - export type CallWithResponsesError = ModelWithStringError; 1346 + export type CallWithResponseResponses = { 1347 + default: _import; 1348 + }; 1349 + 1350 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1351 + 1352 + export type CallWithDuplicateResponsesErrors = { 1353 + /** 1354 + * Message for 500 error 1355 + */ 1356 + 500: ModelWithStringError; 1357 + /** 1358 + * Message for 501 error 1359 + */ 1360 + 501: ModelWithStringError; 1361 + /** 1362 + * Message for 502 error 1363 + */ 1364 + 502: ModelWithStringError; 1365 + /** 1366 + * Message for 4XX errors 1367 + */ 1368 + '4XX': DictionaryWithArray; 1369 + /** 1370 + * Default error response 1371 + */ 1372 + default: ModelWithBoolean; 1373 + }; 1374 + 1375 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1376 + 1377 + export type CallWithDuplicateResponsesResponses = { 1378 + /** 1379 + * Message for 200 response 1380 + */ 1381 + 200: ModelWithBoolean & ModelWithInteger; 1382 + /** 1383 + * Message for 201 response 1384 + */ 1385 + 201: ModelWithString; 1386 + /** 1387 + * Message for 202 response 1388 + */ 1389 + 202: ModelWithString; 1390 + }; 1391 + 1392 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1393 + 1394 + export type CallWithResponsesErrors = { 1395 + /** 1396 + * Message for 500 error 1397 + */ 1398 + 500: ModelWithStringError; 1399 + /** 1400 + * Message for 501 error 1401 + */ 1402 + 501: ModelWithStringError; 1403 + /** 1404 + * Message for 502 error 1405 + */ 1406 + 502: ModelWithStringError; 1407 + /** 1408 + * Message for default response 1409 + */ 1410 + default: ModelWithStringError; 1411 + }; 1412 + 1413 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1414 + 1415 + export type CallWithResponsesResponses = { 1416 + /** 1417 + * Message for 200 response 1418 + */ 1419 + 200: { 1420 + readonly '@namespace.string'?: string; 1421 + readonly '@namespace.integer'?: number; 1422 + readonly value?: Array<ModelWithString>; 1423 + }; 1424 + /** 1425 + * Message for 201 response 1426 + */ 1427 + 201: ModelThatExtends; 1428 + /** 1429 + * Message for 202 response 1430 + */ 1431 + 202: ModelThatExtendsExtends; 1432 + }; 1281 1433 1282 - export type CallWithResponsesResponse = { 1283 - readonly '@namespace.string'?: string; 1284 - readonly '@namespace.integer'?: number; 1285 - readonly value?: Array<ModelWithString>; 1286 - } | ModelThatExtends | ModelThatExtendsExtends; 1434 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1287 1435 1288 1436 export type CollectionFormatData = { 1289 1437 body?: never; ··· 1352 1500 }; 1353 1501 }; 1354 1502 1355 - export type TypesResponse = number | string | boolean | {}; 1503 + export type TypesResponses = { 1504 + /** 1505 + * Response is a simple number 1506 + */ 1507 + 200: number; 1508 + /** 1509 + * Response is a simple string 1510 + */ 1511 + 201: string; 1512 + /** 1513 + * Response is a simple boolean 1514 + */ 1515 + 202: boolean; 1516 + /** 1517 + * Response is a simple object 1518 + */ 1519 + 203: {}; 1520 + }; 1521 + 1522 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1356 1523 1357 1524 export type UploadFileData = { 1358 1525 body: Blob | File; ··· 1365 1532 query?: never; 1366 1533 }; 1367 1534 1368 - export type UploadFileResponse = boolean; 1535 + export type UploadFileResponses = { 1536 + 200: boolean; 1537 + }; 1538 + 1539 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1369 1540 1370 1541 export type FileResponseData = { 1371 1542 body?: never; ··· 1379 1550 query?: never; 1380 1551 }; 1381 1552 1382 - export type FileResponseResponse = Blob | File; 1553 + export type FileResponseResponses = { 1554 + /** 1555 + * Success 1556 + */ 1557 + 200: Blob | File; 1558 + }; 1559 + 1560 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1383 1561 1384 1562 export type ComplexTypesData = { 1385 1563 body?: never; ··· 1402 1580 }; 1403 1581 }; 1404 1582 1405 - export type ComplexTypesResponse = Array<ModelWithString>; 1583 + export type ComplexTypesErrors = { 1584 + /** 1585 + * 400 `server` error 1586 + */ 1587 + 400: unknown; 1588 + /** 1589 + * 500 server error 1590 + */ 1591 + 500: unknown; 1592 + }; 1593 + 1594 + export type ComplexTypesResponses = { 1595 + /** 1596 + * Successful response 1597 + */ 1598 + 200: Array<ModelWithString>; 1599 + }; 1600 + 1601 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1406 1602 1407 - export type MultipartResponseResponse = { 1408 - file?: Blob | File; 1409 - metadata?: { 1410 - foo?: string; 1411 - bar?: string; 1603 + export type MultipartResponseResponses = { 1604 + /** 1605 + * OK 1606 + */ 1607 + 200: { 1608 + file?: Blob | File; 1609 + metadata?: { 1610 + foo?: string; 1611 + bar?: string; 1612 + }; 1412 1613 }; 1413 1614 }; 1615 + 1616 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1414 1617 1415 1618 export type MultipartRequestData = { 1416 1619 body?: { ··· 1443 1646 query?: never; 1444 1647 }; 1445 1648 1446 - export type ComplexParamsResponse = ModelWithString; 1649 + export type ComplexParamsResponses = { 1650 + /** 1651 + * Success 1652 + */ 1653 + 200: ModelWithString; 1654 + }; 1655 + 1656 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1657 + 1658 + export type CallWithResultFromHeaderErrors = { 1659 + /** 1660 + * 400 server error 1661 + */ 1662 + 400: unknown; 1663 + /** 1664 + * 500 server error 1665 + */ 1666 + 500: unknown; 1667 + }; 1668 + 1669 + export type CallWithResultFromHeaderResponses = { 1670 + /** 1671 + * Successful response 1672 + */ 1673 + 200: unknown; 1674 + }; 1447 1675 1448 1676 export type TestErrorCodeData = { 1449 1677 body?: never; ··· 1456 1684 }; 1457 1685 }; 1458 1686 1687 + export type TestErrorCodeErrors = { 1688 + /** 1689 + * Custom message: Internal Server Error 1690 + */ 1691 + 500: unknown; 1692 + /** 1693 + * Custom message: Not Implemented 1694 + */ 1695 + 501: unknown; 1696 + /** 1697 + * Custom message: Bad Gateway 1698 + */ 1699 + 502: unknown; 1700 + /** 1701 + * Custom message: Service Unavailable 1702 + */ 1703 + 503: unknown; 1704 + }; 1705 + 1706 + export type TestErrorCodeResponses = { 1707 + /** 1708 + * Custom message: Successful response 1709 + */ 1710 + 200: unknown; 1711 + }; 1712 + 1459 1713 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1460 1714 body?: never; 1461 1715 path?: never; ··· 1467 1721 }; 1468 1722 }; 1469 1723 1470 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1724 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1725 + /** 1726 + * Successful response 1727 + */ 1728 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1729 + }; 1730 + 1731 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1471 1732 1472 1733 export type PutWithFormUrlEncodedData = { 1473 1734 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/types.gen.ts
··· 951 951 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 952 952 }; 953 953 954 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 954 + export type ImportResponses = { 955 + /** 956 + * Success 957 + */ 958 + 200: Model_From_Zendesk; 959 + /** 960 + * Default success response 961 + */ 962 + default: ModelWithReadOnlyAndWriteOnly; 963 + }; 964 + 965 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 955 966 956 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 967 + export type ApiVversionOdataControllerCountResponses = { 968 + /** 969 + * Success 970 + */ 971 + 200: Model_From_Zendesk; 972 + }; 973 + 974 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 957 975 958 976 export type GetApiVbyApiVersionSimpleOperationData = { 959 977 body?: never; ··· 966 984 query?: never; 967 985 }; 968 986 969 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 987 + export type GetApiVbyApiVersionSimpleOperationErrors = { 988 + /** 989 + * Default error response 990 + */ 991 + default: ModelWithBoolean; 992 + }; 970 993 971 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 994 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 995 + 996 + export type GetApiVbyApiVersionSimpleOperationResponses = { 997 + /** 998 + * Response is a simple number 999 + */ 1000 + 200: number; 1001 + }; 1002 + 1003 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 972 1004 973 1005 export type DeleteFooData3 = { 974 1006 body?: never; ··· 1140 1172 }; 1141 1173 }; 1142 1174 1143 - export type PostCallWithOptionalParamResponse = number | void; 1175 + export type PostCallWithOptionalParamResponses = { 1176 + /** 1177 + * Response is a simple number 1178 + */ 1179 + 200: number; 1180 + /** 1181 + * Success 1182 + */ 1183 + 204: void; 1184 + }; 1185 + 1186 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1144 1187 1145 1188 export type PostApiVbyApiVersionRequestBodyData = { 1146 1189 /** ··· 1263 1306 }; 1264 1307 }; 1265 1308 1266 - export type CallWithNoContentResponseResponse = void; 1309 + export type CallWithNoContentResponseResponses = { 1310 + /** 1311 + * Success 1312 + */ 1313 + 204: void; 1314 + }; 1267 1315 1268 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1316 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1269 1317 1270 - export type DummyAResponse = _400; 1318 + export type CallWithResponseAndNoContentResponseResponses = { 1319 + /** 1320 + * Response is a simple number 1321 + */ 1322 + 200: number; 1323 + /** 1324 + * Success 1325 + */ 1326 + 204: void; 1327 + }; 1271 1328 1272 - export type DummyBResponse = void; 1329 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1273 1330 1274 - export type CallWithResponseResponse = _import; 1331 + export type DummyAResponses = { 1332 + 200: _400; 1333 + }; 1275 1334 1276 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1335 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1277 1336 1278 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1337 + export type DummyBResponses = { 1338 + /** 1339 + * Success 1340 + */ 1341 + 204: void; 1342 + }; 1343 + 1344 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1279 1345 1280 - export type CallWithResponsesError = ModelWithStringError; 1346 + export type CallWithResponseResponses = { 1347 + default: _import; 1348 + }; 1349 + 1350 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1351 + 1352 + export type CallWithDuplicateResponsesErrors = { 1353 + /** 1354 + * Message for 500 error 1355 + */ 1356 + 500: ModelWithStringError; 1357 + /** 1358 + * Message for 501 error 1359 + */ 1360 + 501: ModelWithStringError; 1361 + /** 1362 + * Message for 502 error 1363 + */ 1364 + 502: ModelWithStringError; 1365 + /** 1366 + * Message for 4XX errors 1367 + */ 1368 + '4XX': DictionaryWithArray; 1369 + /** 1370 + * Default error response 1371 + */ 1372 + default: ModelWithBoolean; 1373 + }; 1374 + 1375 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1376 + 1377 + export type CallWithDuplicateResponsesResponses = { 1378 + /** 1379 + * Message for 200 response 1380 + */ 1381 + 200: ModelWithBoolean & ModelWithInteger; 1382 + /** 1383 + * Message for 201 response 1384 + */ 1385 + 201: ModelWithString; 1386 + /** 1387 + * Message for 202 response 1388 + */ 1389 + 202: ModelWithString; 1390 + }; 1391 + 1392 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1393 + 1394 + export type CallWithResponsesErrors = { 1395 + /** 1396 + * Message for 500 error 1397 + */ 1398 + 500: ModelWithStringError; 1399 + /** 1400 + * Message for 501 error 1401 + */ 1402 + 501: ModelWithStringError; 1403 + /** 1404 + * Message for 502 error 1405 + */ 1406 + 502: ModelWithStringError; 1407 + /** 1408 + * Message for default response 1409 + */ 1410 + default: ModelWithStringError; 1411 + }; 1412 + 1413 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1414 + 1415 + export type CallWithResponsesResponses = { 1416 + /** 1417 + * Message for 200 response 1418 + */ 1419 + 200: { 1420 + readonly '@namespace.string'?: string; 1421 + readonly '@namespace.integer'?: number; 1422 + readonly value?: Array<ModelWithString>; 1423 + }; 1424 + /** 1425 + * Message for 201 response 1426 + */ 1427 + 201: ModelThatExtends; 1428 + /** 1429 + * Message for 202 response 1430 + */ 1431 + 202: ModelThatExtendsExtends; 1432 + }; 1281 1433 1282 - export type CallWithResponsesResponse = { 1283 - readonly '@namespace.string'?: string; 1284 - readonly '@namespace.integer'?: number; 1285 - readonly value?: Array<ModelWithString>; 1286 - } | ModelThatExtends | ModelThatExtendsExtends; 1434 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1287 1435 1288 1436 export type CollectionFormatData = { 1289 1437 body?: never; ··· 1352 1500 }; 1353 1501 }; 1354 1502 1355 - export type TypesResponse = number | string | boolean | {}; 1503 + export type TypesResponses = { 1504 + /** 1505 + * Response is a simple number 1506 + */ 1507 + 200: number; 1508 + /** 1509 + * Response is a simple string 1510 + */ 1511 + 201: string; 1512 + /** 1513 + * Response is a simple boolean 1514 + */ 1515 + 202: boolean; 1516 + /** 1517 + * Response is a simple object 1518 + */ 1519 + 203: {}; 1520 + }; 1521 + 1522 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1356 1523 1357 1524 export type UploadFileData = { 1358 1525 body: Blob | File; ··· 1365 1532 query?: never; 1366 1533 }; 1367 1534 1368 - export type UploadFileResponse = boolean; 1535 + export type UploadFileResponses = { 1536 + 200: boolean; 1537 + }; 1538 + 1539 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1369 1540 1370 1541 export type FileResponseData = { 1371 1542 body?: never; ··· 1379 1550 query?: never; 1380 1551 }; 1381 1552 1382 - export type FileResponseResponse = Blob | File; 1553 + export type FileResponseResponses = { 1554 + /** 1555 + * Success 1556 + */ 1557 + 200: Blob | File; 1558 + }; 1559 + 1560 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1383 1561 1384 1562 export type ComplexTypesData = { 1385 1563 body?: never; ··· 1402 1580 }; 1403 1581 }; 1404 1582 1405 - export type ComplexTypesResponse = Array<ModelWithString>; 1583 + export type ComplexTypesErrors = { 1584 + /** 1585 + * 400 `server` error 1586 + */ 1587 + 400: unknown; 1588 + /** 1589 + * 500 server error 1590 + */ 1591 + 500: unknown; 1592 + }; 1593 + 1594 + export type ComplexTypesResponses = { 1595 + /** 1596 + * Successful response 1597 + */ 1598 + 200: Array<ModelWithString>; 1599 + }; 1600 + 1601 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1406 1602 1407 - export type MultipartResponseResponse = { 1408 - file?: Blob | File; 1409 - metadata?: { 1410 - foo?: string; 1411 - bar?: string; 1603 + export type MultipartResponseResponses = { 1604 + /** 1605 + * OK 1606 + */ 1607 + 200: { 1608 + file?: Blob | File; 1609 + metadata?: { 1610 + foo?: string; 1611 + bar?: string; 1612 + }; 1412 1613 }; 1413 1614 }; 1615 + 1616 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1414 1617 1415 1618 export type MultipartRequestData = { 1416 1619 body?: { ··· 1443 1646 query?: never; 1444 1647 }; 1445 1648 1446 - export type ComplexParamsResponse = ModelWithString; 1649 + export type ComplexParamsResponses = { 1650 + /** 1651 + * Success 1652 + */ 1653 + 200: ModelWithString; 1654 + }; 1655 + 1656 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1657 + 1658 + export type CallWithResultFromHeaderErrors = { 1659 + /** 1660 + * 400 server error 1661 + */ 1662 + 400: unknown; 1663 + /** 1664 + * 500 server error 1665 + */ 1666 + 500: unknown; 1667 + }; 1668 + 1669 + export type CallWithResultFromHeaderResponses = { 1670 + /** 1671 + * Successful response 1672 + */ 1673 + 200: unknown; 1674 + }; 1447 1675 1448 1676 export type TestErrorCodeData = { 1449 1677 body?: never; ··· 1456 1684 }; 1457 1685 }; 1458 1686 1687 + export type TestErrorCodeErrors = { 1688 + /** 1689 + * Custom message: Internal Server Error 1690 + */ 1691 + 500: unknown; 1692 + /** 1693 + * Custom message: Not Implemented 1694 + */ 1695 + 501: unknown; 1696 + /** 1697 + * Custom message: Bad Gateway 1698 + */ 1699 + 502: unknown; 1700 + /** 1701 + * Custom message: Service Unavailable 1702 + */ 1703 + 503: unknown; 1704 + }; 1705 + 1706 + export type TestErrorCodeResponses = { 1707 + /** 1708 + * Custom message: Successful response 1709 + */ 1710 + 200: unknown; 1711 + }; 1712 + 1459 1713 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1460 1714 body?: never; 1461 1715 path?: never; ··· 1467 1721 }; 1468 1722 }; 1469 1723 1470 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1724 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1725 + /** 1726 + * Successful response 1727 + */ 1728 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1729 + }; 1730 + 1731 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1471 1732 1472 1733 export type PutWithFormUrlEncodedData = { 1473 1734 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/types.gen.ts
··· 951 951 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 952 952 }; 953 953 954 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 954 + export type ImportResponses = { 955 + /** 956 + * Success 957 + */ 958 + 200: Model_From_Zendesk; 959 + /** 960 + * Default success response 961 + */ 962 + default: ModelWithReadOnlyAndWriteOnly; 963 + }; 964 + 965 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 955 966 956 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 967 + export type ApiVversionOdataControllerCountResponses = { 968 + /** 969 + * Success 970 + */ 971 + 200: Model_From_Zendesk; 972 + }; 973 + 974 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 957 975 958 976 export type GetApiVbyApiVersionSimpleOperationData = { 959 977 body?: never; ··· 966 984 query?: never; 967 985 }; 968 986 969 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 987 + export type GetApiVbyApiVersionSimpleOperationErrors = { 988 + /** 989 + * Default error response 990 + */ 991 + default: ModelWithBoolean; 992 + }; 970 993 971 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 994 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 995 + 996 + export type GetApiVbyApiVersionSimpleOperationResponses = { 997 + /** 998 + * Response is a simple number 999 + */ 1000 + 200: number; 1001 + }; 1002 + 1003 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 972 1004 973 1005 export type DeleteFooData3 = { 974 1006 body?: never; ··· 1140 1172 }; 1141 1173 }; 1142 1174 1143 - export type PostCallWithOptionalParamResponse = number | void; 1175 + export type PostCallWithOptionalParamResponses = { 1176 + /** 1177 + * Response is a simple number 1178 + */ 1179 + 200: number; 1180 + /** 1181 + * Success 1182 + */ 1183 + 204: void; 1184 + }; 1185 + 1186 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1144 1187 1145 1188 export type PostApiVbyApiVersionRequestBodyData = { 1146 1189 /** ··· 1263 1306 }; 1264 1307 }; 1265 1308 1266 - export type CallWithNoContentResponseResponse = void; 1309 + export type CallWithNoContentResponseResponses = { 1310 + /** 1311 + * Success 1312 + */ 1313 + 204: void; 1314 + }; 1267 1315 1268 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1316 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1269 1317 1270 - export type DummyAResponse = _400; 1318 + export type CallWithResponseAndNoContentResponseResponses = { 1319 + /** 1320 + * Response is a simple number 1321 + */ 1322 + 200: number; 1323 + /** 1324 + * Success 1325 + */ 1326 + 204: void; 1327 + }; 1271 1328 1272 - export type DummyBResponse = void; 1329 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1273 1330 1274 - export type CallWithResponseResponse = _import; 1331 + export type DummyAResponses = { 1332 + 200: _400; 1333 + }; 1275 1334 1276 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1335 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1277 1336 1278 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1337 + export type DummyBResponses = { 1338 + /** 1339 + * Success 1340 + */ 1341 + 204: void; 1342 + }; 1343 + 1344 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1279 1345 1280 - export type CallWithResponsesError = ModelWithStringError; 1346 + export type CallWithResponseResponses = { 1347 + default: _import; 1348 + }; 1349 + 1350 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1351 + 1352 + export type CallWithDuplicateResponsesErrors = { 1353 + /** 1354 + * Message for 500 error 1355 + */ 1356 + 500: ModelWithStringError; 1357 + /** 1358 + * Message for 501 error 1359 + */ 1360 + 501: ModelWithStringError; 1361 + /** 1362 + * Message for 502 error 1363 + */ 1364 + 502: ModelWithStringError; 1365 + /** 1366 + * Message for 4XX errors 1367 + */ 1368 + '4XX': DictionaryWithArray; 1369 + /** 1370 + * Default error response 1371 + */ 1372 + default: ModelWithBoolean; 1373 + }; 1374 + 1375 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1376 + 1377 + export type CallWithDuplicateResponsesResponses = { 1378 + /** 1379 + * Message for 200 response 1380 + */ 1381 + 200: ModelWithBoolean & ModelWithInteger; 1382 + /** 1383 + * Message for 201 response 1384 + */ 1385 + 201: ModelWithString; 1386 + /** 1387 + * Message for 202 response 1388 + */ 1389 + 202: ModelWithString; 1390 + }; 1391 + 1392 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1393 + 1394 + export type CallWithResponsesErrors = { 1395 + /** 1396 + * Message for 500 error 1397 + */ 1398 + 500: ModelWithStringError; 1399 + /** 1400 + * Message for 501 error 1401 + */ 1402 + 501: ModelWithStringError; 1403 + /** 1404 + * Message for 502 error 1405 + */ 1406 + 502: ModelWithStringError; 1407 + /** 1408 + * Message for default response 1409 + */ 1410 + default: ModelWithStringError; 1411 + }; 1412 + 1413 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1414 + 1415 + export type CallWithResponsesResponses = { 1416 + /** 1417 + * Message for 200 response 1418 + */ 1419 + 200: { 1420 + readonly '@namespace.string'?: string; 1421 + readonly '@namespace.integer'?: number; 1422 + readonly value?: Array<ModelWithString>; 1423 + }; 1424 + /** 1425 + * Message for 201 response 1426 + */ 1427 + 201: ModelThatExtends; 1428 + /** 1429 + * Message for 202 response 1430 + */ 1431 + 202: ModelThatExtendsExtends; 1432 + }; 1281 1433 1282 - export type CallWithResponsesResponse = { 1283 - readonly '@namespace.string'?: string; 1284 - readonly '@namespace.integer'?: number; 1285 - readonly value?: Array<ModelWithString>; 1286 - } | ModelThatExtends | ModelThatExtendsExtends; 1434 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1287 1435 1288 1436 export type CollectionFormatData = { 1289 1437 body?: never; ··· 1352 1500 }; 1353 1501 }; 1354 1502 1355 - export type TypesResponse = number | string | boolean | {}; 1503 + export type TypesResponses = { 1504 + /** 1505 + * Response is a simple number 1506 + */ 1507 + 200: number; 1508 + /** 1509 + * Response is a simple string 1510 + */ 1511 + 201: string; 1512 + /** 1513 + * Response is a simple boolean 1514 + */ 1515 + 202: boolean; 1516 + /** 1517 + * Response is a simple object 1518 + */ 1519 + 203: {}; 1520 + }; 1521 + 1522 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1356 1523 1357 1524 export type UploadFileData = { 1358 1525 body: Blob | File; ··· 1365 1532 query?: never; 1366 1533 }; 1367 1534 1368 - export type UploadFileResponse = boolean; 1535 + export type UploadFileResponses = { 1536 + 200: boolean; 1537 + }; 1538 + 1539 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1369 1540 1370 1541 export type FileResponseData = { 1371 1542 body?: never; ··· 1379 1550 query?: never; 1380 1551 }; 1381 1552 1382 - export type FileResponseResponse = Blob | File; 1553 + export type FileResponseResponses = { 1554 + /** 1555 + * Success 1556 + */ 1557 + 200: Blob | File; 1558 + }; 1559 + 1560 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1383 1561 1384 1562 export type ComplexTypesData = { 1385 1563 body?: never; ··· 1402 1580 }; 1403 1581 }; 1404 1582 1405 - export type ComplexTypesResponse = Array<ModelWithString>; 1583 + export type ComplexTypesErrors = { 1584 + /** 1585 + * 400 `server` error 1586 + */ 1587 + 400: unknown; 1588 + /** 1589 + * 500 server error 1590 + */ 1591 + 500: unknown; 1592 + }; 1593 + 1594 + export type ComplexTypesResponses = { 1595 + /** 1596 + * Successful response 1597 + */ 1598 + 200: Array<ModelWithString>; 1599 + }; 1600 + 1601 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1406 1602 1407 - export type MultipartResponseResponse = { 1408 - file?: Blob | File; 1409 - metadata?: { 1410 - foo?: string; 1411 - bar?: string; 1603 + export type MultipartResponseResponses = { 1604 + /** 1605 + * OK 1606 + */ 1607 + 200: { 1608 + file?: Blob | File; 1609 + metadata?: { 1610 + foo?: string; 1611 + bar?: string; 1612 + }; 1412 1613 }; 1413 1614 }; 1615 + 1616 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1414 1617 1415 1618 export type MultipartRequestData = { 1416 1619 body?: { ··· 1443 1646 query?: never; 1444 1647 }; 1445 1648 1446 - export type ComplexParamsResponse = ModelWithString; 1649 + export type ComplexParamsResponses = { 1650 + /** 1651 + * Success 1652 + */ 1653 + 200: ModelWithString; 1654 + }; 1655 + 1656 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1657 + 1658 + export type CallWithResultFromHeaderErrors = { 1659 + /** 1660 + * 400 server error 1661 + */ 1662 + 400: unknown; 1663 + /** 1664 + * 500 server error 1665 + */ 1666 + 500: unknown; 1667 + }; 1668 + 1669 + export type CallWithResultFromHeaderResponses = { 1670 + /** 1671 + * Successful response 1672 + */ 1673 + 200: unknown; 1674 + }; 1447 1675 1448 1676 export type TestErrorCodeData = { 1449 1677 body?: never; ··· 1456 1684 }; 1457 1685 }; 1458 1686 1687 + export type TestErrorCodeErrors = { 1688 + /** 1689 + * Custom message: Internal Server Error 1690 + */ 1691 + 500: unknown; 1692 + /** 1693 + * Custom message: Not Implemented 1694 + */ 1695 + 501: unknown; 1696 + /** 1697 + * Custom message: Bad Gateway 1698 + */ 1699 + 502: unknown; 1700 + /** 1701 + * Custom message: Service Unavailable 1702 + */ 1703 + 503: unknown; 1704 + }; 1705 + 1706 + export type TestErrorCodeResponses = { 1707 + /** 1708 + * Custom message: Successful response 1709 + */ 1710 + 200: unknown; 1711 + }; 1712 + 1459 1713 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1460 1714 body?: never; 1461 1715 path?: never; ··· 1467 1721 }; 1468 1722 }; 1469 1723 1470 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1724 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1725 + /** 1726 + * Successful response 1727 + */ 1728 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1729 + }; 1730 + 1731 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1471 1732 1472 1733 export type PutWithFormUrlEncodedData = { 1473 1734 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/types.gen.ts
··· 951 951 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 952 952 }; 953 953 954 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 954 + export type ImportResponses = { 955 + /** 956 + * Success 957 + */ 958 + 200: Model_From_Zendesk; 959 + /** 960 + * Default success response 961 + */ 962 + default: ModelWithReadOnlyAndWriteOnly; 963 + }; 964 + 965 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 955 966 956 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 967 + export type ApiVversionOdataControllerCountResponses = { 968 + /** 969 + * Success 970 + */ 971 + 200: Model_From_Zendesk; 972 + }; 973 + 974 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 957 975 958 976 export type GetApiVbyApiVersionSimpleOperationData = { 959 977 body?: never; ··· 966 984 query?: never; 967 985 }; 968 986 969 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 987 + export type GetApiVbyApiVersionSimpleOperationErrors = { 988 + /** 989 + * Default error response 990 + */ 991 + default: ModelWithBoolean; 992 + }; 970 993 971 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 994 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 995 + 996 + export type GetApiVbyApiVersionSimpleOperationResponses = { 997 + /** 998 + * Response is a simple number 999 + */ 1000 + 200: number; 1001 + }; 1002 + 1003 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 972 1004 973 1005 export type DeleteFooData3 = { 974 1006 body?: never; ··· 1140 1172 }; 1141 1173 }; 1142 1174 1143 - export type PostCallWithOptionalParamResponse = number | void; 1175 + export type PostCallWithOptionalParamResponses = { 1176 + /** 1177 + * Response is a simple number 1178 + */ 1179 + 200: number; 1180 + /** 1181 + * Success 1182 + */ 1183 + 204: void; 1184 + }; 1185 + 1186 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1144 1187 1145 1188 export type PostApiVbyApiVersionRequestBodyData = { 1146 1189 /** ··· 1263 1306 }; 1264 1307 }; 1265 1308 1266 - export type CallWithNoContentResponseResponse = void; 1309 + export type CallWithNoContentResponseResponses = { 1310 + /** 1311 + * Success 1312 + */ 1313 + 204: void; 1314 + }; 1267 1315 1268 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1316 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1269 1317 1270 - export type DummyAResponse = _400; 1318 + export type CallWithResponseAndNoContentResponseResponses = { 1319 + /** 1320 + * Response is a simple number 1321 + */ 1322 + 200: number; 1323 + /** 1324 + * Success 1325 + */ 1326 + 204: void; 1327 + }; 1271 1328 1272 - export type DummyBResponse = void; 1329 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1273 1330 1274 - export type CallWithResponseResponse = _import; 1331 + export type DummyAResponses = { 1332 + 200: _400; 1333 + }; 1275 1334 1276 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1335 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1277 1336 1278 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1337 + export type DummyBResponses = { 1338 + /** 1339 + * Success 1340 + */ 1341 + 204: void; 1342 + }; 1343 + 1344 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1279 1345 1280 - export type CallWithResponsesError = ModelWithStringError; 1346 + export type CallWithResponseResponses = { 1347 + default: _import; 1348 + }; 1349 + 1350 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1351 + 1352 + export type CallWithDuplicateResponsesErrors = { 1353 + /** 1354 + * Message for 500 error 1355 + */ 1356 + 500: ModelWithStringError; 1357 + /** 1358 + * Message for 501 error 1359 + */ 1360 + 501: ModelWithStringError; 1361 + /** 1362 + * Message for 502 error 1363 + */ 1364 + 502: ModelWithStringError; 1365 + /** 1366 + * Message for 4XX errors 1367 + */ 1368 + '4XX': DictionaryWithArray; 1369 + /** 1370 + * Default error response 1371 + */ 1372 + default: ModelWithBoolean; 1373 + }; 1374 + 1375 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1376 + 1377 + export type CallWithDuplicateResponsesResponses = { 1378 + /** 1379 + * Message for 200 response 1380 + */ 1381 + 200: ModelWithBoolean & ModelWithInteger; 1382 + /** 1383 + * Message for 201 response 1384 + */ 1385 + 201: ModelWithString; 1386 + /** 1387 + * Message for 202 response 1388 + */ 1389 + 202: ModelWithString; 1390 + }; 1391 + 1392 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1393 + 1394 + export type CallWithResponsesErrors = { 1395 + /** 1396 + * Message for 500 error 1397 + */ 1398 + 500: ModelWithStringError; 1399 + /** 1400 + * Message for 501 error 1401 + */ 1402 + 501: ModelWithStringError; 1403 + /** 1404 + * Message for 502 error 1405 + */ 1406 + 502: ModelWithStringError; 1407 + /** 1408 + * Message for default response 1409 + */ 1410 + default: ModelWithStringError; 1411 + }; 1412 + 1413 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1414 + 1415 + export type CallWithResponsesResponses = { 1416 + /** 1417 + * Message for 200 response 1418 + */ 1419 + 200: { 1420 + readonly '@namespace.string'?: string; 1421 + readonly '@namespace.integer'?: number; 1422 + readonly value?: Array<ModelWithString>; 1423 + }; 1424 + /** 1425 + * Message for 201 response 1426 + */ 1427 + 201: ModelThatExtends; 1428 + /** 1429 + * Message for 202 response 1430 + */ 1431 + 202: ModelThatExtendsExtends; 1432 + }; 1281 1433 1282 - export type CallWithResponsesResponse = { 1283 - readonly '@namespace.string'?: string; 1284 - readonly '@namespace.integer'?: number; 1285 - readonly value?: Array<ModelWithString>; 1286 - } | ModelThatExtends | ModelThatExtendsExtends; 1434 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1287 1435 1288 1436 export type CollectionFormatData = { 1289 1437 body?: never; ··· 1352 1500 }; 1353 1501 }; 1354 1502 1355 - export type TypesResponse = number | string | boolean | {}; 1503 + export type TypesResponses = { 1504 + /** 1505 + * Response is a simple number 1506 + */ 1507 + 200: number; 1508 + /** 1509 + * Response is a simple string 1510 + */ 1511 + 201: string; 1512 + /** 1513 + * Response is a simple boolean 1514 + */ 1515 + 202: boolean; 1516 + /** 1517 + * Response is a simple object 1518 + */ 1519 + 203: {}; 1520 + }; 1521 + 1522 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1356 1523 1357 1524 export type UploadFileData = { 1358 1525 body: Blob | File; ··· 1365 1532 query?: never; 1366 1533 }; 1367 1534 1368 - export type UploadFileResponse = boolean; 1535 + export type UploadFileResponses = { 1536 + 200: boolean; 1537 + }; 1538 + 1539 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1369 1540 1370 1541 export type FileResponseData = { 1371 1542 body?: never; ··· 1379 1550 query?: never; 1380 1551 }; 1381 1552 1382 - export type FileResponseResponse = Blob | File; 1553 + export type FileResponseResponses = { 1554 + /** 1555 + * Success 1556 + */ 1557 + 200: Blob | File; 1558 + }; 1559 + 1560 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1383 1561 1384 1562 export type ComplexTypesData = { 1385 1563 body?: never; ··· 1402 1580 }; 1403 1581 }; 1404 1582 1405 - export type ComplexTypesResponse = Array<ModelWithString>; 1583 + export type ComplexTypesErrors = { 1584 + /** 1585 + * 400 `server` error 1586 + */ 1587 + 400: unknown; 1588 + /** 1589 + * 500 server error 1590 + */ 1591 + 500: unknown; 1592 + }; 1593 + 1594 + export type ComplexTypesResponses = { 1595 + /** 1596 + * Successful response 1597 + */ 1598 + 200: Array<ModelWithString>; 1599 + }; 1600 + 1601 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1406 1602 1407 - export type MultipartResponseResponse = { 1408 - file?: Blob | File; 1409 - metadata?: { 1410 - foo?: string; 1411 - bar?: string; 1603 + export type MultipartResponseResponses = { 1604 + /** 1605 + * OK 1606 + */ 1607 + 200: { 1608 + file?: Blob | File; 1609 + metadata?: { 1610 + foo?: string; 1611 + bar?: string; 1612 + }; 1412 1613 }; 1413 1614 }; 1615 + 1616 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1414 1617 1415 1618 export type MultipartRequestData = { 1416 1619 body?: { ··· 1443 1646 query?: never; 1444 1647 }; 1445 1648 1446 - export type ComplexParamsResponse = ModelWithString; 1649 + export type ComplexParamsResponses = { 1650 + /** 1651 + * Success 1652 + */ 1653 + 200: ModelWithString; 1654 + }; 1655 + 1656 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1657 + 1658 + export type CallWithResultFromHeaderErrors = { 1659 + /** 1660 + * 400 server error 1661 + */ 1662 + 400: unknown; 1663 + /** 1664 + * 500 server error 1665 + */ 1666 + 500: unknown; 1667 + }; 1668 + 1669 + export type CallWithResultFromHeaderResponses = { 1670 + /** 1671 + * Successful response 1672 + */ 1673 + 200: unknown; 1674 + }; 1447 1675 1448 1676 export type TestErrorCodeData = { 1449 1677 body?: never; ··· 1456 1684 }; 1457 1685 }; 1458 1686 1687 + export type TestErrorCodeErrors = { 1688 + /** 1689 + * Custom message: Internal Server Error 1690 + */ 1691 + 500: unknown; 1692 + /** 1693 + * Custom message: Not Implemented 1694 + */ 1695 + 501: unknown; 1696 + /** 1697 + * Custom message: Bad Gateway 1698 + */ 1699 + 502: unknown; 1700 + /** 1701 + * Custom message: Service Unavailable 1702 + */ 1703 + 503: unknown; 1704 + }; 1705 + 1706 + export type TestErrorCodeResponses = { 1707 + /** 1708 + * Custom message: Successful response 1709 + */ 1710 + 200: unknown; 1711 + }; 1712 + 1459 1713 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1460 1714 body?: never; 1461 1715 path?: never; ··· 1467 1721 }; 1468 1722 }; 1469 1723 1470 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1724 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1725 + /** 1726 + * Successful response 1727 + */ 1728 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1729 + }; 1730 + 1731 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1471 1732 1472 1733 export type PutWithFormUrlEncodedData = { 1473 1734 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/types.gen.ts
··· 951 951 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 952 952 }; 953 953 954 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 954 + export type ImportResponses = { 955 + /** 956 + * Success 957 + */ 958 + 200: Model_From_Zendesk; 959 + /** 960 + * Default success response 961 + */ 962 + default: ModelWithReadOnlyAndWriteOnly; 963 + }; 964 + 965 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 955 966 956 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 967 + export type ApiVversionOdataControllerCountResponses = { 968 + /** 969 + * Success 970 + */ 971 + 200: Model_From_Zendesk; 972 + }; 973 + 974 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 957 975 958 976 export type GetApiVbyApiVersionSimpleOperationData = { 959 977 body?: never; ··· 966 984 query?: never; 967 985 }; 968 986 969 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 987 + export type GetApiVbyApiVersionSimpleOperationErrors = { 988 + /** 989 + * Default error response 990 + */ 991 + default: ModelWithBoolean; 992 + }; 970 993 971 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 994 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 995 + 996 + export type GetApiVbyApiVersionSimpleOperationResponses = { 997 + /** 998 + * Response is a simple number 999 + */ 1000 + 200: number; 1001 + }; 1002 + 1003 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 972 1004 973 1005 export type DeleteFooData3 = { 974 1006 body?: never; ··· 1140 1172 }; 1141 1173 }; 1142 1174 1143 - export type PostCallWithOptionalParamResponse = number | void; 1175 + export type PostCallWithOptionalParamResponses = { 1176 + /** 1177 + * Response is a simple number 1178 + */ 1179 + 200: number; 1180 + /** 1181 + * Success 1182 + */ 1183 + 204: void; 1184 + }; 1185 + 1186 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1144 1187 1145 1188 export type PostApiVbyApiVersionRequestBodyData = { 1146 1189 /** ··· 1263 1306 }; 1264 1307 }; 1265 1308 1266 - export type CallWithNoContentResponseResponse = void; 1309 + export type CallWithNoContentResponseResponses = { 1310 + /** 1311 + * Success 1312 + */ 1313 + 204: void; 1314 + }; 1267 1315 1268 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1316 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1269 1317 1270 - export type DummyAResponse = _400; 1318 + export type CallWithResponseAndNoContentResponseResponses = { 1319 + /** 1320 + * Response is a simple number 1321 + */ 1322 + 200: number; 1323 + /** 1324 + * Success 1325 + */ 1326 + 204: void; 1327 + }; 1271 1328 1272 - export type DummyBResponse = void; 1329 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1273 1330 1274 - export type CallWithResponseResponse = _import; 1331 + export type DummyAResponses = { 1332 + 200: _400; 1333 + }; 1275 1334 1276 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1335 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1277 1336 1278 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1337 + export type DummyBResponses = { 1338 + /** 1339 + * Success 1340 + */ 1341 + 204: void; 1342 + }; 1343 + 1344 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1279 1345 1280 - export type CallWithResponsesError = ModelWithStringError; 1346 + export type CallWithResponseResponses = { 1347 + default: _import; 1348 + }; 1349 + 1350 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1351 + 1352 + export type CallWithDuplicateResponsesErrors = { 1353 + /** 1354 + * Message for 500 error 1355 + */ 1356 + 500: ModelWithStringError; 1357 + /** 1358 + * Message for 501 error 1359 + */ 1360 + 501: ModelWithStringError; 1361 + /** 1362 + * Message for 502 error 1363 + */ 1364 + 502: ModelWithStringError; 1365 + /** 1366 + * Message for 4XX errors 1367 + */ 1368 + '4XX': DictionaryWithArray; 1369 + /** 1370 + * Default error response 1371 + */ 1372 + default: ModelWithBoolean; 1373 + }; 1374 + 1375 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1376 + 1377 + export type CallWithDuplicateResponsesResponses = { 1378 + /** 1379 + * Message for 200 response 1380 + */ 1381 + 200: ModelWithBoolean & ModelWithInteger; 1382 + /** 1383 + * Message for 201 response 1384 + */ 1385 + 201: ModelWithString; 1386 + /** 1387 + * Message for 202 response 1388 + */ 1389 + 202: ModelWithString; 1390 + }; 1391 + 1392 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1393 + 1394 + export type CallWithResponsesErrors = { 1395 + /** 1396 + * Message for 500 error 1397 + */ 1398 + 500: ModelWithStringError; 1399 + /** 1400 + * Message for 501 error 1401 + */ 1402 + 501: ModelWithStringError; 1403 + /** 1404 + * Message for 502 error 1405 + */ 1406 + 502: ModelWithStringError; 1407 + /** 1408 + * Message for default response 1409 + */ 1410 + default: ModelWithStringError; 1411 + }; 1412 + 1413 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1414 + 1415 + export type CallWithResponsesResponses = { 1416 + /** 1417 + * Message for 200 response 1418 + */ 1419 + 200: { 1420 + readonly '@namespace.string'?: string; 1421 + readonly '@namespace.integer'?: number; 1422 + readonly value?: Array<ModelWithString>; 1423 + }; 1424 + /** 1425 + * Message for 201 response 1426 + */ 1427 + 201: ModelThatExtends; 1428 + /** 1429 + * Message for 202 response 1430 + */ 1431 + 202: ModelThatExtendsExtends; 1432 + }; 1281 1433 1282 - export type CallWithResponsesResponse = { 1283 - readonly '@namespace.string'?: string; 1284 - readonly '@namespace.integer'?: number; 1285 - readonly value?: Array<ModelWithString>; 1286 - } | ModelThatExtends | ModelThatExtendsExtends; 1434 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1287 1435 1288 1436 export type CollectionFormatData = { 1289 1437 body?: never; ··· 1352 1500 }; 1353 1501 }; 1354 1502 1355 - export type TypesResponse = number | string | boolean | {}; 1503 + export type TypesResponses = { 1504 + /** 1505 + * Response is a simple number 1506 + */ 1507 + 200: number; 1508 + /** 1509 + * Response is a simple string 1510 + */ 1511 + 201: string; 1512 + /** 1513 + * Response is a simple boolean 1514 + */ 1515 + 202: boolean; 1516 + /** 1517 + * Response is a simple object 1518 + */ 1519 + 203: {}; 1520 + }; 1521 + 1522 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1356 1523 1357 1524 export type UploadFileData = { 1358 1525 body: Blob | File; ··· 1365 1532 query?: never; 1366 1533 }; 1367 1534 1368 - export type UploadFileResponse = boolean; 1535 + export type UploadFileResponses = { 1536 + 200: boolean; 1537 + }; 1538 + 1539 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1369 1540 1370 1541 export type FileResponseData = { 1371 1542 body?: never; ··· 1379 1550 query?: never; 1380 1551 }; 1381 1552 1382 - export type FileResponseResponse = Blob | File; 1553 + export type FileResponseResponses = { 1554 + /** 1555 + * Success 1556 + */ 1557 + 200: Blob | File; 1558 + }; 1559 + 1560 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1383 1561 1384 1562 export type ComplexTypesData = { 1385 1563 body?: never; ··· 1402 1580 }; 1403 1581 }; 1404 1582 1405 - export type ComplexTypesResponse = Array<ModelWithString>; 1583 + export type ComplexTypesErrors = { 1584 + /** 1585 + * 400 `server` error 1586 + */ 1587 + 400: unknown; 1588 + /** 1589 + * 500 server error 1590 + */ 1591 + 500: unknown; 1592 + }; 1593 + 1594 + export type ComplexTypesResponses = { 1595 + /** 1596 + * Successful response 1597 + */ 1598 + 200: Array<ModelWithString>; 1599 + }; 1600 + 1601 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1406 1602 1407 - export type MultipartResponseResponse = { 1408 - file?: Blob | File; 1409 - metadata?: { 1410 - foo?: string; 1411 - bar?: string; 1603 + export type MultipartResponseResponses = { 1604 + /** 1605 + * OK 1606 + */ 1607 + 200: { 1608 + file?: Blob | File; 1609 + metadata?: { 1610 + foo?: string; 1611 + bar?: string; 1612 + }; 1412 1613 }; 1413 1614 }; 1615 + 1616 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1414 1617 1415 1618 export type MultipartRequestData = { 1416 1619 body?: { ··· 1443 1646 query?: never; 1444 1647 }; 1445 1648 1446 - export type ComplexParamsResponse = ModelWithString; 1649 + export type ComplexParamsResponses = { 1650 + /** 1651 + * Success 1652 + */ 1653 + 200: ModelWithString; 1654 + }; 1655 + 1656 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1657 + 1658 + export type CallWithResultFromHeaderErrors = { 1659 + /** 1660 + * 400 server error 1661 + */ 1662 + 400: unknown; 1663 + /** 1664 + * 500 server error 1665 + */ 1666 + 500: unknown; 1667 + }; 1668 + 1669 + export type CallWithResultFromHeaderResponses = { 1670 + /** 1671 + * Successful response 1672 + */ 1673 + 200: unknown; 1674 + }; 1447 1675 1448 1676 export type TestErrorCodeData = { 1449 1677 body?: never; ··· 1456 1684 }; 1457 1685 }; 1458 1686 1687 + export type TestErrorCodeErrors = { 1688 + /** 1689 + * Custom message: Internal Server Error 1690 + */ 1691 + 500: unknown; 1692 + /** 1693 + * Custom message: Not Implemented 1694 + */ 1695 + 501: unknown; 1696 + /** 1697 + * Custom message: Bad Gateway 1698 + */ 1699 + 502: unknown; 1700 + /** 1701 + * Custom message: Service Unavailable 1702 + */ 1703 + 503: unknown; 1704 + }; 1705 + 1706 + export type TestErrorCodeResponses = { 1707 + /** 1708 + * Custom message: Successful response 1709 + */ 1710 + 200: unknown; 1711 + }; 1712 + 1459 1713 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1460 1714 body?: never; 1461 1715 path?: never; ··· 1467 1721 }; 1468 1722 }; 1469 1723 1470 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1724 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1725 + /** 1726 + * Successful response 1727 + */ 1728 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1729 + }; 1730 + 1731 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1471 1732 1472 1733 export type PutWithFormUrlEncodedData = { 1473 1734 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/types.gen.ts
··· 951 951 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 952 952 }; 953 953 954 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 954 + export type ImportResponses = { 955 + /** 956 + * Success 957 + */ 958 + 200: Model_From_Zendesk; 959 + /** 960 + * Default success response 961 + */ 962 + default: ModelWithReadOnlyAndWriteOnly; 963 + }; 964 + 965 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 955 966 956 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 967 + export type ApiVversionOdataControllerCountResponses = { 968 + /** 969 + * Success 970 + */ 971 + 200: Model_From_Zendesk; 972 + }; 973 + 974 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 957 975 958 976 export type GetApiVbyApiVersionSimpleOperationData = { 959 977 body?: never; ··· 966 984 query?: never; 967 985 }; 968 986 969 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 987 + export type GetApiVbyApiVersionSimpleOperationErrors = { 988 + /** 989 + * Default error response 990 + */ 991 + default: ModelWithBoolean; 992 + }; 970 993 971 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 994 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 995 + 996 + export type GetApiVbyApiVersionSimpleOperationResponses = { 997 + /** 998 + * Response is a simple number 999 + */ 1000 + 200: number; 1001 + }; 1002 + 1003 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 972 1004 973 1005 export type DeleteFooData3 = { 974 1006 body?: never; ··· 1140 1172 }; 1141 1173 }; 1142 1174 1143 - export type PostCallWithOptionalParamResponse = number | void; 1175 + export type PostCallWithOptionalParamResponses = { 1176 + /** 1177 + * Response is a simple number 1178 + */ 1179 + 200: number; 1180 + /** 1181 + * Success 1182 + */ 1183 + 204: void; 1184 + }; 1185 + 1186 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1144 1187 1145 1188 export type PostApiVbyApiVersionRequestBodyData = { 1146 1189 /** ··· 1263 1306 }; 1264 1307 }; 1265 1308 1266 - export type CallWithNoContentResponseResponse = void; 1309 + export type CallWithNoContentResponseResponses = { 1310 + /** 1311 + * Success 1312 + */ 1313 + 204: void; 1314 + }; 1267 1315 1268 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1316 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1269 1317 1270 - export type DummyAResponse = _400; 1318 + export type CallWithResponseAndNoContentResponseResponses = { 1319 + /** 1320 + * Response is a simple number 1321 + */ 1322 + 200: number; 1323 + /** 1324 + * Success 1325 + */ 1326 + 204: void; 1327 + }; 1271 1328 1272 - export type DummyBResponse = void; 1329 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1273 1330 1274 - export type CallWithResponseResponse = _import; 1331 + export type DummyAResponses = { 1332 + 200: _400; 1333 + }; 1275 1334 1276 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1335 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1277 1336 1278 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1337 + export type DummyBResponses = { 1338 + /** 1339 + * Success 1340 + */ 1341 + 204: void; 1342 + }; 1343 + 1344 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1279 1345 1280 - export type CallWithResponsesError = ModelWithStringError; 1346 + export type CallWithResponseResponses = { 1347 + default: _import; 1348 + }; 1349 + 1350 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1351 + 1352 + export type CallWithDuplicateResponsesErrors = { 1353 + /** 1354 + * Message for 500 error 1355 + */ 1356 + 500: ModelWithStringError; 1357 + /** 1358 + * Message for 501 error 1359 + */ 1360 + 501: ModelWithStringError; 1361 + /** 1362 + * Message for 502 error 1363 + */ 1364 + 502: ModelWithStringError; 1365 + /** 1366 + * Message for 4XX errors 1367 + */ 1368 + '4XX': DictionaryWithArray; 1369 + /** 1370 + * Default error response 1371 + */ 1372 + default: ModelWithBoolean; 1373 + }; 1374 + 1375 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1376 + 1377 + export type CallWithDuplicateResponsesResponses = { 1378 + /** 1379 + * Message for 200 response 1380 + */ 1381 + 200: ModelWithBoolean & ModelWithInteger; 1382 + /** 1383 + * Message for 201 response 1384 + */ 1385 + 201: ModelWithString; 1386 + /** 1387 + * Message for 202 response 1388 + */ 1389 + 202: ModelWithString; 1390 + }; 1391 + 1392 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1393 + 1394 + export type CallWithResponsesErrors = { 1395 + /** 1396 + * Message for 500 error 1397 + */ 1398 + 500: ModelWithStringError; 1399 + /** 1400 + * Message for 501 error 1401 + */ 1402 + 501: ModelWithStringError; 1403 + /** 1404 + * Message for 502 error 1405 + */ 1406 + 502: ModelWithStringError; 1407 + /** 1408 + * Message for default response 1409 + */ 1410 + default: ModelWithStringError; 1411 + }; 1412 + 1413 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1414 + 1415 + export type CallWithResponsesResponses = { 1416 + /** 1417 + * Message for 200 response 1418 + */ 1419 + 200: { 1420 + readonly '@namespace.string'?: string; 1421 + readonly '@namespace.integer'?: number; 1422 + readonly value?: Array<ModelWithString>; 1423 + }; 1424 + /** 1425 + * Message for 201 response 1426 + */ 1427 + 201: ModelThatExtends; 1428 + /** 1429 + * Message for 202 response 1430 + */ 1431 + 202: ModelThatExtendsExtends; 1432 + }; 1281 1433 1282 - export type CallWithResponsesResponse = { 1283 - readonly '@namespace.string'?: string; 1284 - readonly '@namespace.integer'?: number; 1285 - readonly value?: Array<ModelWithString>; 1286 - } | ModelThatExtends | ModelThatExtendsExtends; 1434 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1287 1435 1288 1436 export type CollectionFormatData = { 1289 1437 body?: never; ··· 1352 1500 }; 1353 1501 }; 1354 1502 1355 - export type TypesResponse = number | string | boolean | {}; 1503 + export type TypesResponses = { 1504 + /** 1505 + * Response is a simple number 1506 + */ 1507 + 200: number; 1508 + /** 1509 + * Response is a simple string 1510 + */ 1511 + 201: string; 1512 + /** 1513 + * Response is a simple boolean 1514 + */ 1515 + 202: boolean; 1516 + /** 1517 + * Response is a simple object 1518 + */ 1519 + 203: {}; 1520 + }; 1521 + 1522 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1356 1523 1357 1524 export type UploadFileData = { 1358 1525 body: Blob | File; ··· 1365 1532 query?: never; 1366 1533 }; 1367 1534 1368 - export type UploadFileResponse = boolean; 1535 + export type UploadFileResponses = { 1536 + 200: boolean; 1537 + }; 1538 + 1539 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1369 1540 1370 1541 export type FileResponseData = { 1371 1542 body?: never; ··· 1379 1550 query?: never; 1380 1551 }; 1381 1552 1382 - export type FileResponseResponse = Blob | File; 1553 + export type FileResponseResponses = { 1554 + /** 1555 + * Success 1556 + */ 1557 + 200: Blob | File; 1558 + }; 1559 + 1560 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1383 1561 1384 1562 export type ComplexTypesData = { 1385 1563 body?: never; ··· 1402 1580 }; 1403 1581 }; 1404 1582 1405 - export type ComplexTypesResponse = Array<ModelWithString>; 1583 + export type ComplexTypesErrors = { 1584 + /** 1585 + * 400 `server` error 1586 + */ 1587 + 400: unknown; 1588 + /** 1589 + * 500 server error 1590 + */ 1591 + 500: unknown; 1592 + }; 1593 + 1594 + export type ComplexTypesResponses = { 1595 + /** 1596 + * Successful response 1597 + */ 1598 + 200: Array<ModelWithString>; 1599 + }; 1600 + 1601 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1406 1602 1407 - export type MultipartResponseResponse = { 1408 - file?: Blob | File; 1409 - metadata?: { 1410 - foo?: string; 1411 - bar?: string; 1603 + export type MultipartResponseResponses = { 1604 + /** 1605 + * OK 1606 + */ 1607 + 200: { 1608 + file?: Blob | File; 1609 + metadata?: { 1610 + foo?: string; 1611 + bar?: string; 1612 + }; 1412 1613 }; 1413 1614 }; 1615 + 1616 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1414 1617 1415 1618 export type MultipartRequestData = { 1416 1619 body?: { ··· 1443 1646 query?: never; 1444 1647 }; 1445 1648 1446 - export type ComplexParamsResponse = ModelWithString; 1649 + export type ComplexParamsResponses = { 1650 + /** 1651 + * Success 1652 + */ 1653 + 200: ModelWithString; 1654 + }; 1655 + 1656 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1657 + 1658 + export type CallWithResultFromHeaderErrors = { 1659 + /** 1660 + * 400 server error 1661 + */ 1662 + 400: unknown; 1663 + /** 1664 + * 500 server error 1665 + */ 1666 + 500: unknown; 1667 + }; 1668 + 1669 + export type CallWithResultFromHeaderResponses = { 1670 + /** 1671 + * Successful response 1672 + */ 1673 + 200: unknown; 1674 + }; 1447 1675 1448 1676 export type TestErrorCodeData = { 1449 1677 body?: never; ··· 1456 1684 }; 1457 1685 }; 1458 1686 1687 + export type TestErrorCodeErrors = { 1688 + /** 1689 + * Custom message: Internal Server Error 1690 + */ 1691 + 500: unknown; 1692 + /** 1693 + * Custom message: Not Implemented 1694 + */ 1695 + 501: unknown; 1696 + /** 1697 + * Custom message: Bad Gateway 1698 + */ 1699 + 502: unknown; 1700 + /** 1701 + * Custom message: Service Unavailable 1702 + */ 1703 + 503: unknown; 1704 + }; 1705 + 1706 + export type TestErrorCodeResponses = { 1707 + /** 1708 + * Custom message: Successful response 1709 + */ 1710 + 200: unknown; 1711 + }; 1712 + 1459 1713 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1460 1714 body?: never; 1461 1715 path?: never; ··· 1467 1721 }; 1468 1722 }; 1469 1723 1470 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1724 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1725 + /** 1726 + * Successful response 1727 + */ 1728 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1729 + }; 1730 + 1731 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1471 1732 1472 1733 export type PutWithFormUrlEncodedData = { 1473 1734 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/types.gen.ts
··· 951 951 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 952 952 }; 953 953 954 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 954 + export type ImportResponses = { 955 + /** 956 + * Success 957 + */ 958 + 200: Model_From_Zendesk; 959 + /** 960 + * Default success response 961 + */ 962 + default: ModelWithReadOnlyAndWriteOnly; 963 + }; 964 + 965 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 955 966 956 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 967 + export type ApiVversionOdataControllerCountResponses = { 968 + /** 969 + * Success 970 + */ 971 + 200: Model_From_Zendesk; 972 + }; 973 + 974 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 957 975 958 976 export type GetApiVbyApiVersionSimpleOperationData = { 959 977 body?: never; ··· 966 984 query?: never; 967 985 }; 968 986 969 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 987 + export type GetApiVbyApiVersionSimpleOperationErrors = { 988 + /** 989 + * Default error response 990 + */ 991 + default: ModelWithBoolean; 992 + }; 970 993 971 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 994 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 995 + 996 + export type GetApiVbyApiVersionSimpleOperationResponses = { 997 + /** 998 + * Response is a simple number 999 + */ 1000 + 200: number; 1001 + }; 1002 + 1003 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 972 1004 973 1005 export type DeleteFooData3 = { 974 1006 body?: never; ··· 1140 1172 }; 1141 1173 }; 1142 1174 1143 - export type PostCallWithOptionalParamResponse = number | void; 1175 + export type PostCallWithOptionalParamResponses = { 1176 + /** 1177 + * Response is a simple number 1178 + */ 1179 + 200: number; 1180 + /** 1181 + * Success 1182 + */ 1183 + 204: void; 1184 + }; 1185 + 1186 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1144 1187 1145 1188 export type PostApiVbyApiVersionRequestBodyData = { 1146 1189 /** ··· 1263 1306 }; 1264 1307 }; 1265 1308 1266 - export type CallWithNoContentResponseResponse = void; 1309 + export type CallWithNoContentResponseResponses = { 1310 + /** 1311 + * Success 1312 + */ 1313 + 204: void; 1314 + }; 1267 1315 1268 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1316 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1269 1317 1270 - export type DummyAResponse = _400; 1318 + export type CallWithResponseAndNoContentResponseResponses = { 1319 + /** 1320 + * Response is a simple number 1321 + */ 1322 + 200: number; 1323 + /** 1324 + * Success 1325 + */ 1326 + 204: void; 1327 + }; 1271 1328 1272 - export type DummyBResponse = void; 1329 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1273 1330 1274 - export type CallWithResponseResponse = _import; 1331 + export type DummyAResponses = { 1332 + 200: _400; 1333 + }; 1275 1334 1276 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1335 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1277 1336 1278 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1337 + export type DummyBResponses = { 1338 + /** 1339 + * Success 1340 + */ 1341 + 204: void; 1342 + }; 1343 + 1344 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1279 1345 1280 - export type CallWithResponsesError = ModelWithStringError; 1346 + export type CallWithResponseResponses = { 1347 + default: _import; 1348 + }; 1349 + 1350 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1351 + 1352 + export type CallWithDuplicateResponsesErrors = { 1353 + /** 1354 + * Message for 500 error 1355 + */ 1356 + 500: ModelWithStringError; 1357 + /** 1358 + * Message for 501 error 1359 + */ 1360 + 501: ModelWithStringError; 1361 + /** 1362 + * Message for 502 error 1363 + */ 1364 + 502: ModelWithStringError; 1365 + /** 1366 + * Message for 4XX errors 1367 + */ 1368 + '4XX': DictionaryWithArray; 1369 + /** 1370 + * Default error response 1371 + */ 1372 + default: ModelWithBoolean; 1373 + }; 1374 + 1375 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1376 + 1377 + export type CallWithDuplicateResponsesResponses = { 1378 + /** 1379 + * Message for 200 response 1380 + */ 1381 + 200: ModelWithBoolean & ModelWithInteger; 1382 + /** 1383 + * Message for 201 response 1384 + */ 1385 + 201: ModelWithString; 1386 + /** 1387 + * Message for 202 response 1388 + */ 1389 + 202: ModelWithString; 1390 + }; 1391 + 1392 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1393 + 1394 + export type CallWithResponsesErrors = { 1395 + /** 1396 + * Message for 500 error 1397 + */ 1398 + 500: ModelWithStringError; 1399 + /** 1400 + * Message for 501 error 1401 + */ 1402 + 501: ModelWithStringError; 1403 + /** 1404 + * Message for 502 error 1405 + */ 1406 + 502: ModelWithStringError; 1407 + /** 1408 + * Message for default response 1409 + */ 1410 + default: ModelWithStringError; 1411 + }; 1412 + 1413 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1414 + 1415 + export type CallWithResponsesResponses = { 1416 + /** 1417 + * Message for 200 response 1418 + */ 1419 + 200: { 1420 + readonly '@namespace.string'?: string; 1421 + readonly '@namespace.integer'?: number; 1422 + readonly value?: Array<ModelWithString>; 1423 + }; 1424 + /** 1425 + * Message for 201 response 1426 + */ 1427 + 201: ModelThatExtends; 1428 + /** 1429 + * Message for 202 response 1430 + */ 1431 + 202: ModelThatExtendsExtends; 1432 + }; 1281 1433 1282 - export type CallWithResponsesResponse = { 1283 - readonly '@namespace.string'?: string; 1284 - readonly '@namespace.integer'?: number; 1285 - readonly value?: Array<ModelWithString>; 1286 - } | ModelThatExtends | ModelThatExtendsExtends; 1434 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1287 1435 1288 1436 export type CollectionFormatData = { 1289 1437 body?: never; ··· 1352 1500 }; 1353 1501 }; 1354 1502 1355 - export type TypesResponse = number | string | boolean | {}; 1503 + export type TypesResponses = { 1504 + /** 1505 + * Response is a simple number 1506 + */ 1507 + 200: number; 1508 + /** 1509 + * Response is a simple string 1510 + */ 1511 + 201: string; 1512 + /** 1513 + * Response is a simple boolean 1514 + */ 1515 + 202: boolean; 1516 + /** 1517 + * Response is a simple object 1518 + */ 1519 + 203: {}; 1520 + }; 1521 + 1522 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1356 1523 1357 1524 export type UploadFileData = { 1358 1525 body: Blob | File; ··· 1365 1532 query?: never; 1366 1533 }; 1367 1534 1368 - export type UploadFileResponse = boolean; 1535 + export type UploadFileResponses = { 1536 + 200: boolean; 1537 + }; 1538 + 1539 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1369 1540 1370 1541 export type FileResponseData = { 1371 1542 body?: never; ··· 1379 1550 query?: never; 1380 1551 }; 1381 1552 1382 - export type FileResponseResponse = Blob | File; 1553 + export type FileResponseResponses = { 1554 + /** 1555 + * Success 1556 + */ 1557 + 200: Blob | File; 1558 + }; 1559 + 1560 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1383 1561 1384 1562 export type ComplexTypesData = { 1385 1563 body?: never; ··· 1402 1580 }; 1403 1581 }; 1404 1582 1405 - export type ComplexTypesResponse = Array<ModelWithString>; 1583 + export type ComplexTypesErrors = { 1584 + /** 1585 + * 400 `server` error 1586 + */ 1587 + 400: unknown; 1588 + /** 1589 + * 500 server error 1590 + */ 1591 + 500: unknown; 1592 + }; 1593 + 1594 + export type ComplexTypesResponses = { 1595 + /** 1596 + * Successful response 1597 + */ 1598 + 200: Array<ModelWithString>; 1599 + }; 1600 + 1601 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1406 1602 1407 - export type MultipartResponseResponse = { 1408 - file?: Blob | File; 1409 - metadata?: { 1410 - foo?: string; 1411 - bar?: string; 1603 + export type MultipartResponseResponses = { 1604 + /** 1605 + * OK 1606 + */ 1607 + 200: { 1608 + file?: Blob | File; 1609 + metadata?: { 1610 + foo?: string; 1611 + bar?: string; 1612 + }; 1412 1613 }; 1413 1614 }; 1615 + 1616 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1414 1617 1415 1618 export type MultipartRequestData = { 1416 1619 body?: { ··· 1443 1646 query?: never; 1444 1647 }; 1445 1648 1446 - export type ComplexParamsResponse = ModelWithString; 1649 + export type ComplexParamsResponses = { 1650 + /** 1651 + * Success 1652 + */ 1653 + 200: ModelWithString; 1654 + }; 1655 + 1656 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1657 + 1658 + export type CallWithResultFromHeaderErrors = { 1659 + /** 1660 + * 400 server error 1661 + */ 1662 + 400: unknown; 1663 + /** 1664 + * 500 server error 1665 + */ 1666 + 500: unknown; 1667 + }; 1668 + 1669 + export type CallWithResultFromHeaderResponses = { 1670 + /** 1671 + * Successful response 1672 + */ 1673 + 200: unknown; 1674 + }; 1447 1675 1448 1676 export type TestErrorCodeData = { 1449 1677 body?: never; ··· 1456 1684 }; 1457 1685 }; 1458 1686 1687 + export type TestErrorCodeErrors = { 1688 + /** 1689 + * Custom message: Internal Server Error 1690 + */ 1691 + 500: unknown; 1692 + /** 1693 + * Custom message: Not Implemented 1694 + */ 1695 + 501: unknown; 1696 + /** 1697 + * Custom message: Bad Gateway 1698 + */ 1699 + 502: unknown; 1700 + /** 1701 + * Custom message: Service Unavailable 1702 + */ 1703 + 503: unknown; 1704 + }; 1705 + 1706 + export type TestErrorCodeResponses = { 1707 + /** 1708 + * Custom message: Successful response 1709 + */ 1710 + 200: unknown; 1711 + }; 1712 + 1459 1713 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1460 1714 body?: never; 1461 1715 path?: never; ··· 1467 1721 }; 1468 1722 }; 1469 1723 1470 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1724 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1725 + /** 1726 + * Successful response 1727 + */ 1728 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1729 + }; 1730 + 1731 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1471 1732 1472 1733 export type PutWithFormUrlEncodedData = { 1473 1734 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/types.gen.ts
··· 951 951 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 952 952 }; 953 953 954 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 954 + export type ImportResponses = { 955 + /** 956 + * Success 957 + */ 958 + 200: Model_From_Zendesk; 959 + /** 960 + * Default success response 961 + */ 962 + default: ModelWithReadOnlyAndWriteOnly; 963 + }; 964 + 965 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 955 966 956 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 967 + export type ApiVversionOdataControllerCountResponses = { 968 + /** 969 + * Success 970 + */ 971 + 200: Model_From_Zendesk; 972 + }; 973 + 974 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 957 975 958 976 export type GetApiVbyApiVersionSimpleOperationData = { 959 977 body?: never; ··· 966 984 query?: never; 967 985 }; 968 986 969 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 987 + export type GetApiVbyApiVersionSimpleOperationErrors = { 988 + /** 989 + * Default error response 990 + */ 991 + default: ModelWithBoolean; 992 + }; 970 993 971 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 994 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 995 + 996 + export type GetApiVbyApiVersionSimpleOperationResponses = { 997 + /** 998 + * Response is a simple number 999 + */ 1000 + 200: number; 1001 + }; 1002 + 1003 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 972 1004 973 1005 export type DeleteFooData3 = { 974 1006 body?: never; ··· 1140 1172 }; 1141 1173 }; 1142 1174 1143 - export type PostCallWithOptionalParamResponse = number | void; 1175 + export type PostCallWithOptionalParamResponses = { 1176 + /** 1177 + * Response is a simple number 1178 + */ 1179 + 200: number; 1180 + /** 1181 + * Success 1182 + */ 1183 + 204: void; 1184 + }; 1185 + 1186 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1144 1187 1145 1188 export type PostApiVbyApiVersionRequestBodyData = { 1146 1189 /** ··· 1263 1306 }; 1264 1307 }; 1265 1308 1266 - export type CallWithNoContentResponseResponse = void; 1309 + export type CallWithNoContentResponseResponses = { 1310 + /** 1311 + * Success 1312 + */ 1313 + 204: void; 1314 + }; 1267 1315 1268 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1316 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1269 1317 1270 - export type DummyAResponse = _400; 1318 + export type CallWithResponseAndNoContentResponseResponses = { 1319 + /** 1320 + * Response is a simple number 1321 + */ 1322 + 200: number; 1323 + /** 1324 + * Success 1325 + */ 1326 + 204: void; 1327 + }; 1271 1328 1272 - export type DummyBResponse = void; 1329 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1273 1330 1274 - export type CallWithResponseResponse = _import; 1331 + export type DummyAResponses = { 1332 + 200: _400; 1333 + }; 1275 1334 1276 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1335 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1277 1336 1278 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1337 + export type DummyBResponses = { 1338 + /** 1339 + * Success 1340 + */ 1341 + 204: void; 1342 + }; 1343 + 1344 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1279 1345 1280 - export type CallWithResponsesError = ModelWithStringError; 1346 + export type CallWithResponseResponses = { 1347 + default: _import; 1348 + }; 1349 + 1350 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1351 + 1352 + export type CallWithDuplicateResponsesErrors = { 1353 + /** 1354 + * Message for 500 error 1355 + */ 1356 + 500: ModelWithStringError; 1357 + /** 1358 + * Message for 501 error 1359 + */ 1360 + 501: ModelWithStringError; 1361 + /** 1362 + * Message for 502 error 1363 + */ 1364 + 502: ModelWithStringError; 1365 + /** 1366 + * Message for 4XX errors 1367 + */ 1368 + '4XX': DictionaryWithArray; 1369 + /** 1370 + * Default error response 1371 + */ 1372 + default: ModelWithBoolean; 1373 + }; 1374 + 1375 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1376 + 1377 + export type CallWithDuplicateResponsesResponses = { 1378 + /** 1379 + * Message for 200 response 1380 + */ 1381 + 200: ModelWithBoolean & ModelWithInteger; 1382 + /** 1383 + * Message for 201 response 1384 + */ 1385 + 201: ModelWithString; 1386 + /** 1387 + * Message for 202 response 1388 + */ 1389 + 202: ModelWithString; 1390 + }; 1391 + 1392 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1393 + 1394 + export type CallWithResponsesErrors = { 1395 + /** 1396 + * Message for 500 error 1397 + */ 1398 + 500: ModelWithStringError; 1399 + /** 1400 + * Message for 501 error 1401 + */ 1402 + 501: ModelWithStringError; 1403 + /** 1404 + * Message for 502 error 1405 + */ 1406 + 502: ModelWithStringError; 1407 + /** 1408 + * Message for default response 1409 + */ 1410 + default: ModelWithStringError; 1411 + }; 1412 + 1413 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1414 + 1415 + export type CallWithResponsesResponses = { 1416 + /** 1417 + * Message for 200 response 1418 + */ 1419 + 200: { 1420 + readonly '@namespace.string'?: string; 1421 + readonly '@namespace.integer'?: number; 1422 + readonly value?: Array<ModelWithString>; 1423 + }; 1424 + /** 1425 + * Message for 201 response 1426 + */ 1427 + 201: ModelThatExtends; 1428 + /** 1429 + * Message for 202 response 1430 + */ 1431 + 202: ModelThatExtendsExtends; 1432 + }; 1281 1433 1282 - export type CallWithResponsesResponse = { 1283 - readonly '@namespace.string'?: string; 1284 - readonly '@namespace.integer'?: number; 1285 - readonly value?: Array<ModelWithString>; 1286 - } | ModelThatExtends | ModelThatExtendsExtends; 1434 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1287 1435 1288 1436 export type CollectionFormatData = { 1289 1437 body?: never; ··· 1352 1500 }; 1353 1501 }; 1354 1502 1355 - export type TypesResponse = number | string | boolean | {}; 1503 + export type TypesResponses = { 1504 + /** 1505 + * Response is a simple number 1506 + */ 1507 + 200: number; 1508 + /** 1509 + * Response is a simple string 1510 + */ 1511 + 201: string; 1512 + /** 1513 + * Response is a simple boolean 1514 + */ 1515 + 202: boolean; 1516 + /** 1517 + * Response is a simple object 1518 + */ 1519 + 203: {}; 1520 + }; 1521 + 1522 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1356 1523 1357 1524 export type UploadFileData = { 1358 1525 body: Blob | File; ··· 1365 1532 query?: never; 1366 1533 }; 1367 1534 1368 - export type UploadFileResponse = boolean; 1535 + export type UploadFileResponses = { 1536 + 200: boolean; 1537 + }; 1538 + 1539 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1369 1540 1370 1541 export type FileResponseData = { 1371 1542 body?: never; ··· 1379 1550 query?: never; 1380 1551 }; 1381 1552 1382 - export type FileResponseResponse = Blob | File; 1553 + export type FileResponseResponses = { 1554 + /** 1555 + * Success 1556 + */ 1557 + 200: Blob | File; 1558 + }; 1559 + 1560 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1383 1561 1384 1562 export type ComplexTypesData = { 1385 1563 body?: never; ··· 1402 1580 }; 1403 1581 }; 1404 1582 1405 - export type ComplexTypesResponse = Array<ModelWithString>; 1583 + export type ComplexTypesErrors = { 1584 + /** 1585 + * 400 `server` error 1586 + */ 1587 + 400: unknown; 1588 + /** 1589 + * 500 server error 1590 + */ 1591 + 500: unknown; 1592 + }; 1593 + 1594 + export type ComplexTypesResponses = { 1595 + /** 1596 + * Successful response 1597 + */ 1598 + 200: Array<ModelWithString>; 1599 + }; 1600 + 1601 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1406 1602 1407 - export type MultipartResponseResponse = { 1408 - file?: Blob | File; 1409 - metadata?: { 1410 - foo?: string; 1411 - bar?: string; 1603 + export type MultipartResponseResponses = { 1604 + /** 1605 + * OK 1606 + */ 1607 + 200: { 1608 + file?: Blob | File; 1609 + metadata?: { 1610 + foo?: string; 1611 + bar?: string; 1612 + }; 1412 1613 }; 1413 1614 }; 1615 + 1616 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1414 1617 1415 1618 export type MultipartRequestData = { 1416 1619 body?: { ··· 1443 1646 query?: never; 1444 1647 }; 1445 1648 1446 - export type ComplexParamsResponse = ModelWithString; 1649 + export type ComplexParamsResponses = { 1650 + /** 1651 + * Success 1652 + */ 1653 + 200: ModelWithString; 1654 + }; 1655 + 1656 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1657 + 1658 + export type CallWithResultFromHeaderErrors = { 1659 + /** 1660 + * 400 server error 1661 + */ 1662 + 400: unknown; 1663 + /** 1664 + * 500 server error 1665 + */ 1666 + 500: unknown; 1667 + }; 1668 + 1669 + export type CallWithResultFromHeaderResponses = { 1670 + /** 1671 + * Successful response 1672 + */ 1673 + 200: unknown; 1674 + }; 1447 1675 1448 1676 export type TestErrorCodeData = { 1449 1677 body?: never; ··· 1456 1684 }; 1457 1685 }; 1458 1686 1687 + export type TestErrorCodeErrors = { 1688 + /** 1689 + * Custom message: Internal Server Error 1690 + */ 1691 + 500: unknown; 1692 + /** 1693 + * Custom message: Not Implemented 1694 + */ 1695 + 501: unknown; 1696 + /** 1697 + * Custom message: Bad Gateway 1698 + */ 1699 + 502: unknown; 1700 + /** 1701 + * Custom message: Service Unavailable 1702 + */ 1703 + 503: unknown; 1704 + }; 1705 + 1706 + export type TestErrorCodeResponses = { 1707 + /** 1708 + * Custom message: Successful response 1709 + */ 1710 + 200: unknown; 1711 + }; 1712 + 1459 1713 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1460 1714 body?: never; 1461 1715 path?: never; ··· 1467 1721 }; 1468 1722 }; 1469 1723 1470 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1724 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1725 + /** 1726 + * Successful response 1727 + */ 1728 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1729 + }; 1730 + 1731 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1471 1732 1472 1733 export type PutWithFormUrlEncodedData = { 1473 1734 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/types.gen.ts
··· 951 951 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 952 952 }; 953 953 954 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 954 + export type ImportResponses = { 955 + /** 956 + * Success 957 + */ 958 + 200: Model_From_Zendesk; 959 + /** 960 + * Default success response 961 + */ 962 + default: ModelWithReadOnlyAndWriteOnly; 963 + }; 964 + 965 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 955 966 956 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 967 + export type ApiVversionOdataControllerCountResponses = { 968 + /** 969 + * Success 970 + */ 971 + 200: Model_From_Zendesk; 972 + }; 973 + 974 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 957 975 958 976 export type GetApiVbyApiVersionSimpleOperationData = { 959 977 body?: never; ··· 966 984 query?: never; 967 985 }; 968 986 969 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 987 + export type GetApiVbyApiVersionSimpleOperationErrors = { 988 + /** 989 + * Default error response 990 + */ 991 + default: ModelWithBoolean; 992 + }; 970 993 971 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 994 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 995 + 996 + export type GetApiVbyApiVersionSimpleOperationResponses = { 997 + /** 998 + * Response is a simple number 999 + */ 1000 + 200: number; 1001 + }; 1002 + 1003 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 972 1004 973 1005 export type DeleteFooData3 = { 974 1006 body?: never; ··· 1140 1172 }; 1141 1173 }; 1142 1174 1143 - export type PostCallWithOptionalParamResponse = number | void; 1175 + export type PostCallWithOptionalParamResponses = { 1176 + /** 1177 + * Response is a simple number 1178 + */ 1179 + 200: number; 1180 + /** 1181 + * Success 1182 + */ 1183 + 204: void; 1184 + }; 1185 + 1186 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1144 1187 1145 1188 export type PostApiVbyApiVersionRequestBodyData = { 1146 1189 /** ··· 1263 1306 }; 1264 1307 }; 1265 1308 1266 - export type CallWithNoContentResponseResponse = void; 1309 + export type CallWithNoContentResponseResponses = { 1310 + /** 1311 + * Success 1312 + */ 1313 + 204: void; 1314 + }; 1267 1315 1268 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1316 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1269 1317 1270 - export type DummyAResponse = _400; 1318 + export type CallWithResponseAndNoContentResponseResponses = { 1319 + /** 1320 + * Response is a simple number 1321 + */ 1322 + 200: number; 1323 + /** 1324 + * Success 1325 + */ 1326 + 204: void; 1327 + }; 1271 1328 1272 - export type DummyBResponse = void; 1329 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1273 1330 1274 - export type CallWithResponseResponse = _import; 1331 + export type DummyAResponses = { 1332 + 200: _400; 1333 + }; 1275 1334 1276 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1335 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1277 1336 1278 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1337 + export type DummyBResponses = { 1338 + /** 1339 + * Success 1340 + */ 1341 + 204: void; 1342 + }; 1343 + 1344 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1279 1345 1280 - export type CallWithResponsesError = ModelWithStringError; 1346 + export type CallWithResponseResponses = { 1347 + default: _import; 1348 + }; 1349 + 1350 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1351 + 1352 + export type CallWithDuplicateResponsesErrors = { 1353 + /** 1354 + * Message for 500 error 1355 + */ 1356 + 500: ModelWithStringError; 1357 + /** 1358 + * Message for 501 error 1359 + */ 1360 + 501: ModelWithStringError; 1361 + /** 1362 + * Message for 502 error 1363 + */ 1364 + 502: ModelWithStringError; 1365 + /** 1366 + * Message for 4XX errors 1367 + */ 1368 + '4XX': DictionaryWithArray; 1369 + /** 1370 + * Default error response 1371 + */ 1372 + default: ModelWithBoolean; 1373 + }; 1374 + 1375 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1376 + 1377 + export type CallWithDuplicateResponsesResponses = { 1378 + /** 1379 + * Message for 200 response 1380 + */ 1381 + 200: ModelWithBoolean & ModelWithInteger; 1382 + /** 1383 + * Message for 201 response 1384 + */ 1385 + 201: ModelWithString; 1386 + /** 1387 + * Message for 202 response 1388 + */ 1389 + 202: ModelWithString; 1390 + }; 1391 + 1392 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1393 + 1394 + export type CallWithResponsesErrors = { 1395 + /** 1396 + * Message for 500 error 1397 + */ 1398 + 500: ModelWithStringError; 1399 + /** 1400 + * Message for 501 error 1401 + */ 1402 + 501: ModelWithStringError; 1403 + /** 1404 + * Message for 502 error 1405 + */ 1406 + 502: ModelWithStringError; 1407 + /** 1408 + * Message for default response 1409 + */ 1410 + default: ModelWithStringError; 1411 + }; 1412 + 1413 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1414 + 1415 + export type CallWithResponsesResponses = { 1416 + /** 1417 + * Message for 200 response 1418 + */ 1419 + 200: { 1420 + readonly '@namespace.string'?: string; 1421 + readonly '@namespace.integer'?: number; 1422 + readonly value?: Array<ModelWithString>; 1423 + }; 1424 + /** 1425 + * Message for 201 response 1426 + */ 1427 + 201: ModelThatExtends; 1428 + /** 1429 + * Message for 202 response 1430 + */ 1431 + 202: ModelThatExtendsExtends; 1432 + }; 1281 1433 1282 - export type CallWithResponsesResponse = { 1283 - readonly '@namespace.string'?: string; 1284 - readonly '@namespace.integer'?: number; 1285 - readonly value?: Array<ModelWithString>; 1286 - } | ModelThatExtends | ModelThatExtendsExtends; 1434 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1287 1435 1288 1436 export type CollectionFormatData = { 1289 1437 body?: never; ··· 1352 1500 }; 1353 1501 }; 1354 1502 1355 - export type TypesResponse = number | string | boolean | {}; 1503 + export type TypesResponses = { 1504 + /** 1505 + * Response is a simple number 1506 + */ 1507 + 200: number; 1508 + /** 1509 + * Response is a simple string 1510 + */ 1511 + 201: string; 1512 + /** 1513 + * Response is a simple boolean 1514 + */ 1515 + 202: boolean; 1516 + /** 1517 + * Response is a simple object 1518 + */ 1519 + 203: {}; 1520 + }; 1521 + 1522 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1356 1523 1357 1524 export type UploadFileData = { 1358 1525 body: Blob | File; ··· 1365 1532 query?: never; 1366 1533 }; 1367 1534 1368 - export type UploadFileResponse = boolean; 1535 + export type UploadFileResponses = { 1536 + 200: boolean; 1537 + }; 1538 + 1539 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1369 1540 1370 1541 export type FileResponseData = { 1371 1542 body?: never; ··· 1379 1550 query?: never; 1380 1551 }; 1381 1552 1382 - export type FileResponseResponse = Blob | File; 1553 + export type FileResponseResponses = { 1554 + /** 1555 + * Success 1556 + */ 1557 + 200: Blob | File; 1558 + }; 1559 + 1560 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1383 1561 1384 1562 export type ComplexTypesData = { 1385 1563 body?: never; ··· 1402 1580 }; 1403 1581 }; 1404 1582 1405 - export type ComplexTypesResponse = Array<ModelWithString>; 1583 + export type ComplexTypesErrors = { 1584 + /** 1585 + * 400 `server` error 1586 + */ 1587 + 400: unknown; 1588 + /** 1589 + * 500 server error 1590 + */ 1591 + 500: unknown; 1592 + }; 1593 + 1594 + export type ComplexTypesResponses = { 1595 + /** 1596 + * Successful response 1597 + */ 1598 + 200: Array<ModelWithString>; 1599 + }; 1600 + 1601 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1406 1602 1407 - export type MultipartResponseResponse = { 1408 - file?: Blob | File; 1409 - metadata?: { 1410 - foo?: string; 1411 - bar?: string; 1603 + export type MultipartResponseResponses = { 1604 + /** 1605 + * OK 1606 + */ 1607 + 200: { 1608 + file?: Blob | File; 1609 + metadata?: { 1610 + foo?: string; 1611 + bar?: string; 1612 + }; 1412 1613 }; 1413 1614 }; 1615 + 1616 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1414 1617 1415 1618 export type MultipartRequestData = { 1416 1619 body?: { ··· 1443 1646 query?: never; 1444 1647 }; 1445 1648 1446 - export type ComplexParamsResponse = ModelWithString; 1649 + export type ComplexParamsResponses = { 1650 + /** 1651 + * Success 1652 + */ 1653 + 200: ModelWithString; 1654 + }; 1655 + 1656 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1657 + 1658 + export type CallWithResultFromHeaderErrors = { 1659 + /** 1660 + * 400 server error 1661 + */ 1662 + 400: unknown; 1663 + /** 1664 + * 500 server error 1665 + */ 1666 + 500: unknown; 1667 + }; 1668 + 1669 + export type CallWithResultFromHeaderResponses = { 1670 + /** 1671 + * Successful response 1672 + */ 1673 + 200: unknown; 1674 + }; 1447 1675 1448 1676 export type TestErrorCodeData = { 1449 1677 body?: never; ··· 1456 1684 }; 1457 1685 }; 1458 1686 1687 + export type TestErrorCodeErrors = { 1688 + /** 1689 + * Custom message: Internal Server Error 1690 + */ 1691 + 500: unknown; 1692 + /** 1693 + * Custom message: Not Implemented 1694 + */ 1695 + 501: unknown; 1696 + /** 1697 + * Custom message: Bad Gateway 1698 + */ 1699 + 502: unknown; 1700 + /** 1701 + * Custom message: Service Unavailable 1702 + */ 1703 + 503: unknown; 1704 + }; 1705 + 1706 + export type TestErrorCodeResponses = { 1707 + /** 1708 + * Custom message: Successful response 1709 + */ 1710 + 200: unknown; 1711 + }; 1712 + 1459 1713 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1460 1714 body?: never; 1461 1715 path?: never; ··· 1467 1721 }; 1468 1722 }; 1469 1723 1470 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1724 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1725 + /** 1726 + * Successful response 1727 + */ 1728 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1729 + }; 1730 + 1731 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1471 1732 1472 1733 export type PutWithFormUrlEncodedData = { 1473 1734 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/types.gen.ts
··· 951 951 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 952 952 }; 953 953 954 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 954 + export type ImportResponses = { 955 + /** 956 + * Success 957 + */ 958 + 200: Model_From_Zendesk; 959 + /** 960 + * Default success response 961 + */ 962 + default: ModelWithReadOnlyAndWriteOnly; 963 + }; 964 + 965 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 955 966 956 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 967 + export type ApiVversionOdataControllerCountResponses = { 968 + /** 969 + * Success 970 + */ 971 + 200: Model_From_Zendesk; 972 + }; 973 + 974 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 957 975 958 976 export type GetApiVbyApiVersionSimpleOperationData = { 959 977 body?: never; ··· 966 984 query?: never; 967 985 }; 968 986 969 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 987 + export type GetApiVbyApiVersionSimpleOperationErrors = { 988 + /** 989 + * Default error response 990 + */ 991 + default: ModelWithBoolean; 992 + }; 970 993 971 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 994 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 995 + 996 + export type GetApiVbyApiVersionSimpleOperationResponses = { 997 + /** 998 + * Response is a simple number 999 + */ 1000 + 200: number; 1001 + }; 1002 + 1003 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 972 1004 973 1005 export type DeleteFooData3 = { 974 1006 body?: never; ··· 1140 1172 }; 1141 1173 }; 1142 1174 1143 - export type PostCallWithOptionalParamResponse = number | void; 1175 + export type PostCallWithOptionalParamResponses = { 1176 + /** 1177 + * Response is a simple number 1178 + */ 1179 + 200: number; 1180 + /** 1181 + * Success 1182 + */ 1183 + 204: void; 1184 + }; 1185 + 1186 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1144 1187 1145 1188 export type PostApiVbyApiVersionRequestBodyData = { 1146 1189 /** ··· 1263 1306 }; 1264 1307 }; 1265 1308 1266 - export type CallWithNoContentResponseResponse = void; 1309 + export type CallWithNoContentResponseResponses = { 1310 + /** 1311 + * Success 1312 + */ 1313 + 204: void; 1314 + }; 1267 1315 1268 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1316 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1269 1317 1270 - export type DummyAResponse = _400; 1318 + export type CallWithResponseAndNoContentResponseResponses = { 1319 + /** 1320 + * Response is a simple number 1321 + */ 1322 + 200: number; 1323 + /** 1324 + * Success 1325 + */ 1326 + 204: void; 1327 + }; 1271 1328 1272 - export type DummyBResponse = void; 1329 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1273 1330 1274 - export type CallWithResponseResponse = _import; 1331 + export type DummyAResponses = { 1332 + 200: _400; 1333 + }; 1275 1334 1276 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1335 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1277 1336 1278 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1337 + export type DummyBResponses = { 1338 + /** 1339 + * Success 1340 + */ 1341 + 204: void; 1342 + }; 1343 + 1344 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1279 1345 1280 - export type CallWithResponsesError = ModelWithStringError; 1346 + export type CallWithResponseResponses = { 1347 + default: _import; 1348 + }; 1349 + 1350 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1351 + 1352 + export type CallWithDuplicateResponsesErrors = { 1353 + /** 1354 + * Message for 500 error 1355 + */ 1356 + 500: ModelWithStringError; 1357 + /** 1358 + * Message for 501 error 1359 + */ 1360 + 501: ModelWithStringError; 1361 + /** 1362 + * Message for 502 error 1363 + */ 1364 + 502: ModelWithStringError; 1365 + /** 1366 + * Message for 4XX errors 1367 + */ 1368 + '4XX': DictionaryWithArray; 1369 + /** 1370 + * Default error response 1371 + */ 1372 + default: ModelWithBoolean; 1373 + }; 1374 + 1375 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1376 + 1377 + export type CallWithDuplicateResponsesResponses = { 1378 + /** 1379 + * Message for 200 response 1380 + */ 1381 + 200: ModelWithBoolean & ModelWithInteger; 1382 + /** 1383 + * Message for 201 response 1384 + */ 1385 + 201: ModelWithString; 1386 + /** 1387 + * Message for 202 response 1388 + */ 1389 + 202: ModelWithString; 1390 + }; 1391 + 1392 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1393 + 1394 + export type CallWithResponsesErrors = { 1395 + /** 1396 + * Message for 500 error 1397 + */ 1398 + 500: ModelWithStringError; 1399 + /** 1400 + * Message for 501 error 1401 + */ 1402 + 501: ModelWithStringError; 1403 + /** 1404 + * Message for 502 error 1405 + */ 1406 + 502: ModelWithStringError; 1407 + /** 1408 + * Message for default response 1409 + */ 1410 + default: ModelWithStringError; 1411 + }; 1412 + 1413 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1414 + 1415 + export type CallWithResponsesResponses = { 1416 + /** 1417 + * Message for 200 response 1418 + */ 1419 + 200: { 1420 + readonly '@namespace.string'?: string; 1421 + readonly '@namespace.integer'?: number; 1422 + readonly value?: Array<ModelWithString>; 1423 + }; 1424 + /** 1425 + * Message for 201 response 1426 + */ 1427 + 201: ModelThatExtends; 1428 + /** 1429 + * Message for 202 response 1430 + */ 1431 + 202: ModelThatExtendsExtends; 1432 + }; 1281 1433 1282 - export type CallWithResponsesResponse = { 1283 - readonly '@namespace.string'?: string; 1284 - readonly '@namespace.integer'?: number; 1285 - readonly value?: Array<ModelWithString>; 1286 - } | ModelThatExtends | ModelThatExtendsExtends; 1434 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1287 1435 1288 1436 export type CollectionFormatData = { 1289 1437 body?: never; ··· 1352 1500 }; 1353 1501 }; 1354 1502 1355 - export type TypesResponse = number | string | boolean | {}; 1503 + export type TypesResponses = { 1504 + /** 1505 + * Response is a simple number 1506 + */ 1507 + 200: number; 1508 + /** 1509 + * Response is a simple string 1510 + */ 1511 + 201: string; 1512 + /** 1513 + * Response is a simple boolean 1514 + */ 1515 + 202: boolean; 1516 + /** 1517 + * Response is a simple object 1518 + */ 1519 + 203: {}; 1520 + }; 1521 + 1522 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1356 1523 1357 1524 export type UploadFileData = { 1358 1525 body: Blob | File; ··· 1365 1532 query?: never; 1366 1533 }; 1367 1534 1368 - export type UploadFileResponse = boolean; 1535 + export type UploadFileResponses = { 1536 + 200: boolean; 1537 + }; 1538 + 1539 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1369 1540 1370 1541 export type FileResponseData = { 1371 1542 body?: never; ··· 1379 1550 query?: never; 1380 1551 }; 1381 1552 1382 - export type FileResponseResponse = Blob | File; 1553 + export type FileResponseResponses = { 1554 + /** 1555 + * Success 1556 + */ 1557 + 200: Blob | File; 1558 + }; 1559 + 1560 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1383 1561 1384 1562 export type ComplexTypesData = { 1385 1563 body?: never; ··· 1402 1580 }; 1403 1581 }; 1404 1582 1405 - export type ComplexTypesResponse = Array<ModelWithString>; 1583 + export type ComplexTypesErrors = { 1584 + /** 1585 + * 400 `server` error 1586 + */ 1587 + 400: unknown; 1588 + /** 1589 + * 500 server error 1590 + */ 1591 + 500: unknown; 1592 + }; 1593 + 1594 + export type ComplexTypesResponses = { 1595 + /** 1596 + * Successful response 1597 + */ 1598 + 200: Array<ModelWithString>; 1599 + }; 1600 + 1601 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1406 1602 1407 - export type MultipartResponseResponse = { 1408 - file?: Blob | File; 1409 - metadata?: { 1410 - foo?: string; 1411 - bar?: string; 1603 + export type MultipartResponseResponses = { 1604 + /** 1605 + * OK 1606 + */ 1607 + 200: { 1608 + file?: Blob | File; 1609 + metadata?: { 1610 + foo?: string; 1611 + bar?: string; 1612 + }; 1412 1613 }; 1413 1614 }; 1615 + 1616 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1414 1617 1415 1618 export type MultipartRequestData = { 1416 1619 body?: { ··· 1443 1646 query?: never; 1444 1647 }; 1445 1648 1446 - export type ComplexParamsResponse = ModelWithString; 1649 + export type ComplexParamsResponses = { 1650 + /** 1651 + * Success 1652 + */ 1653 + 200: ModelWithString; 1654 + }; 1655 + 1656 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1657 + 1658 + export type CallWithResultFromHeaderErrors = { 1659 + /** 1660 + * 400 server error 1661 + */ 1662 + 400: unknown; 1663 + /** 1664 + * 500 server error 1665 + */ 1666 + 500: unknown; 1667 + }; 1668 + 1669 + export type CallWithResultFromHeaderResponses = { 1670 + /** 1671 + * Successful response 1672 + */ 1673 + 200: unknown; 1674 + }; 1447 1675 1448 1676 export type TestErrorCodeData = { 1449 1677 body?: never; ··· 1456 1684 }; 1457 1685 }; 1458 1686 1687 + export type TestErrorCodeErrors = { 1688 + /** 1689 + * Custom message: Internal Server Error 1690 + */ 1691 + 500: unknown; 1692 + /** 1693 + * Custom message: Not Implemented 1694 + */ 1695 + 501: unknown; 1696 + /** 1697 + * Custom message: Bad Gateway 1698 + */ 1699 + 502: unknown; 1700 + /** 1701 + * Custom message: Service Unavailable 1702 + */ 1703 + 503: unknown; 1704 + }; 1705 + 1706 + export type TestErrorCodeResponses = { 1707 + /** 1708 + * Custom message: Successful response 1709 + */ 1710 + 200: unknown; 1711 + }; 1712 + 1459 1713 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1460 1714 body?: never; 1461 1715 path?: never; ··· 1467 1721 }; 1468 1722 }; 1469 1723 1470 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1724 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1725 + /** 1726 + * Successful response 1727 + */ 1728 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1729 + }; 1730 + 1731 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1471 1732 1472 1733 export type PutWithFormUrlEncodedData = { 1473 1734 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/types.gen.ts
··· 951 951 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 952 952 }; 953 953 954 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 954 + export type ImportResponses = { 955 + /** 956 + * Success 957 + */ 958 + 200: Model_From_Zendesk; 959 + /** 960 + * Default success response 961 + */ 962 + default: ModelWithReadOnlyAndWriteOnly; 963 + }; 964 + 965 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 955 966 956 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 967 + export type ApiVversionOdataControllerCountResponses = { 968 + /** 969 + * Success 970 + */ 971 + 200: Model_From_Zendesk; 972 + }; 973 + 974 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 957 975 958 976 export type GetApiVbyApiVersionSimpleOperationData = { 959 977 body?: never; ··· 966 984 query?: never; 967 985 }; 968 986 969 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 987 + export type GetApiVbyApiVersionSimpleOperationErrors = { 988 + /** 989 + * Default error response 990 + */ 991 + default: ModelWithBoolean; 992 + }; 970 993 971 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 994 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 995 + 996 + export type GetApiVbyApiVersionSimpleOperationResponses = { 997 + /** 998 + * Response is a simple number 999 + */ 1000 + 200: number; 1001 + }; 1002 + 1003 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 972 1004 973 1005 export type DeleteFooData3 = { 974 1006 body?: never; ··· 1140 1172 }; 1141 1173 }; 1142 1174 1143 - export type PostCallWithOptionalParamResponse = number | void; 1175 + export type PostCallWithOptionalParamResponses = { 1176 + /** 1177 + * Response is a simple number 1178 + */ 1179 + 200: number; 1180 + /** 1181 + * Success 1182 + */ 1183 + 204: void; 1184 + }; 1185 + 1186 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1144 1187 1145 1188 export type PostApiVbyApiVersionRequestBodyData = { 1146 1189 /** ··· 1263 1306 }; 1264 1307 }; 1265 1308 1266 - export type CallWithNoContentResponseResponse = void; 1309 + export type CallWithNoContentResponseResponses = { 1310 + /** 1311 + * Success 1312 + */ 1313 + 204: void; 1314 + }; 1267 1315 1268 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1316 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1269 1317 1270 - export type DummyAResponse = _400; 1318 + export type CallWithResponseAndNoContentResponseResponses = { 1319 + /** 1320 + * Response is a simple number 1321 + */ 1322 + 200: number; 1323 + /** 1324 + * Success 1325 + */ 1326 + 204: void; 1327 + }; 1271 1328 1272 - export type DummyBResponse = void; 1329 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1273 1330 1274 - export type CallWithResponseResponse = _import; 1331 + export type DummyAResponses = { 1332 + 200: _400; 1333 + }; 1275 1334 1276 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1335 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1277 1336 1278 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1337 + export type DummyBResponses = { 1338 + /** 1339 + * Success 1340 + */ 1341 + 204: void; 1342 + }; 1343 + 1344 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1279 1345 1280 - export type CallWithResponsesError = ModelWithStringError; 1346 + export type CallWithResponseResponses = { 1347 + default: _import; 1348 + }; 1349 + 1350 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1351 + 1352 + export type CallWithDuplicateResponsesErrors = { 1353 + /** 1354 + * Message for 500 error 1355 + */ 1356 + 500: ModelWithStringError; 1357 + /** 1358 + * Message for 501 error 1359 + */ 1360 + 501: ModelWithStringError; 1361 + /** 1362 + * Message for 502 error 1363 + */ 1364 + 502: ModelWithStringError; 1365 + /** 1366 + * Message for 4XX errors 1367 + */ 1368 + '4XX': DictionaryWithArray; 1369 + /** 1370 + * Default error response 1371 + */ 1372 + default: ModelWithBoolean; 1373 + }; 1374 + 1375 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1376 + 1377 + export type CallWithDuplicateResponsesResponses = { 1378 + /** 1379 + * Message for 200 response 1380 + */ 1381 + 200: ModelWithBoolean & ModelWithInteger; 1382 + /** 1383 + * Message for 201 response 1384 + */ 1385 + 201: ModelWithString; 1386 + /** 1387 + * Message for 202 response 1388 + */ 1389 + 202: ModelWithString; 1390 + }; 1391 + 1392 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1393 + 1394 + export type CallWithResponsesErrors = { 1395 + /** 1396 + * Message for 500 error 1397 + */ 1398 + 500: ModelWithStringError; 1399 + /** 1400 + * Message for 501 error 1401 + */ 1402 + 501: ModelWithStringError; 1403 + /** 1404 + * Message for 502 error 1405 + */ 1406 + 502: ModelWithStringError; 1407 + /** 1408 + * Message for default response 1409 + */ 1410 + default: ModelWithStringError; 1411 + }; 1412 + 1413 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1414 + 1415 + export type CallWithResponsesResponses = { 1416 + /** 1417 + * Message for 200 response 1418 + */ 1419 + 200: { 1420 + readonly '@namespace.string'?: string; 1421 + readonly '@namespace.integer'?: number; 1422 + readonly value?: Array<ModelWithString>; 1423 + }; 1424 + /** 1425 + * Message for 201 response 1426 + */ 1427 + 201: ModelThatExtends; 1428 + /** 1429 + * Message for 202 response 1430 + */ 1431 + 202: ModelThatExtendsExtends; 1432 + }; 1281 1433 1282 - export type CallWithResponsesResponse = { 1283 - readonly '@namespace.string'?: string; 1284 - readonly '@namespace.integer'?: number; 1285 - readonly value?: Array<ModelWithString>; 1286 - } | ModelThatExtends | ModelThatExtendsExtends; 1434 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1287 1435 1288 1436 export type CollectionFormatData = { 1289 1437 body?: never; ··· 1352 1500 }; 1353 1501 }; 1354 1502 1355 - export type TypesResponse = number | string | boolean | {}; 1503 + export type TypesResponses = { 1504 + /** 1505 + * Response is a simple number 1506 + */ 1507 + 200: number; 1508 + /** 1509 + * Response is a simple string 1510 + */ 1511 + 201: string; 1512 + /** 1513 + * Response is a simple boolean 1514 + */ 1515 + 202: boolean; 1516 + /** 1517 + * Response is a simple object 1518 + */ 1519 + 203: {}; 1520 + }; 1521 + 1522 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1356 1523 1357 1524 export type UploadFileData = { 1358 1525 body: Blob | File; ··· 1365 1532 query?: never; 1366 1533 }; 1367 1534 1368 - export type UploadFileResponse = boolean; 1535 + export type UploadFileResponses = { 1536 + 200: boolean; 1537 + }; 1538 + 1539 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1369 1540 1370 1541 export type FileResponseData = { 1371 1542 body?: never; ··· 1379 1550 query?: never; 1380 1551 }; 1381 1552 1382 - export type FileResponseResponse = Blob | File; 1553 + export type FileResponseResponses = { 1554 + /** 1555 + * Success 1556 + */ 1557 + 200: Blob | File; 1558 + }; 1559 + 1560 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1383 1561 1384 1562 export type ComplexTypesData = { 1385 1563 body?: never; ··· 1402 1580 }; 1403 1581 }; 1404 1582 1405 - export type ComplexTypesResponse = Array<ModelWithString>; 1583 + export type ComplexTypesErrors = { 1584 + /** 1585 + * 400 `server` error 1586 + */ 1587 + 400: unknown; 1588 + /** 1589 + * 500 server error 1590 + */ 1591 + 500: unknown; 1592 + }; 1593 + 1594 + export type ComplexTypesResponses = { 1595 + /** 1596 + * Successful response 1597 + */ 1598 + 200: Array<ModelWithString>; 1599 + }; 1600 + 1601 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1406 1602 1407 - export type MultipartResponseResponse = { 1408 - file?: Blob | File; 1409 - metadata?: { 1410 - foo?: string; 1411 - bar?: string; 1603 + export type MultipartResponseResponses = { 1604 + /** 1605 + * OK 1606 + */ 1607 + 200: { 1608 + file?: Blob | File; 1609 + metadata?: { 1610 + foo?: string; 1611 + bar?: string; 1612 + }; 1412 1613 }; 1413 1614 }; 1615 + 1616 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1414 1617 1415 1618 export type MultipartRequestData = { 1416 1619 body?: { ··· 1443 1646 query?: never; 1444 1647 }; 1445 1648 1446 - export type ComplexParamsResponse = ModelWithString; 1649 + export type ComplexParamsResponses = { 1650 + /** 1651 + * Success 1652 + */ 1653 + 200: ModelWithString; 1654 + }; 1655 + 1656 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1657 + 1658 + export type CallWithResultFromHeaderErrors = { 1659 + /** 1660 + * 400 server error 1661 + */ 1662 + 400: unknown; 1663 + /** 1664 + * 500 server error 1665 + */ 1666 + 500: unknown; 1667 + }; 1668 + 1669 + export type CallWithResultFromHeaderResponses = { 1670 + /** 1671 + * Successful response 1672 + */ 1673 + 200: unknown; 1674 + }; 1447 1675 1448 1676 export type TestErrorCodeData = { 1449 1677 body?: never; ··· 1456 1684 }; 1457 1685 }; 1458 1686 1687 + export type TestErrorCodeErrors = { 1688 + /** 1689 + * Custom message: Internal Server Error 1690 + */ 1691 + 500: unknown; 1692 + /** 1693 + * Custom message: Not Implemented 1694 + */ 1695 + 501: unknown; 1696 + /** 1697 + * Custom message: Bad Gateway 1698 + */ 1699 + 502: unknown; 1700 + /** 1701 + * Custom message: Service Unavailable 1702 + */ 1703 + 503: unknown; 1704 + }; 1705 + 1706 + export type TestErrorCodeResponses = { 1707 + /** 1708 + * Custom message: Successful response 1709 + */ 1710 + 200: unknown; 1711 + }; 1712 + 1459 1713 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1460 1714 body?: never; 1461 1715 path?: never; ··· 1467 1721 }; 1468 1722 }; 1469 1723 1470 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1724 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1725 + /** 1726 + * Successful response 1727 + */ 1728 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1729 + }; 1730 + 1731 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1471 1732 1472 1733 export type PutWithFormUrlEncodedData = { 1473 1734 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/types.gen.ts
··· 951 951 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 952 952 }; 953 953 954 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 954 + export type ImportResponses = { 955 + /** 956 + * Success 957 + */ 958 + 200: Model_From_Zendesk; 959 + /** 960 + * Default success response 961 + */ 962 + default: ModelWithReadOnlyAndWriteOnly; 963 + }; 964 + 965 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 955 966 956 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 967 + export type ApiVversionOdataControllerCountResponses = { 968 + /** 969 + * Success 970 + */ 971 + 200: Model_From_Zendesk; 972 + }; 973 + 974 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 957 975 958 976 export type GetApiVbyApiVersionSimpleOperationData = { 959 977 body?: never; ··· 966 984 query?: never; 967 985 }; 968 986 969 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 987 + export type GetApiVbyApiVersionSimpleOperationErrors = { 988 + /** 989 + * Default error response 990 + */ 991 + default: ModelWithBoolean; 992 + }; 970 993 971 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 994 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 995 + 996 + export type GetApiVbyApiVersionSimpleOperationResponses = { 997 + /** 998 + * Response is a simple number 999 + */ 1000 + 200: number; 1001 + }; 1002 + 1003 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 972 1004 973 1005 export type DeleteFooData3 = { 974 1006 body?: never; ··· 1140 1172 }; 1141 1173 }; 1142 1174 1143 - export type PostCallWithOptionalParamResponse = number | void; 1175 + export type PostCallWithOptionalParamResponses = { 1176 + /** 1177 + * Response is a simple number 1178 + */ 1179 + 200: number; 1180 + /** 1181 + * Success 1182 + */ 1183 + 204: void; 1184 + }; 1185 + 1186 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1144 1187 1145 1188 export type PostApiVbyApiVersionRequestBodyData = { 1146 1189 /** ··· 1263 1306 }; 1264 1307 }; 1265 1308 1266 - export type CallWithNoContentResponseResponse = void; 1309 + export type CallWithNoContentResponseResponses = { 1310 + /** 1311 + * Success 1312 + */ 1313 + 204: void; 1314 + }; 1267 1315 1268 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1316 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1269 1317 1270 - export type DummyAResponse = _400; 1318 + export type CallWithResponseAndNoContentResponseResponses = { 1319 + /** 1320 + * Response is a simple number 1321 + */ 1322 + 200: number; 1323 + /** 1324 + * Success 1325 + */ 1326 + 204: void; 1327 + }; 1271 1328 1272 - export type DummyBResponse = void; 1329 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1273 1330 1274 - export type CallWithResponseResponse = _import; 1331 + export type DummyAResponses = { 1332 + 200: _400; 1333 + }; 1275 1334 1276 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1335 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1277 1336 1278 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1337 + export type DummyBResponses = { 1338 + /** 1339 + * Success 1340 + */ 1341 + 204: void; 1342 + }; 1343 + 1344 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1279 1345 1280 - export type CallWithResponsesError = ModelWithStringError; 1346 + export type CallWithResponseResponses = { 1347 + default: _import; 1348 + }; 1349 + 1350 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1351 + 1352 + export type CallWithDuplicateResponsesErrors = { 1353 + /** 1354 + * Message for 500 error 1355 + */ 1356 + 500: ModelWithStringError; 1357 + /** 1358 + * Message for 501 error 1359 + */ 1360 + 501: ModelWithStringError; 1361 + /** 1362 + * Message for 502 error 1363 + */ 1364 + 502: ModelWithStringError; 1365 + /** 1366 + * Message for 4XX errors 1367 + */ 1368 + '4XX': DictionaryWithArray; 1369 + /** 1370 + * Default error response 1371 + */ 1372 + default: ModelWithBoolean; 1373 + }; 1374 + 1375 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1376 + 1377 + export type CallWithDuplicateResponsesResponses = { 1378 + /** 1379 + * Message for 200 response 1380 + */ 1381 + 200: ModelWithBoolean & ModelWithInteger; 1382 + /** 1383 + * Message for 201 response 1384 + */ 1385 + 201: ModelWithString; 1386 + /** 1387 + * Message for 202 response 1388 + */ 1389 + 202: ModelWithString; 1390 + }; 1391 + 1392 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1393 + 1394 + export type CallWithResponsesErrors = { 1395 + /** 1396 + * Message for 500 error 1397 + */ 1398 + 500: ModelWithStringError; 1399 + /** 1400 + * Message for 501 error 1401 + */ 1402 + 501: ModelWithStringError; 1403 + /** 1404 + * Message for 502 error 1405 + */ 1406 + 502: ModelWithStringError; 1407 + /** 1408 + * Message for default response 1409 + */ 1410 + default: ModelWithStringError; 1411 + }; 1412 + 1413 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1414 + 1415 + export type CallWithResponsesResponses = { 1416 + /** 1417 + * Message for 200 response 1418 + */ 1419 + 200: { 1420 + readonly '@namespace.string'?: string; 1421 + readonly '@namespace.integer'?: number; 1422 + readonly value?: Array<ModelWithString>; 1423 + }; 1424 + /** 1425 + * Message for 201 response 1426 + */ 1427 + 201: ModelThatExtends; 1428 + /** 1429 + * Message for 202 response 1430 + */ 1431 + 202: ModelThatExtendsExtends; 1432 + }; 1281 1433 1282 - export type CallWithResponsesResponse = { 1283 - readonly '@namespace.string'?: string; 1284 - readonly '@namespace.integer'?: number; 1285 - readonly value?: Array<ModelWithString>; 1286 - } | ModelThatExtends | ModelThatExtendsExtends; 1434 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1287 1435 1288 1436 export type CollectionFormatData = { 1289 1437 body?: never; ··· 1352 1500 }; 1353 1501 }; 1354 1502 1355 - export type TypesResponse = number | string | boolean | {}; 1503 + export type TypesResponses = { 1504 + /** 1505 + * Response is a simple number 1506 + */ 1507 + 200: number; 1508 + /** 1509 + * Response is a simple string 1510 + */ 1511 + 201: string; 1512 + /** 1513 + * Response is a simple boolean 1514 + */ 1515 + 202: boolean; 1516 + /** 1517 + * Response is a simple object 1518 + */ 1519 + 203: {}; 1520 + }; 1521 + 1522 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1356 1523 1357 1524 export type UploadFileData = { 1358 1525 body: Blob | File; ··· 1365 1532 query?: never; 1366 1533 }; 1367 1534 1368 - export type UploadFileResponse = boolean; 1535 + export type UploadFileResponses = { 1536 + 200: boolean; 1537 + }; 1538 + 1539 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1369 1540 1370 1541 export type FileResponseData = { 1371 1542 body?: never; ··· 1379 1550 query?: never; 1380 1551 }; 1381 1552 1382 - export type FileResponseResponse = Blob | File; 1553 + export type FileResponseResponses = { 1554 + /** 1555 + * Success 1556 + */ 1557 + 200: Blob | File; 1558 + }; 1559 + 1560 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1383 1561 1384 1562 export type ComplexTypesData = { 1385 1563 body?: never; ··· 1402 1580 }; 1403 1581 }; 1404 1582 1405 - export type ComplexTypesResponse = Array<ModelWithString>; 1583 + export type ComplexTypesErrors = { 1584 + /** 1585 + * 400 `server` error 1586 + */ 1587 + 400: unknown; 1588 + /** 1589 + * 500 server error 1590 + */ 1591 + 500: unknown; 1592 + }; 1593 + 1594 + export type ComplexTypesResponses = { 1595 + /** 1596 + * Successful response 1597 + */ 1598 + 200: Array<ModelWithString>; 1599 + }; 1600 + 1601 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1406 1602 1407 - export type MultipartResponseResponse = { 1408 - file?: Blob | File; 1409 - metadata?: { 1410 - foo?: string; 1411 - bar?: string; 1603 + export type MultipartResponseResponses = { 1604 + /** 1605 + * OK 1606 + */ 1607 + 200: { 1608 + file?: Blob | File; 1609 + metadata?: { 1610 + foo?: string; 1611 + bar?: string; 1612 + }; 1412 1613 }; 1413 1614 }; 1615 + 1616 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1414 1617 1415 1618 export type MultipartRequestData = { 1416 1619 body?: { ··· 1443 1646 query?: never; 1444 1647 }; 1445 1648 1446 - export type ComplexParamsResponse = ModelWithString; 1649 + export type ComplexParamsResponses = { 1650 + /** 1651 + * Success 1652 + */ 1653 + 200: ModelWithString; 1654 + }; 1655 + 1656 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1657 + 1658 + export type CallWithResultFromHeaderErrors = { 1659 + /** 1660 + * 400 server error 1661 + */ 1662 + 400: unknown; 1663 + /** 1664 + * 500 server error 1665 + */ 1666 + 500: unknown; 1667 + }; 1668 + 1669 + export type CallWithResultFromHeaderResponses = { 1670 + /** 1671 + * Successful response 1672 + */ 1673 + 200: unknown; 1674 + }; 1447 1675 1448 1676 export type TestErrorCodeData = { 1449 1677 body?: never; ··· 1456 1684 }; 1457 1685 }; 1458 1686 1687 + export type TestErrorCodeErrors = { 1688 + /** 1689 + * Custom message: Internal Server Error 1690 + */ 1691 + 500: unknown; 1692 + /** 1693 + * Custom message: Not Implemented 1694 + */ 1695 + 501: unknown; 1696 + /** 1697 + * Custom message: Bad Gateway 1698 + */ 1699 + 502: unknown; 1700 + /** 1701 + * Custom message: Service Unavailable 1702 + */ 1703 + 503: unknown; 1704 + }; 1705 + 1706 + export type TestErrorCodeResponses = { 1707 + /** 1708 + * Custom message: Successful response 1709 + */ 1710 + 200: unknown; 1711 + }; 1712 + 1459 1713 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1460 1714 body?: never; 1461 1715 path?: never; ··· 1467 1721 }; 1468 1722 }; 1469 1723 1470 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1724 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1725 + /** 1726 + * Successful response 1727 + */ 1728 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1729 + }; 1730 + 1731 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1471 1732 1472 1733 export type PutWithFormUrlEncodedData = { 1473 1734 body: ArrayWithStrings;
+290 -29
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/types.gen.ts
··· 951 951 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 952 952 }; 953 953 954 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 954 + export type ImportResponses = { 955 + /** 956 + * Success 957 + */ 958 + 200: Model_From_Zendesk; 959 + /** 960 + * Default success response 961 + */ 962 + default: ModelWithReadOnlyAndWriteOnly; 963 + }; 964 + 965 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 955 966 956 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 967 + export type ApiVversionOdataControllerCountResponses = { 968 + /** 969 + * Success 970 + */ 971 + 200: Model_From_Zendesk; 972 + }; 973 + 974 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 957 975 958 976 export type GetApiVbyApiVersionSimpleOperationData = { 959 977 body?: never; ··· 966 984 query?: never; 967 985 }; 968 986 969 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 987 + export type GetApiVbyApiVersionSimpleOperationErrors = { 988 + /** 989 + * Default error response 990 + */ 991 + default: ModelWithBoolean; 992 + }; 970 993 971 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 994 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 995 + 996 + export type GetApiVbyApiVersionSimpleOperationResponses = { 997 + /** 998 + * Response is a simple number 999 + */ 1000 + 200: number; 1001 + }; 1002 + 1003 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 972 1004 973 1005 export type DeleteFooData3 = { 974 1006 body?: never; ··· 1140 1172 }; 1141 1173 }; 1142 1174 1143 - export type PostCallWithOptionalParamResponse = number | void; 1175 + export type PostCallWithOptionalParamResponses = { 1176 + /** 1177 + * Response is a simple number 1178 + */ 1179 + 200: number; 1180 + /** 1181 + * Success 1182 + */ 1183 + 204: void; 1184 + }; 1185 + 1186 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1144 1187 1145 1188 export type PostApiVbyApiVersionRequestBodyData = { 1146 1189 /** ··· 1263 1306 }; 1264 1307 }; 1265 1308 1266 - export type CallWithNoContentResponseResponse = void; 1309 + export type CallWithNoContentResponseResponses = { 1310 + /** 1311 + * Success 1312 + */ 1313 + 204: void; 1314 + }; 1267 1315 1268 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1316 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1269 1317 1270 - export type DummyAResponse = _400; 1318 + export type CallWithResponseAndNoContentResponseResponses = { 1319 + /** 1320 + * Response is a simple number 1321 + */ 1322 + 200: number; 1323 + /** 1324 + * Success 1325 + */ 1326 + 204: void; 1327 + }; 1271 1328 1272 - export type DummyBResponse = void; 1329 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1273 1330 1274 - export type CallWithResponseResponse = _import; 1331 + export type DummyAResponses = { 1332 + 200: _400; 1333 + }; 1275 1334 1276 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1335 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1277 1336 1278 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1337 + export type DummyBResponses = { 1338 + /** 1339 + * Success 1340 + */ 1341 + 204: void; 1342 + }; 1343 + 1344 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1279 1345 1280 - export type CallWithResponsesError = ModelWithStringError; 1346 + export type CallWithResponseResponses = { 1347 + default: _import; 1348 + }; 1349 + 1350 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1351 + 1352 + export type CallWithDuplicateResponsesErrors = { 1353 + /** 1354 + * Message for 500 error 1355 + */ 1356 + 500: ModelWithStringError; 1357 + /** 1358 + * Message for 501 error 1359 + */ 1360 + 501: ModelWithStringError; 1361 + /** 1362 + * Message for 502 error 1363 + */ 1364 + 502: ModelWithStringError; 1365 + /** 1366 + * Message for 4XX errors 1367 + */ 1368 + '4XX': DictionaryWithArray; 1369 + /** 1370 + * Default error response 1371 + */ 1372 + default: ModelWithBoolean; 1373 + }; 1374 + 1375 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1376 + 1377 + export type CallWithDuplicateResponsesResponses = { 1378 + /** 1379 + * Message for 200 response 1380 + */ 1381 + 200: ModelWithBoolean & ModelWithInteger; 1382 + /** 1383 + * Message for 201 response 1384 + */ 1385 + 201: ModelWithString; 1386 + /** 1387 + * Message for 202 response 1388 + */ 1389 + 202: ModelWithString; 1390 + }; 1391 + 1392 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1393 + 1394 + export type CallWithResponsesErrors = { 1395 + /** 1396 + * Message for 500 error 1397 + */ 1398 + 500: ModelWithStringError; 1399 + /** 1400 + * Message for 501 error 1401 + */ 1402 + 501: ModelWithStringError; 1403 + /** 1404 + * Message for 502 error 1405 + */ 1406 + 502: ModelWithStringError; 1407 + /** 1408 + * Message for default response 1409 + */ 1410 + default: ModelWithStringError; 1411 + }; 1412 + 1413 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1414 + 1415 + export type CallWithResponsesResponses = { 1416 + /** 1417 + * Message for 200 response 1418 + */ 1419 + 200: { 1420 + readonly '@namespace.string'?: string; 1421 + readonly '@namespace.integer'?: number; 1422 + readonly value?: Array<ModelWithString>; 1423 + }; 1424 + /** 1425 + * Message for 201 response 1426 + */ 1427 + 201: ModelThatExtends; 1428 + /** 1429 + * Message for 202 response 1430 + */ 1431 + 202: ModelThatExtendsExtends; 1432 + }; 1281 1433 1282 - export type CallWithResponsesResponse = { 1283 - readonly '@namespace.string'?: string; 1284 - readonly '@namespace.integer'?: number; 1285 - readonly value?: Array<ModelWithString>; 1286 - } | ModelThatExtends | ModelThatExtendsExtends; 1434 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1287 1435 1288 1436 export type CollectionFormatData = { 1289 1437 body?: never; ··· 1352 1500 }; 1353 1501 }; 1354 1502 1355 - export type TypesResponse = number | string | boolean | {}; 1503 + export type TypesResponses = { 1504 + /** 1505 + * Response is a simple number 1506 + */ 1507 + 200: number; 1508 + /** 1509 + * Response is a simple string 1510 + */ 1511 + 201: string; 1512 + /** 1513 + * Response is a simple boolean 1514 + */ 1515 + 202: boolean; 1516 + /** 1517 + * Response is a simple object 1518 + */ 1519 + 203: {}; 1520 + }; 1521 + 1522 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1356 1523 1357 1524 export type UploadFileData = { 1358 1525 body: Blob | File; ··· 1365 1532 query?: never; 1366 1533 }; 1367 1534 1368 - export type UploadFileResponse = boolean; 1535 + export type UploadFileResponses = { 1536 + 200: boolean; 1537 + }; 1538 + 1539 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1369 1540 1370 1541 export type FileResponseData = { 1371 1542 body?: never; ··· 1379 1550 query?: never; 1380 1551 }; 1381 1552 1382 - export type FileResponseResponse = Blob | File; 1553 + export type FileResponseResponses = { 1554 + /** 1555 + * Success 1556 + */ 1557 + 200: Blob | File; 1558 + }; 1559 + 1560 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1383 1561 1384 1562 export type ComplexTypesData = { 1385 1563 body?: never; ··· 1402 1580 }; 1403 1581 }; 1404 1582 1405 - export type ComplexTypesResponse = Array<ModelWithString>; 1583 + export type ComplexTypesErrors = { 1584 + /** 1585 + * 400 `server` error 1586 + */ 1587 + 400: unknown; 1588 + /** 1589 + * 500 server error 1590 + */ 1591 + 500: unknown; 1592 + }; 1593 + 1594 + export type ComplexTypesResponses = { 1595 + /** 1596 + * Successful response 1597 + */ 1598 + 200: Array<ModelWithString>; 1599 + }; 1600 + 1601 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1406 1602 1407 - export type MultipartResponseResponse = { 1408 - file?: Blob | File; 1409 - metadata?: { 1410 - foo?: string; 1411 - bar?: string; 1603 + export type MultipartResponseResponses = { 1604 + /** 1605 + * OK 1606 + */ 1607 + 200: { 1608 + file?: Blob | File; 1609 + metadata?: { 1610 + foo?: string; 1611 + bar?: string; 1612 + }; 1412 1613 }; 1413 1614 }; 1615 + 1616 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1414 1617 1415 1618 export type MultipartRequestData = { 1416 1619 body?: { ··· 1443 1646 query?: never; 1444 1647 }; 1445 1648 1446 - export type ComplexParamsResponse = ModelWithString; 1649 + export type ComplexParamsResponses = { 1650 + /** 1651 + * Success 1652 + */ 1653 + 200: ModelWithString; 1654 + }; 1655 + 1656 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1657 + 1658 + export type CallWithResultFromHeaderErrors = { 1659 + /** 1660 + * 400 server error 1661 + */ 1662 + 400: unknown; 1663 + /** 1664 + * 500 server error 1665 + */ 1666 + 500: unknown; 1667 + }; 1668 + 1669 + export type CallWithResultFromHeaderResponses = { 1670 + /** 1671 + * Successful response 1672 + */ 1673 + 200: unknown; 1674 + }; 1447 1675 1448 1676 export type TestErrorCodeData = { 1449 1677 body?: never; ··· 1456 1684 }; 1457 1685 }; 1458 1686 1687 + export type TestErrorCodeErrors = { 1688 + /** 1689 + * Custom message: Internal Server Error 1690 + */ 1691 + 500: unknown; 1692 + /** 1693 + * Custom message: Not Implemented 1694 + */ 1695 + 501: unknown; 1696 + /** 1697 + * Custom message: Bad Gateway 1698 + */ 1699 + 502: unknown; 1700 + /** 1701 + * Custom message: Service Unavailable 1702 + */ 1703 + 503: unknown; 1704 + }; 1705 + 1706 + export type TestErrorCodeResponses = { 1707 + /** 1708 + * Custom message: Successful response 1709 + */ 1710 + 200: unknown; 1711 + }; 1712 + 1459 1713 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1460 1714 body?: never; 1461 1715 path?: never; ··· 1467 1721 }; 1468 1722 }; 1469 1723 1470 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1724 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1725 + /** 1726 + * Successful response 1727 + */ 1728 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1729 + }; 1730 + 1731 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1471 1732 1472 1733 export type PutWithFormUrlEncodedData = { 1473 1734 body: ArrayWithStrings;
+21 -1052
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/fastify/default/fastify.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 + import type { ImportData, ImportResponses, ApiVversionOdataControllerCountResponses, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponses, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponses, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, CallWithNoContentResponseResponses, CallWithResponseAndNoContentResponseResponses, DummyAResponses, DummyBResponses, CallWithResponseResponses, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponses, CallWithResponsesErrors, CallWithResponsesResponses, CollectionFormatData, TypesData, TypesResponses, UploadFileData, UploadFileResponses, FileResponseData, FileResponseResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponses, MultipartResponseResponses, MultipartRequestData, ComplexParamsData, ComplexParamsResponses, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Responses, PutWithFormUrlEncodedData } from './types.gen'; 3 4 import type { RouteHandler } from 'fastify'; 4 - import type { ImportData, GetApiVbyApiVersionSimpleOperationData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, CollectionFormatData, TypesData, UploadFileData, FileResponseData, ComplexTypesData, MultipartRequestData, ComplexParamsData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, PutWithFormUrlEncodedData } from './types.gen'; 5 - 6 - /** 7 - * Model with number-only name 8 - */ 9 - export type _400 = string; 10 - 11 - /** 12 - * Testing multiline comments in string: First line 13 - * Second line 14 - * 15 - * Fourth line 16 - */ 17 - export type camelCaseCommentWithBreaks = number; 18 - 19 - /** 20 - * Testing multiline comments in string: First line 21 - * Second line 22 - * 23 - * Fourth line 24 - */ 25 - export type CommentWithBreaks = number; 26 - 27 - /** 28 - * Testing backticks in string: `backticks` and ```multiple backticks``` should work 29 - */ 30 - export type CommentWithBackticks = number; 31 - 32 - /** 33 - * Testing backticks and quotes in string: `backticks`, 'quotes', "double quotes" and ```multiple backticks``` should work 34 - */ 35 - export type CommentWithBackticksAndQuotes = number; 36 - 37 - /** 38 - * Testing slashes in string: \backwards\\\ and /forwards/// should work 39 - */ 40 - export type CommentWithSlashes = number; 41 - 42 - /** 43 - * Testing expression placeholders in string: ${expression} should work 44 - */ 45 - export type CommentWithExpressionPlaceholders = number; 46 - 47 - /** 48 - * Testing quotes in string: 'single quote''' and "double quotes""" should work 49 - */ 50 - export type CommentWithQuotes = number; 51 - 52 - /** 53 - * Testing reserved characters in string: * inline * and ** inline ** should work 54 - */ 55 - export type CommentWithReservedCharacters = number; 56 - 57 - /** 58 - * This is a simple number 59 - */ 60 - export type SimpleInteger = number; 61 - 62 - /** 63 - * This is a simple boolean 64 - */ 65 - export type SimpleBoolean = boolean; 66 - 67 - /** 68 - * This is a simple string 69 - */ 70 - export type SimpleString = string; 71 - 72 - /** 73 - * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串) 74 - */ 75 - export type NonAsciiStringæøåÆØÅöôêÊ字符串 = string; 76 - 77 - /** 78 - * This is a simple file 79 - */ 80 - export type SimpleFile = Blob | File; 81 - 82 - /** 83 - * This is a simple reference 84 - */ 85 - export type SimpleReference = ModelWithString; 86 - 87 - /** 88 - * This is a simple string 89 - */ 90 - export type SimpleStringWithPattern = string | null; 91 - 92 - /** 93 - * This is a simple enum with strings 94 - */ 95 - export type EnumWithStrings = 'Success' | 'Warning' | 'Error' | "'Single Quote'" | '"Double Quotes"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串'; 96 - 97 - export type EnumWithReplacedCharacters = "'Single Quote'" | '"Double Quotes"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | ''; 98 - 99 - /** 100 - * This is a simple enum with numbers 101 - */ 102 - export type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3; 103 - 104 - /** 105 - * Success=1,Warning=2,Error=3 106 - */ 107 - export type EnumFromDescription = number; 108 - 109 - /** 110 - * This is a simple enum with numbers 111 - */ 112 - export type EnumWithExtensions = 200 | 400 | 500; 113 - 114 - export type EnumWithXEnumNames = 0 | 1 | 2; 115 - 116 - /** 117 - * This is a simple array with numbers 118 - */ 119 - export type ArrayWithNumbers = Array<number>; 120 - 121 - /** 122 - * This is a simple array with booleans 123 - */ 124 - export type ArrayWithBooleans = Array<boolean>; 125 - 126 - /** 127 - * This is a simple array with strings 128 - */ 129 - export type ArrayWithStrings = Array<string>; 130 - 131 - /** 132 - * This is a simple array with references 133 - */ 134 - export type ArrayWithReferences = Array<ModelWithString>; 135 - 136 - /** 137 - * This is a simple array containing an array 138 - */ 139 - export type ArrayWithArray = Array<Array<ModelWithString>>; 140 - 141 - /** 142 - * This is a simple array with properties 143 - */ 144 - export type ArrayWithProperties = Array<{ 145 - '16x16'?: camelCaseCommentWithBreaks; 146 - bar?: string; 147 - }>; 148 - 149 - /** 150 - * This is a simple array with any of properties 151 - */ 152 - export type ArrayWithAnyOfProperties = Array<{ 153 - foo?: string; 154 - } | { 155 - bar?: string; 156 - }>; 157 - 158 - export type AnyOfAnyAndNull = { 159 - data?: unknown | null; 160 - }; 161 - 162 - /** 163 - * This is a simple array with any of properties 164 - */ 165 - export type AnyOfArrays = { 166 - results?: Array<{ 167 - foo?: string; 168 - } | { 169 - bar?: string; 170 - }>; 171 - }; 172 - 173 - /** 174 - * This is a string dictionary 175 - */ 176 - export type DictionaryWithString = { 177 - [key: string]: string; 178 - }; 179 - 180 - export type DictionaryWithPropertiesAndAdditionalProperties = { 181 - foo?: number; 182 - bar?: boolean; 183 - [key: string]: string | number | boolean | undefined; 184 - }; 185 - 186 - /** 187 - * This is a string reference 188 - */ 189 - export type DictionaryWithReference = { 190 - [key: string]: ModelWithString; 191 - }; 192 - 193 - /** 194 - * This is a complex dictionary 195 - */ 196 - export type DictionaryWithArray = { 197 - [key: string]: Array<ModelWithString>; 198 - }; 199 - 200 - /** 201 - * This is a string dictionary 202 - */ 203 - export type DictionaryWithDictionary = { 204 - [key: string]: { 205 - [key: string]: string; 206 - }; 207 - }; 208 - 209 - /** 210 - * This is a complex dictionary 211 - */ 212 - export type DictionaryWithProperties = { 213 - [key: string]: { 214 - foo?: string; 215 - bar?: string; 216 - }; 217 - }; 218 - 219 - /** 220 - * This is a model with one number property 221 - */ 222 - export type ModelWithInteger = { 223 - /** 224 - * This is a simple number property 225 - */ 226 - prop?: number; 227 - }; 228 - 229 - /** 230 - * This is a model with one boolean property 231 - */ 232 - export type ModelWithBoolean = { 233 - /** 234 - * This is a simple boolean property 235 - */ 236 - prop?: boolean; 237 - }; 238 - 239 - /** 240 - * This is a model with one string property 241 - */ 242 - export type ModelWithString = { 243 - /** 244 - * This is a simple string property 245 - */ 246 - prop?: string; 247 - }; 248 - 249 - /** 250 - * This is a model with one string property 251 - */ 252 - export type ModelWithStringError = { 253 - /** 254 - * This is a simple string property 255 - */ 256 - prop?: string; 257 - }; 258 - 259 - /** 260 - * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets) 261 - */ 262 - export type Model_From_Zendesk = string; 263 - 264 - /** 265 - * This is a model with one string property 266 - */ 267 - export type ModelWithNullableString = { 268 - /** 269 - * This is a simple string property 270 - */ 271 - nullableProp1?: string | null; 272 - /** 273 - * This is a simple string property 274 - */ 275 - nullableRequiredProp1: string | null; 276 - /** 277 - * This is a simple string property 278 - */ 279 - nullableProp2?: string | null; 280 - /** 281 - * This is a simple string property 282 - */ 283 - nullableRequiredProp2: string | null; 284 - /** 285 - * This is a simple enum with strings 286 - */ 287 - 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; 288 - }; 289 - 290 - /** 291 - * This is a model with one enum 292 - */ 293 - export type ModelWithEnum = { 294 - /** 295 - * This is a simple enum with strings 296 - */ 297 - 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; 298 - /** 299 - * These are the HTTP error code enums 300 - */ 301 - statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar'; 302 - /** 303 - * Simple boolean enum 304 - */ 305 - bool?: true; 306 - }; 307 - 308 - /** 309 - * This is a model with one enum with escaped name 310 - */ 311 - export type ModelWithEnumWithHyphen = { 312 - 'foo-bar-baz-qux'?: '3.0'; 313 - }; 314 - 315 - /** 316 - * This is a model with one enum 317 - */ 318 - export type ModelWithEnumFromDescription = { 319 - /** 320 - * Success=1,Warning=2,Error=3 321 - */ 322 - test?: number; 323 - }; 324 - 325 - /** 326 - * This is a model with nested enums 327 - */ 328 - export type ModelWithNestedEnums = { 329 - dictionaryWithEnum?: { 330 - [key: string]: 'Success' | 'Warning' | 'Error'; 331 - }; 332 - dictionaryWithEnumFromDescription?: { 333 - [key: string]: number; 334 - }; 335 - arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>; 336 - arrayWithDescription?: Array<number>; 337 - /** 338 - * This is a simple enum with strings 339 - */ 340 - 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; 341 - }; 342 - 343 - /** 344 - * This is a model with one property containing a reference 345 - */ 346 - export type ModelWithReference = { 347 - prop?: ModelWithProperties; 348 - }; 349 - 350 - /** 351 - * This is a model with one property containing an array 352 - */ 353 - export type ModelWithArrayReadOnlyAndWriteOnly = { 354 - prop?: Array<ModelWithReadOnlyAndWriteOnly>; 355 - propWithFile?: Array<Blob | File>; 356 - propWithNumber?: Array<number>; 357 - }; 358 - 359 - /** 360 - * This is a model with one property containing an array 361 - */ 362 - export type ModelWithArray = { 363 - prop?: Array<ModelWithString>; 364 - propWithFile?: Array<Blob | File>; 365 - propWithNumber?: Array<number>; 366 - }; 367 - 368 - /** 369 - * This is a model with one property containing a dictionary 370 - */ 371 - export type ModelWithDictionary = { 372 - prop?: { 373 - [key: string]: string; 374 - }; 375 - }; 376 - 377 - /** 378 - * This is a deprecated model with a deprecated property 379 - * @deprecated 380 - */ 381 - export type DeprecatedModel = { 382 - /** 383 - * This is a deprecated property 384 - * @deprecated 385 - */ 386 - prop?: string; 387 - }; 388 - 389 - /** 390 - * This is a model with one property containing a circular reference 391 - */ 392 - export type ModelWithCircularReference = { 393 - prop?: ModelWithCircularReference; 394 - }; 395 - 396 - /** 397 - * This is a model with one property with a 'one of' relationship 398 - */ 399 - export type CompositionWithOneOf = { 400 - propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; 401 - }; 402 - 403 - /** 404 - * This is a model with one property with a 'one of' relationship where the options are not $ref 405 - */ 406 - export type CompositionWithOneOfAnonymous = { 407 - propA?: { 408 - propA?: string; 409 - } | string | number; 410 - }; 411 - 412 - /** 413 - * Circle 414 - */ 415 - export type ModelCircle = { 416 - kind: string; 417 - radius?: number; 418 - }; 419 - 420 - /** 421 - * Square 422 - */ 423 - export type ModelSquare = { 424 - kind: string; 425 - sideLength?: number; 426 - }; 427 - 428 - /** 429 - * This is a model with one property with a 'one of' relationship where the options are not $ref 430 - */ 431 - export type CompositionWithOneOfDiscriminator = ({ 432 - kind?: 'circle'; 433 - } & ModelCircle) | ({ 434 - kind?: 'square'; 435 - } & ModelSquare); 436 - 437 - /** 438 - * This is a model with one property with a 'any of' relationship 439 - */ 440 - export type CompositionWithAnyOf = { 441 - propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; 442 - }; 443 - 444 - /** 445 - * This is a model with one property with a 'any of' relationship where the options are not $ref 446 - */ 447 - export type CompositionWithAnyOfAnonymous = { 448 - propA?: { 449 - propA?: string; 450 - } | string | number; 451 - }; 452 - 453 - /** 454 - * This is a model with nested 'any of' property with a type null 455 - */ 456 - export type CompositionWithNestedAnyAndTypeNull = { 457 - propA?: Array<ModelWithDictionary | null> | Array<ModelWithArray | null>; 458 - }; 459 - 460 - export type _3e_num_1Период = 'Bird' | 'Dog'; 461 - 462 - export type ConstValue = 'ConstValue'; 463 - 464 - /** 465 - * This is a model with one property with a 'any of' relationship where the options are not $ref 466 - */ 467 - export type CompositionWithNestedAnyOfAndNull = { 468 - propA?: Array<_3e_num_1Период | ConstValue> | null; 469 - }; 470 - 471 - /** 472 - * This is a model with one property with a 'one of' relationship 473 - */ 474 - export type CompositionWithOneOfAndNullable = { 475 - propA?: { 476 - boolean?: boolean; 477 - } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null; 478 - }; 479 - 480 - /** 481 - * This is a model that contains a simple dictionary within composition 482 - */ 483 - export type CompositionWithOneOfAndSimpleDictionary = { 484 - propA?: boolean | { 485 - [key: string]: number; 486 - }; 487 - }; 488 - 489 - /** 490 - * This is a model that contains a dictionary of simple arrays within composition 491 - */ 492 - export type CompositionWithOneOfAndSimpleArrayDictionary = { 493 - propA?: boolean | { 494 - [key: string]: Array<boolean>; 495 - }; 496 - }; 497 - 498 - /** 499 - * This is a model that contains a dictionary of complex arrays (composited) within composition 500 - */ 501 - export type CompositionWithOneOfAndComplexArrayDictionary = { 502 - propA?: boolean | { 503 - [key: string]: Array<number | string>; 504 - }; 505 - }; 506 - 507 - /** 508 - * This is a model with one property with a 'all of' relationship 509 - */ 510 - export type CompositionWithAllOfAndNullable = { 511 - propA?: ({ 512 - boolean?: boolean; 513 - } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null; 514 - }; 515 - 516 - /** 517 - * This is a model with one property with a 'any of' relationship 518 - */ 519 - export type CompositionWithAnyOfAndNullable = { 520 - propA?: { 521 - boolean?: boolean; 522 - } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null; 523 - }; 524 - 525 - /** 526 - * This is a base model with two simple optional properties 527 - */ 528 - export type CompositionBaseModel = { 529 - firstName?: string; 530 - lastname?: string; 531 - }; 532 - 533 - /** 534 - * This is a model that extends the base model 535 - */ 536 - export type CompositionExtendedModel = CompositionBaseModel & { 537 - age: number; 538 - firstName: string; 539 - lastname: string; 540 - }; 541 - 542 - /** 543 - * This is a model with one nested property 544 - */ 545 - export type ModelWithProperties = { 546 - required: string; 547 - readonly requiredAndReadOnly: string; 548 - requiredAndNullable: string | null; 549 - string?: string; 550 - number?: number; 551 - boolean?: boolean; 552 - reference?: ModelWithString; 553 - 'property with space'?: string; 554 - default?: string; 555 - try?: string; 556 - readonly '@namespace.string'?: string; 557 - readonly '@namespace.integer'?: number; 558 - }; 559 - 560 - /** 561 - * This is a model with one nested property 562 - */ 563 - export type ModelWithNestedProperties = { 564 - readonly first: { 565 - readonly second: { 566 - readonly third: string | null; 567 - } | null; 568 - } | null; 569 - }; 570 - 571 - /** 572 - * This is a model with duplicated properties 573 - */ 574 - export type ModelWithDuplicateProperties = { 575 - prop?: ModelWithString; 576 - }; 577 - 578 - /** 579 - * This is a model with ordered properties 580 - */ 581 - export type ModelWithOrderedProperties = { 582 - zebra?: string; 583 - apple?: string; 584 - hawaii?: string; 585 - }; 586 - 587 - /** 588 - * This is a model with duplicated imports 589 - */ 590 - export type ModelWithDuplicateImports = { 591 - propA?: ModelWithString; 592 - propB?: ModelWithString; 593 - propC?: ModelWithString; 594 - }; 595 - 596 - /** 597 - * This is a model that extends another model 598 - */ 599 - export type ModelThatExtends = ModelWithString & { 600 - propExtendsA?: string; 601 - propExtendsB?: ModelWithString; 602 - }; 603 - 604 - /** 605 - * This is a model that extends another model 606 - */ 607 - export type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & { 608 - propExtendsC?: string; 609 - propExtendsD?: ModelWithString; 610 - }; 611 - 612 - /** 613 - * This is a model that contains a some patterns 614 - */ 615 - export type ModelWithPattern = { 616 - key: string; 617 - name: string; 618 - readonly enabled?: boolean; 619 - readonly modified?: string; 620 - id?: string; 621 - text?: string; 622 - patternWithSingleQuotes?: string; 623 - patternWithNewline?: string; 624 - patternWithBacktick?: string; 625 - }; 626 - 627 - export type File = { 628 - readonly id?: string; 629 - readonly updated_at?: string; 630 - readonly created_at?: string; 631 - mime: string; 632 - readonly file?: string; 633 - }; 634 - 635 - export type _default = { 636 - name?: string; 637 - }; 638 - 639 - export type Pageable = { 640 - page?: number; 641 - size?: number; 642 - sort?: Array<string>; 643 - }; 644 - 645 - /** 646 - * This is a free-form object without additionalProperties. 647 - */ 648 - export type FreeFormObjectWithoutAdditionalProperties = {}; 649 - 650 - /** 651 - * This is a free-form object with additionalProperties: true. 652 - */ 653 - export type FreeFormObjectWithAdditionalPropertiesEqTrue = { 654 - [key: string]: unknown; 655 - }; 656 - 657 - /** 658 - * This is a free-form object with additionalProperties: {}. 659 - */ 660 - export type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {}; 661 - 662 - export type ModelWithConst = { 663 - String?: 'String'; 664 - number?: 0; 665 - null?: null; 666 - withType?: 'Some string'; 667 - }; 668 - 669 - /** 670 - * This is a model with one property and additionalProperties: true 671 - */ 672 - export type ModelWithAdditionalPropertiesEqTrue = { 673 - /** 674 - * This is a simple string property 675 - */ 676 - prop?: string; 677 - [key: string]: unknown | string | undefined; 678 - }; 679 - 680 - export type NestedAnyOfArraysNullable = { 681 - nullableArray?: Array<string | boolean> | null; 682 - }; 683 - 684 - export type CompositionWithOneOfAndProperties = ({ 685 - foo: SimpleParameter; 686 - } | { 687 - bar: NonAsciiStringæøåÆØÅöôêÊ字符串; 688 - }) & { 689 - baz: number | null; 690 - qux: number; 691 - }; 692 - 693 - /** 694 - * An object that can be null 695 - */ 696 - export type NullableObject = { 697 - foo?: string; 698 - } | null; 699 - 700 - /** 701 - * Some % character 702 - */ 703 - export type CharactersInDescription = string; 704 - 705 - export type ModelWithNullableObject = { 706 - data?: NullableObject; 707 - }; 708 - 709 - export type ModelWithOneOfEnum = { 710 - foo: 'Bar'; 711 - } | { 712 - foo: 'Baz'; 713 - } | { 714 - foo: 'Qux'; 715 - } | { 716 - content: string; 717 - foo: 'Quux'; 718 - } | { 719 - content: [ 720 - string, 721 - string 722 - ]; 723 - foo: 'Corge'; 724 - }; 725 - 726 - export type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar'; 727 - 728 - export type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux'; 729 - 730 - export type ModelWithNestedArrayEnumsData = { 731 - foo?: Array<ModelWithNestedArrayEnumsDataFoo>; 732 - bar?: Array<ModelWithNestedArrayEnumsDataBar>; 733 - }; 734 - 735 - export type ModelWithNestedArrayEnums = { 736 - array_strings?: Array<string>; 737 - data?: ModelWithNestedArrayEnumsData; 738 - }; 739 - 740 - export type ModelWithNestedCompositionEnums = { 741 - foo?: ModelWithNestedArrayEnumsDataFoo; 742 - }; 743 - 744 - export type ModelWithReadOnlyAndWriteOnly = { 745 - foo: string; 746 - readonly bar: string; 747 - baz: string; 748 - }; 749 - 750 - export type ModelWithConstantSizeArray = [ 751 - number, 752 - number 753 - ]; 754 - 755 - export type ModelWithAnyOfConstantSizeArray = [ 756 - number | string, 757 - number | string, 758 - number | string 759 - ]; 760 - 761 - export type ModelWithPrefixItemsConstantSizeArray = [ 762 - ModelWithInteger, 763 - number | string, 764 - string 765 - ]; 766 - 767 - export type ModelWithAnyOfConstantSizeArrayNullable = [ 768 - number | null | string, 769 - number | null | string, 770 - number | null | string 771 - ]; 772 - 773 - export type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [ 774 - number | _import, 775 - number | _import 776 - ]; 777 - 778 - export type ModelWithAnyOfConstantSizeArrayAndIntersect = [ 779 - number & string, 780 - number & string 781 - ]; 782 - 783 - export type ModelWithNumericEnumUnion = { 784 - /** 785 - * Период 786 - */ 787 - value?: -10 | -1 | 0 | 1 | 3 | 6 | 12; 788 - }; 789 - 790 - /** 791 - * Some description with `back ticks` 792 - */ 793 - export type ModelWithBackticksInDescription = { 794 - /** 795 - * The template `that` should be used for parsing and importing the contents of the CSV file. 796 - * 797 - * <br/><p>There is one placeholder currently supported:<ul> <li><b>${x}</b> - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)</li></ul><p>Example of a correct JSON template:</p> 798 - * <pre> 799 - * [ 800 - * { 801 - * "resourceType": "Asset", 802 - * "identifier": { 803 - * "name": "${1}", 804 - * "domain": { 805 - * "name": "${2}", 806 - * "community": { 807 - * "name": "Some Community" 808 - * } 809 - * } 810 - * }, 811 - * "attributes" : { 812 - * "00000000-0000-0000-0000-000000003115" : [ { 813 - * "value" : "${3}" 814 - * } ], 815 - * "00000000-0000-0000-0000-000000000222" : [ { 816 - * "value" : "${4}" 817 - * } ] 818 - * } 819 - * } 820 - * ] 821 - * </pre> 822 - */ 823 - template?: string; 824 - }; 825 - 826 - export type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆØÅöôêÊ字符串) & { 827 - baz: number | null; 828 - qux: number; 829 - }; 830 - 831 - /** 832 - * Model used to test deduplication strategy (unused) 833 - */ 834 - export type ParameterSimpleParameterUnused = string; 835 - 836 - /** 837 - * Model used to test deduplication strategy 838 - */ 839 - export type PostServiceWithEmptyTagResponse = string; 840 - 841 - /** 842 - * Model used to test deduplication strategy 843 - */ 844 - export type PostServiceWithEmptyTagResponse2 = string; 845 - 846 - /** 847 - * Model used to test deduplication strategy 848 - */ 849 - export type DeleteFooData = string; 850 - 851 - /** 852 - * Model used to test deduplication strategy 853 - */ 854 - export type DeleteFooData2 = string; 855 - 856 - /** 857 - * Model with restricted keyword name 858 - */ 859 - export type _import = string; 860 - 861 - export type SchemaWithFormRestrictedKeys = { 862 - description?: string; 863 - 'x-enum-descriptions'?: string; 864 - 'x-enum-varnames'?: string; 865 - 'x-enumNames'?: string; 866 - title?: string; 867 - object?: { 868 - description?: string; 869 - 'x-enum-descriptions'?: string; 870 - 'x-enum-varnames'?: string; 871 - 'x-enumNames'?: string; 872 - title?: string; 873 - }; 874 - array?: Array<{ 875 - description?: string; 876 - 'x-enum-descriptions'?: string; 877 - 'x-enum-varnames'?: string; 878 - 'x-enumNames'?: string; 879 - title?: string; 880 - }>; 881 - }; 882 - 883 - /** 884 - * This schema was giving PascalCase transformations a hard time 885 - */ 886 - export type io_k8s_apimachinery_pkg_apis_meta_v1_DeleteOptions = { 887 - /** 888 - * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned. 889 - */ 890 - preconditions?: io_k8s_apimachinery_pkg_apis_meta_v1_Preconditions; 891 - }; 892 - 893 - /** 894 - * This schema was giving PascalCase transformations a hard time 895 - */ 896 - export type io_k8s_apimachinery_pkg_apis_meta_v1_Preconditions = { 897 - /** 898 - * Specifies the target ResourceVersion 899 - */ 900 - resourceVersion?: string; 901 - /** 902 - * Specifies the target UID. 903 - */ 904 - uid?: string; 905 - }; 906 - 907 - export type AdditionalPropertiesUnknownIssue = { 908 - [key: string]: string | number; 909 - }; 910 - 911 - export type AdditionalPropertiesUnknownIssue2 = { 912 - [key: string]: string | number; 913 - }; 914 - 915 - export type AdditionalPropertiesUnknownIssue3 = string & { 916 - entries: { 917 - [key: string]: AdditionalPropertiesUnknownIssue; 918 - }; 919 - }; 920 - 921 - export type AdditionalPropertiesIntegerIssue = { 922 - value: number; 923 - [key: string]: number; 924 - }; 925 - 926 - export type OneOfAllOfIssue = ((ConstValue | Generic_Schema_Duplicate_Issue_1_System_Boolean_) & _3e_num_1Период) | Generic_Schema_Duplicate_Issue_1_System_String_; 927 - 928 - export type Generic_Schema_Duplicate_Issue_1_System_Boolean_ = { 929 - item?: boolean; 930 - error?: string | null; 931 - readonly hasError?: boolean; 932 - data?: { 933 - [key: string]: never; 934 - }; 935 - }; 936 - 937 - export type Generic_Schema_Duplicate_Issue_1_System_String_ = { 938 - item?: string | null; 939 - error?: string | null; 940 - readonly hasError?: boolean; 941 - }; 942 - 943 - /** 944 - * This is a reusable parameter 945 - */ 946 - export type SimpleParameter = string; 947 - 948 - /** 949 - * Parameter with illegal characters 950 - */ 951 - export type x_Foo_Bar = ModelWithString; 952 5 953 6 export type RouteHandlers = { 954 - export: RouteHandler<{}>; 955 7 import: RouteHandler<{ 956 8 Body: ImportData['body']; 957 - Reply: { 958 - '200': Model_From_Zendesk; 959 - }; 9 + Reply: ImportResponses; 960 10 }>; 961 11 apiVVersionOdataControllerCount: RouteHandler<{ 962 - Reply: { 963 - '200': Model_From_Zendesk; 964 - }; 12 + Reply: ApiVversionOdataControllerCountResponses; 965 13 }>; 966 14 getApiVbyApiVersionSimpleOperation: RouteHandler<{ 967 15 Params: GetApiVbyApiVersionSimpleOperationData['path']; 968 - Reply: { 969 - '200': number; 970 - }; 16 + Reply: GetApiVbyApiVersionSimpleOperationErrors & GetApiVbyApiVersionSimpleOperationResponses; 971 17 }>; 972 - deleteCallWithoutParametersAndResponse: RouteHandler<{}>; 973 - getCallWithoutParametersAndResponse: RouteHandler<{}>; 974 - headCallWithoutParametersAndResponse: RouteHandler<{}>; 975 - optionsCallWithoutParametersAndResponse: RouteHandler<{}>; 976 - patchCallWithoutParametersAndResponse: RouteHandler<{}>; 977 - postCallWithoutParametersAndResponse: RouteHandler<{}>; 978 - putCallWithoutParametersAndResponse: RouteHandler<{}>; 979 18 deleteFoo: RouteHandler<{ 980 19 Headers: DeleteFooData3['headers']; 981 20 Params: DeleteFooData3['path']; ··· 1005 44 postCallWithOptionalParam: RouteHandler<{ 1006 45 Body: PostCallWithOptionalParamData['body']; 1007 46 Querystring: PostCallWithOptionalParamData['query']; 1008 - Reply: { 1009 - '200': number; 1010 - '204': void; 1011 - }; 47 + Reply: PostCallWithOptionalParamResponses; 1012 48 }>; 1013 49 postApiVbyApiVersionRequestBody: RouteHandler<{ 1014 50 Body: PostApiVbyApiVersionRequestBodyData['body']; ··· 1027 63 callToTestOrderOfParams: RouteHandler<{ 1028 64 Querystring: CallToTestOrderOfParamsData['query']; 1029 65 }>; 1030 - duplicateName: RouteHandler<{}>; 1031 - duplicateName2: RouteHandler<{}>; 1032 - duplicateName3: RouteHandler<{}>; 1033 - duplicateName4: RouteHandler<{}>; 1034 66 callWithNoContentResponse: RouteHandler<{ 1035 - Reply: { 1036 - '204': void; 1037 - }; 67 + Reply: CallWithNoContentResponseResponses; 1038 68 }>; 1039 69 callWithResponseAndNoContentResponse: RouteHandler<{ 1040 - Reply: { 1041 - '200': number; 1042 - '204': void; 1043 - }; 70 + Reply: CallWithResponseAndNoContentResponseResponses; 1044 71 }>; 1045 72 dummyA: RouteHandler<{ 1046 - Reply: { 1047 - '200': _400; 1048 - }; 73 + Reply: DummyAResponses; 1049 74 }>; 1050 75 dummyB: RouteHandler<{ 1051 - Reply: { 1052 - '204': void; 1053 - }; 76 + Reply: DummyBResponses; 1054 77 }>; 1055 78 callWithResponse: RouteHandler<{ 1056 - Reply: {}; 79 + Reply: CallWithResponseResponses; 1057 80 }>; 1058 81 callWithDuplicateResponses: RouteHandler<{ 1059 - Reply: { 1060 - '200': ModelWithBoolean & ModelWithInteger; 1061 - '201': ModelWithString; 1062 - '202': ModelWithString; 1063 - '500': ModelWithStringError; 1064 - '501': ModelWithStringError; 1065 - '502': ModelWithStringError; 1066 - '4XX': DictionaryWithArray; 1067 - }; 82 + Reply: CallWithDuplicateResponsesErrors & CallWithDuplicateResponsesResponses; 1068 83 }>; 1069 84 callWithResponses: RouteHandler<{ 1070 - Reply: { 1071 - '200': { 1072 - readonly '@namespace.string'?: string; 1073 - readonly '@namespace.integer'?: number; 1074 - readonly value?: Array<ModelWithString>; 1075 - }; 1076 - '201': ModelThatExtends; 1077 - '202': ModelThatExtendsExtends; 1078 - '500': ModelWithStringError; 1079 - '501': ModelWithStringError; 1080 - '502': ModelWithStringError; 1081 - }; 85 + Reply: CallWithResponsesErrors & CallWithResponsesResponses; 1082 86 }>; 1083 87 collectionFormat: RouteHandler<{ 1084 88 Querystring: CollectionFormatData['query']; ··· 1086 90 types: RouteHandler<{ 1087 91 Params?: TypesData['path']; 1088 92 Querystring: TypesData['query']; 1089 - Reply: { 1090 - '200': number; 1091 - '201': string; 1092 - '202': boolean; 1093 - '203': {}; 1094 - }; 93 + Reply: TypesResponses; 1095 94 }>; 1096 95 uploadFile: RouteHandler<{ 1097 96 Body: UploadFileData['body']; 1098 97 Params: UploadFileData['path']; 1099 - Reply: { 1100 - '200': boolean; 1101 - }; 98 + Reply: UploadFileResponses; 1102 99 }>; 1103 100 fileResponse: RouteHandler<{ 1104 101 Params: FileResponseData['path']; 1105 - Reply: { 1106 - '200': Blob | File; 1107 - }; 102 + Reply: FileResponseResponses; 1108 103 }>; 1109 104 complexTypes: RouteHandler<{ 1110 105 Querystring: ComplexTypesData['query']; 1111 - Reply: { 1112 - '200': Array<ModelWithString>; 1113 - '400': unknown; 1114 - '500': unknown; 1115 - }; 106 + Reply: ComplexTypesErrors & ComplexTypesResponses; 1116 107 }>; 1117 108 multipartResponse: RouteHandler<{ 1118 - Reply: { 1119 - '200': { 1120 - file?: Blob | File; 1121 - metadata?: { 1122 - foo?: string; 1123 - bar?: string; 1124 - }; 1125 - }; 1126 - }; 109 + Reply: MultipartResponseResponses; 1127 110 }>; 1128 111 multipartRequest: RouteHandler<{ 1129 112 Body: MultipartRequestData['body']; ··· 1131 114 complexParams: RouteHandler<{ 1132 115 Body: ComplexParamsData['body']; 1133 116 Params: ComplexParamsData['path']; 1134 - Reply: { 1135 - '200': ModelWithString; 1136 - }; 117 + Reply: ComplexParamsResponses; 1137 118 }>; 1138 119 callWithResultFromHeader: RouteHandler<{ 1139 - Reply: { 1140 - '200': unknown; 1141 - '400': unknown; 1142 - '500': unknown; 1143 - }; 120 + Reply: CallWithResultFromHeaderErrors & CallWithResultFromHeaderResponses; 1144 121 }>; 1145 122 testErrorCode: RouteHandler<{ 1146 123 Querystring: TestErrorCodeData['query']; 1147 - Reply: { 1148 - '200': unknown; 1149 - '500': unknown; 1150 - '501': unknown; 1151 - '502': unknown; 1152 - '503': unknown; 1153 - }; 124 + Reply: TestErrorCodeErrors & TestErrorCodeResponses; 1154 125 }>; 1155 126 nonAsciiæøåÆøÅöôêÊ字符串: RouteHandler<{ 1156 127 Querystring: NonAsciiæøåÆøÅöôêÊ字符串Data['query']; 1157 - Reply: { 1158 - '200': Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1159 - }; 128 + Reply: NonAsciiæøåÆøÅöôêÊ字符串Responses; 1160 129 }>; 1161 130 putWithFormUrlEncoded: RouteHandler<{ 1162 131 Body: PutWithFormUrlEncodedData['body'];
+290 -29
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/fastify/default/types.gen.ts
··· 951 951 body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 952 952 }; 953 953 954 - export type ImportResponse = Model_From_Zendesk | ModelWithReadOnlyAndWriteOnly; 954 + export type ImportResponses = { 955 + /** 956 + * Success 957 + */ 958 + 200: Model_From_Zendesk; 959 + /** 960 + * Default success response 961 + */ 962 + default: ModelWithReadOnlyAndWriteOnly; 963 + }; 964 + 965 + export type ImportResponse = ImportResponses[keyof ImportResponses]; 955 966 956 - export type ApiVversionOdataControllerCountResponse = Model_From_Zendesk; 967 + export type ApiVversionOdataControllerCountResponses = { 968 + /** 969 + * Success 970 + */ 971 + 200: Model_From_Zendesk; 972 + }; 973 + 974 + export type ApiVversionOdataControllerCountResponse = ApiVversionOdataControllerCountResponses[keyof ApiVversionOdataControllerCountResponses]; 957 975 958 976 export type GetApiVbyApiVersionSimpleOperationData = { 959 977 body?: never; ··· 966 984 query?: never; 967 985 }; 968 986 969 - export type GetApiVbyApiVersionSimpleOperationError = ModelWithBoolean; 987 + export type GetApiVbyApiVersionSimpleOperationErrors = { 988 + /** 989 + * Default error response 990 + */ 991 + default: ModelWithBoolean; 992 + }; 970 993 971 - export type GetApiVbyApiVersionSimpleOperationResponse = number; 994 + export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; 995 + 996 + export type GetApiVbyApiVersionSimpleOperationResponses = { 997 + /** 998 + * Response is a simple number 999 + */ 1000 + 200: number; 1001 + }; 1002 + 1003 + export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; 972 1004 973 1005 export type DeleteFooData3 = { 974 1006 body?: never; ··· 1140 1172 }; 1141 1173 }; 1142 1174 1143 - export type PostCallWithOptionalParamResponse = number | void; 1175 + export type PostCallWithOptionalParamResponses = { 1176 + /** 1177 + * Response is a simple number 1178 + */ 1179 + 200: number; 1180 + /** 1181 + * Success 1182 + */ 1183 + 204: void; 1184 + }; 1185 + 1186 + export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; 1144 1187 1145 1188 export type PostApiVbyApiVersionRequestBodyData = { 1146 1189 /** ··· 1263 1306 }; 1264 1307 }; 1265 1308 1266 - export type CallWithNoContentResponseResponse = void; 1309 + export type CallWithNoContentResponseResponses = { 1310 + /** 1311 + * Success 1312 + */ 1313 + 204: void; 1314 + }; 1267 1315 1268 - export type CallWithResponseAndNoContentResponseResponse = number | void; 1316 + export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; 1269 1317 1270 - export type DummyAResponse = _400; 1318 + export type CallWithResponseAndNoContentResponseResponses = { 1319 + /** 1320 + * Response is a simple number 1321 + */ 1322 + 200: number; 1323 + /** 1324 + * Success 1325 + */ 1326 + 204: void; 1327 + }; 1271 1328 1272 - export type DummyBResponse = void; 1329 + export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; 1273 1330 1274 - export type CallWithResponseResponse = _import; 1331 + export type DummyAResponses = { 1332 + 200: _400; 1333 + }; 1275 1334 1276 - export type CallWithDuplicateResponsesError = ModelWithStringError | DictionaryWithArray | ModelWithBoolean; 1335 + export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; 1277 1336 1278 - export type CallWithDuplicateResponsesResponse = (ModelWithBoolean & ModelWithInteger) | ModelWithString; 1337 + export type DummyBResponses = { 1338 + /** 1339 + * Success 1340 + */ 1341 + 204: void; 1342 + }; 1343 + 1344 + export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; 1279 1345 1280 - export type CallWithResponsesError = ModelWithStringError; 1346 + export type CallWithResponseResponses = { 1347 + default: _import; 1348 + }; 1349 + 1350 + export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; 1351 + 1352 + export type CallWithDuplicateResponsesErrors = { 1353 + /** 1354 + * Message for 500 error 1355 + */ 1356 + 500: ModelWithStringError; 1357 + /** 1358 + * Message for 501 error 1359 + */ 1360 + 501: ModelWithStringError; 1361 + /** 1362 + * Message for 502 error 1363 + */ 1364 + 502: ModelWithStringError; 1365 + /** 1366 + * Message for 4XX errors 1367 + */ 1368 + '4XX': DictionaryWithArray; 1369 + /** 1370 + * Default error response 1371 + */ 1372 + default: ModelWithBoolean; 1373 + }; 1374 + 1375 + export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; 1376 + 1377 + export type CallWithDuplicateResponsesResponses = { 1378 + /** 1379 + * Message for 200 response 1380 + */ 1381 + 200: ModelWithBoolean & ModelWithInteger; 1382 + /** 1383 + * Message for 201 response 1384 + */ 1385 + 201: ModelWithString; 1386 + /** 1387 + * Message for 202 response 1388 + */ 1389 + 202: ModelWithString; 1390 + }; 1391 + 1392 + export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; 1393 + 1394 + export type CallWithResponsesErrors = { 1395 + /** 1396 + * Message for 500 error 1397 + */ 1398 + 500: ModelWithStringError; 1399 + /** 1400 + * Message for 501 error 1401 + */ 1402 + 501: ModelWithStringError; 1403 + /** 1404 + * Message for 502 error 1405 + */ 1406 + 502: ModelWithStringError; 1407 + /** 1408 + * Message for default response 1409 + */ 1410 + default: ModelWithStringError; 1411 + }; 1412 + 1413 + export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; 1414 + 1415 + export type CallWithResponsesResponses = { 1416 + /** 1417 + * Message for 200 response 1418 + */ 1419 + 200: { 1420 + readonly '@namespace.string'?: string; 1421 + readonly '@namespace.integer'?: number; 1422 + readonly value?: Array<ModelWithString>; 1423 + }; 1424 + /** 1425 + * Message for 201 response 1426 + */ 1427 + 201: ModelThatExtends; 1428 + /** 1429 + * Message for 202 response 1430 + */ 1431 + 202: ModelThatExtendsExtends; 1432 + }; 1281 1433 1282 - export type CallWithResponsesResponse = { 1283 - readonly '@namespace.string'?: string; 1284 - readonly '@namespace.integer'?: number; 1285 - readonly value?: Array<ModelWithString>; 1286 - } | ModelThatExtends | ModelThatExtendsExtends; 1434 + export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; 1287 1435 1288 1436 export type CollectionFormatData = { 1289 1437 body?: never; ··· 1352 1500 }; 1353 1501 }; 1354 1502 1355 - export type TypesResponse = number | string | boolean | {}; 1503 + export type TypesResponses = { 1504 + /** 1505 + * Response is a simple number 1506 + */ 1507 + 200: number; 1508 + /** 1509 + * Response is a simple string 1510 + */ 1511 + 201: string; 1512 + /** 1513 + * Response is a simple boolean 1514 + */ 1515 + 202: boolean; 1516 + /** 1517 + * Response is a simple object 1518 + */ 1519 + 203: {}; 1520 + }; 1521 + 1522 + export type TypesResponse = TypesResponses[keyof TypesResponses]; 1356 1523 1357 1524 export type UploadFileData = { 1358 1525 body: Blob | File; ··· 1365 1532 query?: never; 1366 1533 }; 1367 1534 1368 - export type UploadFileResponse = boolean; 1535 + export type UploadFileResponses = { 1536 + 200: boolean; 1537 + }; 1538 + 1539 + export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 1369 1540 1370 1541 export type FileResponseData = { 1371 1542 body?: never; ··· 1379 1550 query?: never; 1380 1551 }; 1381 1552 1382 - export type FileResponseResponse = Blob | File; 1553 + export type FileResponseResponses = { 1554 + /** 1555 + * Success 1556 + */ 1557 + 200: Blob | File; 1558 + }; 1559 + 1560 + export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; 1383 1561 1384 1562 export type ComplexTypesData = { 1385 1563 body?: never; ··· 1402 1580 }; 1403 1581 }; 1404 1582 1405 - export type ComplexTypesResponse = Array<ModelWithString>; 1583 + export type ComplexTypesErrors = { 1584 + /** 1585 + * 400 `server` error 1586 + */ 1587 + 400: unknown; 1588 + /** 1589 + * 500 server error 1590 + */ 1591 + 500: unknown; 1592 + }; 1593 + 1594 + export type ComplexTypesResponses = { 1595 + /** 1596 + * Successful response 1597 + */ 1598 + 200: Array<ModelWithString>; 1599 + }; 1600 + 1601 + export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; 1406 1602 1407 - export type MultipartResponseResponse = { 1408 - file?: Blob | File; 1409 - metadata?: { 1410 - foo?: string; 1411 - bar?: string; 1603 + export type MultipartResponseResponses = { 1604 + /** 1605 + * OK 1606 + */ 1607 + 200: { 1608 + file?: Blob | File; 1609 + metadata?: { 1610 + foo?: string; 1611 + bar?: string; 1612 + }; 1412 1613 }; 1413 1614 }; 1615 + 1616 + export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; 1414 1617 1415 1618 export type MultipartRequestData = { 1416 1619 body?: { ··· 1443 1646 query?: never; 1444 1647 }; 1445 1648 1446 - export type ComplexParamsResponse = ModelWithString; 1649 + export type ComplexParamsResponses = { 1650 + /** 1651 + * Success 1652 + */ 1653 + 200: ModelWithString; 1654 + }; 1655 + 1656 + export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; 1657 + 1658 + export type CallWithResultFromHeaderErrors = { 1659 + /** 1660 + * 400 server error 1661 + */ 1662 + 400: unknown; 1663 + /** 1664 + * 500 server error 1665 + */ 1666 + 500: unknown; 1667 + }; 1668 + 1669 + export type CallWithResultFromHeaderResponses = { 1670 + /** 1671 + * Successful response 1672 + */ 1673 + 200: unknown; 1674 + }; 1447 1675 1448 1676 export type TestErrorCodeData = { 1449 1677 body?: never; ··· 1456 1684 }; 1457 1685 }; 1458 1686 1687 + export type TestErrorCodeErrors = { 1688 + /** 1689 + * Custom message: Internal Server Error 1690 + */ 1691 + 500: unknown; 1692 + /** 1693 + * Custom message: Not Implemented 1694 + */ 1695 + 501: unknown; 1696 + /** 1697 + * Custom message: Bad Gateway 1698 + */ 1699 + 502: unknown; 1700 + /** 1701 + * Custom message: Service Unavailable 1702 + */ 1703 + 503: unknown; 1704 + }; 1705 + 1706 + export type TestErrorCodeResponses = { 1707 + /** 1708 + * Custom message: Successful response 1709 + */ 1710 + 200: unknown; 1711 + }; 1712 + 1459 1713 export type NonAsciiæøåÆøÅöôêÊ字符串Data = { 1460 1714 body?: never; 1461 1715 path?: never; ··· 1467 1721 }; 1468 1722 }; 1469 1723 1470 - export type NonAsciiæøåÆøÅöôêÊ字符串Response = Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1724 + export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { 1725 + /** 1726 + * Successful response 1727 + */ 1728 + 200: Array<NonAsciiStringæøåÆØÅöôêÊ字符串>; 1729 + }; 1730 + 1731 + export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; 1471 1732 1472 1733 export type PutWithFormUrlEncodedData = { 1473 1734 body: ArrayWithStrings;