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.

Merge pull request #215 from hey-api/feat/all-services-in-one-file

authored by

Jordan Shatford and committed by
GitHub
3f195afa 8f3a2563

+7089 -7602
+5
.changeset/blue-flies-behave.md
··· 1 + --- 2 + "@hey-api/openapi-ts": minor 3 + --- 4 + 5 + feat(client): generate all services in single `services.ts` file
-1
rollup.config.ts
··· 45 45 ifNotNullNotUndefined: true, 46 46 ifOperationDataOptional: true, 47 47 intersection: true, 48 - modelImports: true, 49 48 modelUnionType: true, 50 49 nameOperationDataType: true, 51 50 notEquals: true,
+1 -1
src/templates/client.hbs
··· 16 16 17 17 {{#if services}} 18 18 {{#each services}} 19 - import { {{{name}}}{{{@root.$config.postfixServices}}} } from './services/{{{name}}}{{{@root.$config.postfixServices}}}'; 19 + import { {{{name}}}{{{@root.$config.postfixServices}}} } from './services'; 20 20 {{/each}} 21 21 {{/if}} 22 22
-39
src/templates/exportService.hbs
··· 1 - {{#equals @root.$config.client 'angular'}} 2 - {{#if @root.$config.name}} 3 - import { Injectable } from '@angular/core'; 4 - import type { Observable } from 'rxjs'; 5 - {{else}} 6 - import { Injectable } from '@angular/core'; 7 - import { HttpClient } from '@angular/common/http'; 8 - import type { Observable } from 'rxjs'; 9 - {{/if}} 10 - {{/equals}} 11 - {{{modelImports this '../models'}}} 12 - {{#equals @root.$config.serviceResponse 'response'}} 13 - import type { ApiResult } from '../core/ApiResult'; 14 - {{/equals}} 15 - {{#notEquals @root.$config.client 'angular'}} 16 - import type { CancelablePromise } from '../core/CancelablePromise'; 17 - {{/notEquals}} 18 - {{#if @root.$config.name}} 19 - {{#equals @root.$config.client 'angular'}} 20 - import { BaseHttpRequest } from '../core/BaseHttpRequest'; 21 - {{else}} 22 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 23 - {{/equals}} 24 - {{else}} 25 - {{#if @root.$config.useOptions}} 26 - {{#equals @root.$config.serviceResponse 'generics'}} 27 - import { mergeOpenApiConfig, OpenAPI } from '../core/OpenAPI'; 28 - import { request as __request } from '../core/request'; 29 - import type { TApiResponse, TConfig, TResult } from '../core/types'; 30 - {{else}} 31 - import { OpenAPI } from '../core/OpenAPI'; 32 - import { request as __request } from '../core/request'; 33 - {{/equals}} 34 - {{else}} 35 - import { OpenAPI } from '../core/OpenAPI'; 36 - import { request as __request } from '../core/request'; 37 - {{/if}} 38 - {{/if}} 39 - 40 1 {{{operationDataType this}}} 41 2 42 3 {{#equals @root.$config.client 'angular'}}
-9
src/utils/handlebars.ts
··· 94 94 .replace(/\/\*/g, '*') 95 95 .replace(/\r?\n(.*)/g, (_, w) => `${EOL} * ${w.trim()}`); 96 96 97 - const modelImports = (model: Service, path: string) => { 98 - if (model.imports.length === 0) { 99 - return ''; 100 - } 101 - return `import type { ${model.imports.join(',')} } from '${path}';`; 102 - }; 103 - 104 97 const dataParameters = (config: Config, parameters: OperationParameter[]) => { 105 98 if (config.experimental) { 106 99 let output = parameters ··· 266 259 return options.fn(uniqueTypesString); 267 260 } 268 261 ); 269 - 270 - Handlebars.registerHelper('modelImports', modelImports); 271 262 272 263 Handlebars.registerHelper( 273 264 'modelUnionType',
+1 -2
src/utils/write/__tests__/services.spec.ts
··· 1 1 import { writeFileSync } from 'node:fs'; 2 - import path from 'node:path'; 3 2 4 3 import { describe, expect, it, vi } from 'vitest'; 5 4 ··· 46 45 write: true, 47 46 }); 48 47 49 - expect(writeFileSync).toHaveBeenCalledWith(path.resolve('/', '/UserService.ts'), 'service'); 48 + expect(writeFileSync).toHaveBeenCalled(); 50 49 }); 51 50 });
+1 -1
src/utils/write/client.ts
··· 50 50 fn: writeClientModels, 51 51 }, 52 52 { 53 - dir: 'services', 53 + dir: '', 54 54 enabled: config.exportServices, 55 55 fn: writeClientServices, 56 56 },
+51 -11
src/utils/write/services.ts
··· 4 4 import type { Client } from '../../types/client'; 5 5 import type { Config } from '../../types/config'; 6 6 import type { Templates } from '../handlebars'; 7 - import { sortByName } from '../sort'; 7 + import { unique } from '../unique'; 8 8 9 9 /** 10 10 * Generate Services using the Handlebar template and write to disk. ··· 23 23 if (client.services.length === 0) { 24 24 return; 25 25 } 26 - // Generate file for each service. 26 + // Generate a file with all services. 27 + const results: string[] = []; 28 + const imports: string[] = []; 27 29 for (const service of client.services) { 28 - const file = path.resolve(outputPath, `${service.name}${config.postfixServices}.ts`); 29 - const templateResult = templates.exports.service({ 30 + const result = templates.exports.service({ 30 31 $config: config, 31 32 ...service, 32 33 }); 33 - await writeFileSync(file, templateResult); 34 + imports.push(...service.imports); 35 + results.push(result); 36 + } 37 + // Import all models required by the services. 38 + const uniqueImports = imports.filter(unique); 39 + if (uniqueImports.length > 0) { 40 + const importString = `import type { ${uniqueImports.join(',')} } from './models';`; 41 + results.unshift(importString); 42 + } 43 + // Import required packages and core files. 44 + const imports2: string[] = []; 45 + if (config.client === 'angular') { 46 + imports2.push(`import { Injectable } from '@angular/core';`); 47 + if (config.name === undefined) { 48 + imports2.push(`import { HttpClient } from '@angular/common/http';`); 49 + } 50 + imports2.push(`import type { Observable } from 'rxjs';`); 51 + } else { 52 + imports2.push(`import type { CancelablePromise } from './core/CancelablePromise';`); 34 53 } 54 + if (config.serviceResponse === 'response') { 55 + imports2.push(`import type { ApiResult } from './core/ApiResult;`); 56 + } 57 + if (config.name) { 58 + if (config.client === 'angular') { 59 + imports2.push(`import { BaseHttpRequest } from './core/BaseHttpRequest';`); 60 + } else { 61 + imports2.push(`import type { BaseHttpRequest } from './core/BaseHttpRequest';`); 62 + } 63 + } else { 64 + if (config.useOptions) { 65 + if (config.serviceResponse === 'generics') { 66 + imports2.push(`import { mergeOpenApiConfig, OpenAPI } from './core/OpenAPI';`); 67 + imports2.push(`import { request as __request } from './core/request';`); 68 + imports2.push(`import type { TApiResponse, TConfig, TResult } from './core/types';`); 69 + } else { 70 + imports2.push(`import { OpenAPI } from './core/OpenAPI';`); 71 + imports2.push(`import { request as __request } from './core/request';`); 72 + } 73 + } else { 74 + imports2.push(`import { OpenAPI } from './core/OpenAPI';`); 75 + imports2.push(`import { request as __request } from './core/request';`); 76 + } 77 + } 78 + results.unshift(imports2.join('\n')); 35 79 // Generate index file exporting all generated service files. 36 - const file = path.resolve(outputPath, 'index.ts'); 37 - const content = sortByName(client.services).map( 38 - service => 39 - `export { ${service.name}${config.postfixServices} } from './${service.name}${config.postfixServices}'` 40 - ); 41 - await writeFileSync(file, content.join('\n')); 80 + const file = path.resolve(outputPath, 'services.ts'); 81 + await writeFileSync(file, results.join('\n\n')); 42 82 };
+863
test/__snapshots__/v2/services.ts.snap
··· 1 + import type { CancelablePromise } from './core/CancelablePromise'; 2 + import { OpenAPI } from './core/OpenAPI'; 3 + import { request as __request } from './core/request'; 4 + 5 + import type { 6 + ModelWithString, 7 + ModelThatExtends, 8 + ModelThatExtendsExtends, 9 + NonAsciiStringæøåÆØÅöôêÊ字符串, 10 + } from './models'; 11 + 12 + export class DefaultService { 13 + /** 14 + * @throws ApiError 15 + */ 16 + public static serviceWithEmptyTag(): CancelablePromise<void> { 17 + return __request(OpenAPI, { 18 + method: 'GET', 19 + url: '/api/v{api-version}/no-tag', 20 + }); 21 + } 22 + } 23 + 24 + export class SimpleService { 25 + /** 26 + * @throws ApiError 27 + */ 28 + public static getCallWithoutParametersAndResponse(): CancelablePromise<void> { 29 + return __request(OpenAPI, { 30 + method: 'GET', 31 + url: '/api/v{api-version}/simple', 32 + }); 33 + } 34 + 35 + /** 36 + * @throws ApiError 37 + */ 38 + public static putCallWithoutParametersAndResponse(): CancelablePromise<void> { 39 + return __request(OpenAPI, { 40 + method: 'PUT', 41 + url: '/api/v{api-version}/simple', 42 + }); 43 + } 44 + 45 + /** 46 + * @throws ApiError 47 + */ 48 + public static postCallWithoutParametersAndResponse(): CancelablePromise<void> { 49 + return __request(OpenAPI, { 50 + method: 'POST', 51 + url: '/api/v{api-version}/simple', 52 + }); 53 + } 54 + 55 + /** 56 + * @throws ApiError 57 + */ 58 + public static deleteCallWithoutParametersAndResponse(): CancelablePromise<void> { 59 + return __request(OpenAPI, { 60 + method: 'DELETE', 61 + url: '/api/v{api-version}/simple', 62 + }); 63 + } 64 + 65 + /** 66 + * @throws ApiError 67 + */ 68 + public static optionsCallWithoutParametersAndResponse(): CancelablePromise<void> { 69 + return __request(OpenAPI, { 70 + method: 'OPTIONS', 71 + url: '/api/v{api-version}/simple', 72 + }); 73 + } 74 + 75 + /** 76 + * @throws ApiError 77 + */ 78 + public static headCallWithoutParametersAndResponse(): CancelablePromise<void> { 79 + return __request(OpenAPI, { 80 + method: 'HEAD', 81 + url: '/api/v{api-version}/simple', 82 + }); 83 + } 84 + 85 + /** 86 + * @throws ApiError 87 + */ 88 + public static patchCallWithoutParametersAndResponse(): CancelablePromise<void> { 89 + return __request(OpenAPI, { 90 + method: 'PATCH', 91 + url: '/api/v{api-version}/simple', 92 + }); 93 + } 94 + } 95 + 96 + export type TDataCallWithDescriptions = { 97 + /** 98 + * Testing backticks in string: `backticks` and ```multiple backticks``` should work 99 + */ 100 + parameterWithBackticks?: string; 101 + /** 102 + * Testing multiline comments in string: First line 103 + * Second line 104 + * 105 + * Fourth line 106 + */ 107 + parameterWithBreaks?: string; 108 + /** 109 + * Testing expression placeholders in string: ${expression} should work 110 + */ 111 + parameterWithExpressionPlaceholders?: string; 112 + /** 113 + * Testing quotes in string: 'single quote''' and "double quotes""" should work 114 + */ 115 + parameterWithQuotes?: string; 116 + /** 117 + * Testing reserved characters in string: * inline * and ** inline ** should work 118 + */ 119 + parameterWithReservedCharacters?: string; 120 + /** 121 + * Testing slashes in string: \backwards\\\ and /forwards/// should work 122 + */ 123 + parameterWithSlashes?: string; 124 + }; 125 + 126 + export class DescriptionsService { 127 + /** 128 + * @throws ApiError 129 + */ 130 + public static callWithDescriptions(data: TDataCallWithDescriptions = {}): CancelablePromise<void> { 131 + const { 132 + parameterWithBackticks, 133 + parameterWithBreaks, 134 + parameterWithExpressionPlaceholders, 135 + parameterWithQuotes, 136 + parameterWithReservedCharacters, 137 + parameterWithSlashes, 138 + } = data; 139 + return __request(OpenAPI, { 140 + method: 'POST', 141 + url: '/api/v{api-version}/descriptions/', 142 + query: { 143 + parameterWithBreaks, 144 + parameterWithBackticks, 145 + parameterWithSlashes, 146 + parameterWithExpressionPlaceholders, 147 + parameterWithQuotes, 148 + parameterWithReservedCharacters, 149 + }, 150 + }); 151 + } 152 + } 153 + 154 + export type TDataCallWithParameters = { 155 + /** 156 + * This is the parameter that is sent as request body 157 + */ 158 + parameterBody: string; 159 + /** 160 + * This is the parameter that goes into the form data 161 + */ 162 + parameterForm: string; 163 + /** 164 + * This is the parameter that goes into the header 165 + */ 166 + parameterHeader: string; 167 + /** 168 + * This is the parameter that goes into the path 169 + */ 170 + parameterPath: string; 171 + /** 172 + * This is the parameter that goes into the query params 173 + */ 174 + parameterQuery: string; 175 + }; 176 + export type TDataCallWithWeirdParameterNames = { 177 + /** 178 + * This is the parameter with a reserved keyword 179 + */ 180 + _default?: string; 181 + /** 182 + * This is the parameter that is sent as request body 183 + */ 184 + parameterBody: string; 185 + /** 186 + * This is the parameter that goes into the request form data 187 + */ 188 + parameterForm: string; 189 + /** 190 + * This is the parameter that goes into the request header 191 + */ 192 + parameterHeader: string; 193 + /** 194 + * This is the parameter that goes into the path 195 + */ 196 + parameterPath1?: string; 197 + /** 198 + * This is the parameter that goes into the path 199 + */ 200 + parameterPath2?: string; 201 + /** 202 + * This is the parameter that goes into the path 203 + */ 204 + parameterPath3?: string; 205 + /** 206 + * This is the parameter that goes into the request query params 207 + */ 208 + parameterQuery: string; 209 + }; 210 + 211 + export class ParametersService { 212 + /** 213 + * @throws ApiError 214 + */ 215 + public static callWithParameters(data: TDataCallWithParameters): CancelablePromise<void> { 216 + const { parameterBody, parameterForm, parameterHeader, parameterPath, parameterQuery } = data; 217 + return __request(OpenAPI, { 218 + method: 'POST', 219 + url: '/api/v{api-version}/parameters/{parameterPath}', 220 + path: { 221 + parameterPath, 222 + }, 223 + headers: { 224 + parameterHeader, 225 + }, 226 + query: { 227 + parameterQuery, 228 + }, 229 + formData: { 230 + parameterForm, 231 + }, 232 + body: parameterBody, 233 + }); 234 + } 235 + 236 + /** 237 + * @throws ApiError 238 + */ 239 + public static callWithWeirdParameterNames(data: TDataCallWithWeirdParameterNames): CancelablePromise<void> { 240 + const { 241 + _default, 242 + parameterBody, 243 + parameterForm, 244 + parameterHeader, 245 + parameterPath1, 246 + parameterPath2, 247 + parameterPath3, 248 + parameterQuery, 249 + } = data; 250 + return __request(OpenAPI, { 251 + method: 'POST', 252 + url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', 253 + path: { 254 + 'parameter.path.1': parameterPath1, 255 + 'parameter-path-2': parameterPath2, 256 + 'PARAMETER-PATH-3': parameterPath3, 257 + }, 258 + headers: { 259 + 'parameter.header': parameterHeader, 260 + }, 261 + query: { 262 + default: _default, 263 + 'parameter-query': parameterQuery, 264 + }, 265 + formData: { 266 + parameter_form: parameterForm, 267 + }, 268 + body: parameterBody, 269 + }); 270 + } 271 + } 272 + 273 + export type TDataCallWithDefaultParameters = { 274 + /** 275 + * This is a simple boolean with default value 276 + */ 277 + parameterBoolean?: boolean; 278 + /** 279 + * This is a simple enum with default value 280 + */ 281 + parameterEnum?: 'Success' | 'Warning' | 'Error'; 282 + /** 283 + * This is a simple model with default value 284 + */ 285 + parameterModel?: ModelWithString; 286 + /** 287 + * This is a simple number with default value 288 + */ 289 + parameterNumber?: number; 290 + /** 291 + * This is a simple string with default value 292 + */ 293 + parameterString?: string; 294 + }; 295 + export type TDataCallWithDefaultOptionalParameters = { 296 + /** 297 + * This is a simple boolean that is optional with default value 298 + */ 299 + parameterBoolean?: boolean; 300 + /** 301 + * This is a simple enum that is optional with default value 302 + */ 303 + parameterEnum?: 'Success' | 'Warning' | 'Error'; 304 + /** 305 + * This is a simple model that is optional with default value 306 + */ 307 + parameterModel?: ModelWithString; 308 + /** 309 + * This is a simple number that is optional with default value 310 + */ 311 + parameterNumber?: number; 312 + /** 313 + * This is a simple string that is optional with default value 314 + */ 315 + parameterString?: string; 316 + }; 317 + export type TDataCallToTestOrderOfParams = { 318 + /** 319 + * This is a optional string with default 320 + */ 321 + parameterOptionalStringWithDefault?: string; 322 + /** 323 + * This is a optional string with empty default 324 + */ 325 + parameterOptionalStringWithEmptyDefault?: string; 326 + /** 327 + * This is a optional string with no default 328 + */ 329 + parameterOptionalStringWithNoDefault?: string; 330 + /** 331 + * This is a string that can be null with default 332 + */ 333 + parameterStringNullableWithDefault?: string | null; 334 + /** 335 + * This is a string that can be null with no default 336 + */ 337 + parameterStringNullableWithNoDefault?: string | null; 338 + /** 339 + * This is a string with default 340 + */ 341 + parameterStringWithDefault?: string; 342 + /** 343 + * This is a string with empty default 344 + */ 345 + parameterStringWithEmptyDefault?: string; 346 + /** 347 + * This is a string with no default 348 + */ 349 + parameterStringWithNoDefault: string; 350 + }; 351 + 352 + export class DefaultsService { 353 + /** 354 + * @throws ApiError 355 + */ 356 + public static callWithDefaultParameters(data: TDataCallWithDefaultParameters): CancelablePromise<void> { 357 + const { 358 + parameterBoolean = true, 359 + parameterEnum = 'Success', 360 + parameterModel = { 361 + prop: 'Hello World!', 362 + }, 363 + parameterNumber = 123, 364 + parameterString = 'Hello World!', 365 + } = data; 366 + return __request(OpenAPI, { 367 + method: 'GET', 368 + url: '/api/v{api-version}/defaults', 369 + query: { 370 + parameterString, 371 + parameterNumber, 372 + parameterBoolean, 373 + parameterEnum, 374 + parameterModel, 375 + }, 376 + }); 377 + } 378 + 379 + /** 380 + * @throws ApiError 381 + */ 382 + public static callWithDefaultOptionalParameters( 383 + data: TDataCallWithDefaultOptionalParameters = {} 384 + ): CancelablePromise<void> { 385 + const { 386 + parameterBoolean = true, 387 + parameterEnum = 'Success', 388 + parameterModel = { 389 + prop: 'Hello World!', 390 + }, 391 + parameterNumber = 123, 392 + parameterString = 'Hello World!', 393 + } = data; 394 + return __request(OpenAPI, { 395 + method: 'POST', 396 + url: '/api/v{api-version}/defaults', 397 + query: { 398 + parameterString, 399 + parameterNumber, 400 + parameterBoolean, 401 + parameterEnum, 402 + parameterModel, 403 + }, 404 + }); 405 + } 406 + 407 + /** 408 + * @throws ApiError 409 + */ 410 + public static callToTestOrderOfParams(data: TDataCallToTestOrderOfParams): CancelablePromise<void> { 411 + const { 412 + parameterOptionalStringWithDefault = 'Hello World!', 413 + parameterOptionalStringWithEmptyDefault = '', 414 + parameterOptionalStringWithNoDefault, 415 + parameterStringNullableWithDefault = null, 416 + parameterStringNullableWithNoDefault, 417 + parameterStringWithDefault = 'Hello World!', 418 + parameterStringWithEmptyDefault = '', 419 + parameterStringWithNoDefault, 420 + } = data; 421 + return __request(OpenAPI, { 422 + method: 'PUT', 423 + url: '/api/v{api-version}/defaults', 424 + query: { 425 + parameterOptionalStringWithDefault, 426 + parameterOptionalStringWithEmptyDefault, 427 + parameterOptionalStringWithNoDefault, 428 + parameterStringWithDefault, 429 + parameterStringWithEmptyDefault, 430 + parameterStringWithNoDefault, 431 + parameterStringNullableWithNoDefault, 432 + parameterStringNullableWithDefault, 433 + }, 434 + }); 435 + } 436 + } 437 + 438 + export class DuplicateService { 439 + /** 440 + * @throws ApiError 441 + */ 442 + public static duplicateName(): CancelablePromise<void> { 443 + return __request(OpenAPI, { 444 + method: 'GET', 445 + url: '/api/v{api-version}/duplicate', 446 + }); 447 + } 448 + 449 + /** 450 + * @throws ApiError 451 + */ 452 + public static duplicateName1(): CancelablePromise<void> { 453 + return __request(OpenAPI, { 454 + method: 'POST', 455 + url: '/api/v{api-version}/duplicate', 456 + }); 457 + } 458 + 459 + /** 460 + * @throws ApiError 461 + */ 462 + public static duplicateName2(): CancelablePromise<void> { 463 + return __request(OpenAPI, { 464 + method: 'PUT', 465 + url: '/api/v{api-version}/duplicate', 466 + }); 467 + } 468 + 469 + /** 470 + * @throws ApiError 471 + */ 472 + public static duplicateName3(): CancelablePromise<void> { 473 + return __request(OpenAPI, { 474 + method: 'DELETE', 475 + url: '/api/v{api-version}/duplicate', 476 + }); 477 + } 478 + } 479 + 480 + export class NoContentService { 481 + /** 482 + * @returns void Success 483 + * @throws ApiError 484 + */ 485 + public static callWithNoContentResponse(): CancelablePromise<void> { 486 + return __request(OpenAPI, { 487 + method: 'GET', 488 + url: '/api/v{api-version}/no-content', 489 + }); 490 + } 491 + 492 + /** 493 + * @returns any Response is a simple number 494 + * @returns void Success 495 + * @throws ApiError 496 + */ 497 + public static callWithResponseAndNoContentResponse(): CancelablePromise<any | void> { 498 + return __request(OpenAPI, { 499 + method: 'GET', 500 + url: '/api/v{api-version}/multiple-tags/response-and-no-content', 501 + }); 502 + } 503 + } 504 + 505 + export class ResponseService { 506 + /** 507 + * @returns any Response is a simple number 508 + * @returns void Success 509 + * @throws ApiError 510 + */ 511 + public static callWithResponseAndNoContentResponse(): CancelablePromise<any | void> { 512 + return __request(OpenAPI, { 513 + method: 'GET', 514 + url: '/api/v{api-version}/multiple-tags/response-and-no-content', 515 + }); 516 + } 517 + 518 + /** 519 + * @returns ModelWithString Message for default response 520 + * @throws ApiError 521 + */ 522 + public static callWithResponse(): CancelablePromise<ModelWithString> { 523 + return __request(OpenAPI, { 524 + method: 'GET', 525 + url: '/api/v{api-version}/response', 526 + }); 527 + } 528 + 529 + /** 530 + * @returns ModelWithString Message for default response 531 + * @throws ApiError 532 + */ 533 + public static callWithDuplicateResponses(): CancelablePromise<ModelWithString> { 534 + return __request(OpenAPI, { 535 + method: 'POST', 536 + url: '/api/v{api-version}/response', 537 + errors: { 538 + 500: `Message for 500 error`, 539 + 501: `Message for 501 error`, 540 + 502: `Message for 502 error`, 541 + }, 542 + }); 543 + } 544 + 545 + /** 546 + * @returns any Message for 200 response 547 + * @returns ModelWithString Message for default response 548 + * @returns ModelThatExtends Message for 201 response 549 + * @returns ModelThatExtendsExtends Message for 202 response 550 + * @throws ApiError 551 + */ 552 + public static callWithResponses(): CancelablePromise< 553 + | { 554 + readonly '@namespace.string'?: string; 555 + readonly '@namespace.integer'?: number; 556 + readonly value?: Array<ModelWithString>; 557 + } 558 + | ModelWithString 559 + | ModelThatExtends 560 + | ModelThatExtendsExtends 561 + > { 562 + return __request(OpenAPI, { 563 + method: 'PUT', 564 + url: '/api/v{api-version}/response', 565 + errors: { 566 + 500: `Message for 500 error`, 567 + 501: `Message for 501 error`, 568 + 502: `Message for 502 error`, 569 + }, 570 + }); 571 + } 572 + } 573 + 574 + export class MultipleTags1Service { 575 + /** 576 + * @returns void Success 577 + * @throws ApiError 578 + */ 579 + public static dummyA(): CancelablePromise<void> { 580 + return __request(OpenAPI, { 581 + method: 'GET', 582 + url: '/api/v{api-version}/multiple-tags/a', 583 + }); 584 + } 585 + 586 + /** 587 + * @returns void Success 588 + * @throws ApiError 589 + */ 590 + public static dummyB(): CancelablePromise<void> { 591 + return __request(OpenAPI, { 592 + method: 'GET', 593 + url: '/api/v{api-version}/multiple-tags/b', 594 + }); 595 + } 596 + } 597 + 598 + export class MultipleTags2Service { 599 + /** 600 + * @returns void Success 601 + * @throws ApiError 602 + */ 603 + public static dummyA(): CancelablePromise<void> { 604 + return __request(OpenAPI, { 605 + method: 'GET', 606 + url: '/api/v{api-version}/multiple-tags/a', 607 + }); 608 + } 609 + 610 + /** 611 + * @returns void Success 612 + * @throws ApiError 613 + */ 614 + public static dummyB(): CancelablePromise<void> { 615 + return __request(OpenAPI, { 616 + method: 'GET', 617 + url: '/api/v{api-version}/multiple-tags/b', 618 + }); 619 + } 620 + } 621 + 622 + export class MultipleTags3Service { 623 + /** 624 + * @returns void Success 625 + * @throws ApiError 626 + */ 627 + public static dummyB(): CancelablePromise<void> { 628 + return __request(OpenAPI, { 629 + method: 'GET', 630 + url: '/api/v{api-version}/multiple-tags/b', 631 + }); 632 + } 633 + } 634 + 635 + export type TDataCollectionFormat = { 636 + /** 637 + * This is an array parameter that is sent as csv format (comma-separated values) 638 + */ 639 + parameterArrayCsv: Array<string>; 640 + /** 641 + * This is an array parameter that is sent as multi format (multiple parameter instances) 642 + */ 643 + parameterArrayMulti: Array<string>; 644 + /** 645 + * This is an array parameter that is sent as pipes format (pipe-separated values) 646 + */ 647 + parameterArrayPipes: Array<string>; 648 + /** 649 + * This is an array parameter that is sent as ssv format (space-separated values) 650 + */ 651 + parameterArraySsv: Array<string>; 652 + /** 653 + * This is an array parameter that is sent as tsv format (tab-separated values) 654 + */ 655 + parameterArrayTsv: Array<string>; 656 + }; 657 + 658 + export class CollectionFormatService { 659 + /** 660 + * @throws ApiError 661 + */ 662 + public static collectionFormat(data: TDataCollectionFormat): CancelablePromise<void> { 663 + const { parameterArrayCsv, parameterArrayMulti, parameterArrayPipes, parameterArraySsv, parameterArrayTsv } = 664 + data; 665 + return __request(OpenAPI, { 666 + method: 'GET', 667 + url: '/api/v{api-version}/collectionFormat', 668 + query: { 669 + parameterArrayCSV: parameterArrayCsv, 670 + parameterArraySSV: parameterArraySsv, 671 + parameterArrayTSV: parameterArrayTsv, 672 + parameterArrayPipes, 673 + parameterArrayMulti, 674 + }, 675 + }); 676 + } 677 + } 678 + 679 + export type TDataTypes = { 680 + /** 681 + * This is a number parameter 682 + */ 683 + id?: number; 684 + /** 685 + * This is an array parameter 686 + */ 687 + parameterArray: Array<string>; 688 + /** 689 + * This is a boolean parameter 690 + */ 691 + parameterBoolean?: boolean; 692 + /** 693 + * This is a dictionary parameter 694 + */ 695 + parameterDictionary: Record<string, string>; 696 + /** 697 + * This is an enum parameter 698 + */ 699 + parameterEnum: 'Success' | 'Warning' | 'Error'; 700 + /** 701 + * This is a number parameter 702 + */ 703 + parameterNumber?: number; 704 + /** 705 + * This is an object parameter 706 + */ 707 + parameterObject?: unknown; 708 + /** 709 + * This is a string parameter 710 + */ 711 + parameterString?: string; 712 + }; 713 + 714 + export class TypesService { 715 + /** 716 + * @returns number Response is a simple number 717 + * @returns string Response is a simple string 718 + * @returns boolean Response is a simple boolean 719 + * @returns any Response is a simple object 720 + * @throws ApiError 721 + */ 722 + public static types(data: TDataTypes): CancelablePromise<number | string | boolean | unknown> { 723 + const { 724 + id, 725 + parameterArray, 726 + parameterBoolean = true, 727 + parameterDictionary, 728 + parameterEnum, 729 + parameterNumber = 123, 730 + parameterObject = null, 731 + parameterString = 'default', 732 + } = data; 733 + return __request(OpenAPI, { 734 + method: 'GET', 735 + url: '/api/v{api-version}/types', 736 + path: { 737 + id, 738 + }, 739 + query: { 740 + parameterNumber, 741 + parameterString, 742 + parameterBoolean, 743 + parameterObject, 744 + parameterArray, 745 + parameterDictionary, 746 + parameterEnum, 747 + }, 748 + }); 749 + } 750 + } 751 + 752 + export type TDataComplexTypes = { 753 + /** 754 + * Parameter containing object 755 + */ 756 + parameterObject: { 757 + first?: { 758 + second?: { 759 + third?: string; 760 + }; 761 + }; 762 + }; 763 + /** 764 + * Parameter containing reference 765 + */ 766 + parameterReference: ModelWithString; 767 + }; 768 + 769 + export class ComplexService { 770 + /** 771 + * @returns ModelWithString Successful response 772 + * @throws ApiError 773 + */ 774 + public static complexTypes(data: TDataComplexTypes): CancelablePromise<Array<ModelWithString>> { 775 + const { parameterObject, parameterReference } = data; 776 + return __request(OpenAPI, { 777 + method: 'GET', 778 + url: '/api/v{api-version}/complex', 779 + query: { 780 + parameterObject, 781 + parameterReference, 782 + }, 783 + errors: { 784 + 400: `400 server error`, 785 + 500: `500 server error`, 786 + }, 787 + }); 788 + } 789 + } 790 + 791 + export class HeaderService { 792 + /** 793 + * @returns string Successful response 794 + * @throws ApiError 795 + */ 796 + public static callWithResultFromHeader(): CancelablePromise<string> { 797 + return __request(OpenAPI, { 798 + method: 'POST', 799 + url: '/api/v{api-version}/header', 800 + responseHeader: 'operation-location', 801 + errors: { 802 + 400: `400 server error`, 803 + 500: `500 server error`, 804 + }, 805 + }); 806 + } 807 + } 808 + 809 + export type TDataTestErrorCode = { 810 + /** 811 + * Status code to return 812 + */ 813 + status: string; 814 + }; 815 + 816 + export class ErrorService { 817 + /** 818 + * @returns any Custom message: Successful response 819 + * @throws ApiError 820 + */ 821 + public static testErrorCode(data: TDataTestErrorCode): CancelablePromise<any> { 822 + const { status } = data; 823 + return __request(OpenAPI, { 824 + method: 'POST', 825 + url: '/api/v{api-version}/error', 826 + query: { 827 + status, 828 + }, 829 + errors: { 830 + 500: `Custom message: Internal Server Error`, 831 + 501: `Custom message: Not Implemented`, 832 + 502: `Custom message: Bad Gateway`, 833 + 503: `Custom message: Service Unavailable`, 834 + }, 835 + }); 836 + } 837 + } 838 + 839 + export type TDataNonAsciiæøåÆøÅöôêÊ字符串 = { 840 + /** 841 + * Dummy input param 842 + */ 843 + nonAsciiParamæøåÆøÅöôêÊ: number; 844 + }; 845 + 846 + export class NonAsciiÆøåÆøÅöôêÊService { 847 + /** 848 + * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response 849 + * @throws ApiError 850 + */ 851 + public static nonAsciiæøåÆøÅöôêÊ字符串( 852 + data: TDataNonAsciiæøåÆøÅöôêÊ字符串 853 + ): CancelablePromise<NonAsciiStringæøåÆØÅöôêÊ字符串> { 854 + const { nonAsciiParamæøåÆøÅöôêÊ } = data; 855 + return __request(OpenAPI, { 856 + method: 'POST', 857 + url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 858 + query: { 859 + nonAsciiParamæøåÆØÅöôêÊ: nonAsciiParamæøåÆøÅöôêÊ, 860 + }, 861 + }); 862 + } 863 + }
-47
test/__snapshots__/v2/services/CollectionFormatService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataCollectionFormat = { 6 - /** 7 - * This is an array parameter that is sent as csv format (comma-separated values) 8 - */ 9 - parameterArrayCsv: Array<string>; 10 - /** 11 - * This is an array parameter that is sent as multi format (multiple parameter instances) 12 - */ 13 - parameterArrayMulti: Array<string>; 14 - /** 15 - * This is an array parameter that is sent as pipes format (pipe-separated values) 16 - */ 17 - parameterArrayPipes: Array<string>; 18 - /** 19 - * This is an array parameter that is sent as ssv format (space-separated values) 20 - */ 21 - parameterArraySsv: Array<string>; 22 - /** 23 - * This is an array parameter that is sent as tsv format (tab-separated values) 24 - */ 25 - parameterArrayTsv: Array<string>; 26 - }; 27 - 28 - export class CollectionFormatService { 29 - /** 30 - * @throws ApiError 31 - */ 32 - public static collectionFormat(data: TDataCollectionFormat): CancelablePromise<void> { 33 - const { parameterArrayCsv, parameterArrayMulti, parameterArrayPipes, parameterArraySsv, parameterArrayTsv } = 34 - data; 35 - return __request(OpenAPI, { 36 - method: 'GET', 37 - url: '/api/v{api-version}/collectionFormat', 38 - query: { 39 - parameterArrayCSV: parameterArrayCsv, 40 - parameterArraySSV: parameterArraySsv, 41 - parameterArrayTSV: parameterArrayTsv, 42 - parameterArrayPipes, 43 - parameterArrayMulti, 44 - }, 45 - }); 46 - } 47 - }
-43
test/__snapshots__/v2/services/ComplexService.ts.snap
··· 1 - import type { ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataComplexTypes = { 7 - /** 8 - * Parameter containing object 9 - */ 10 - parameterObject: { 11 - first?: { 12 - second?: { 13 - third?: string; 14 - }; 15 - }; 16 - }; 17 - /** 18 - * Parameter containing reference 19 - */ 20 - parameterReference: ModelWithString; 21 - }; 22 - 23 - export class ComplexService { 24 - /** 25 - * @returns ModelWithString Successful response 26 - * @throws ApiError 27 - */ 28 - public static complexTypes(data: TDataComplexTypes): CancelablePromise<Array<ModelWithString>> { 29 - const { parameterObject, parameterReference } = data; 30 - return __request(OpenAPI, { 31 - method: 'GET', 32 - url: '/api/v{api-version}/complex', 33 - query: { 34 - parameterObject, 35 - parameterReference, 36 - }, 37 - errors: { 38 - 400: `400 server error`, 39 - 500: `500 server error`, 40 - }, 41 - }); 42 - } 43 - }
-15
test/__snapshots__/v2/services/DefaultService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class DefaultService { 6 - /** 7 - * @throws ApiError 8 - */ 9 - public static serviceWithEmptyTag(): CancelablePromise<void> { 10 - return __request(OpenAPI, { 11 - method: 'GET', 12 - url: '/api/v{api-version}/no-tag', 13 - }); 14 - } 15 - }
-169
test/__snapshots__/v2/services/DefaultsService.ts.snap
··· 1 - import type { ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataCallWithDefaultParameters = { 7 - /** 8 - * This is a simple boolean with default value 9 - */ 10 - parameterBoolean?: boolean; 11 - /** 12 - * This is a simple enum with default value 13 - */ 14 - parameterEnum?: 'Success' | 'Warning' | 'Error'; 15 - /** 16 - * This is a simple model with default value 17 - */ 18 - parameterModel?: ModelWithString; 19 - /** 20 - * This is a simple number with default value 21 - */ 22 - parameterNumber?: number; 23 - /** 24 - * This is a simple string with default value 25 - */ 26 - parameterString?: string; 27 - }; 28 - export type TDataCallWithDefaultOptionalParameters = { 29 - /** 30 - * This is a simple boolean that is optional with default value 31 - */ 32 - parameterBoolean?: boolean; 33 - /** 34 - * This is a simple enum that is optional with default value 35 - */ 36 - parameterEnum?: 'Success' | 'Warning' | 'Error'; 37 - /** 38 - * This is a simple model that is optional with default value 39 - */ 40 - parameterModel?: ModelWithString; 41 - /** 42 - * This is a simple number that is optional with default value 43 - */ 44 - parameterNumber?: number; 45 - /** 46 - * This is a simple string that is optional with default value 47 - */ 48 - parameterString?: string; 49 - }; 50 - export type TDataCallToTestOrderOfParams = { 51 - /** 52 - * This is a optional string with default 53 - */ 54 - parameterOptionalStringWithDefault?: string; 55 - /** 56 - * This is a optional string with empty default 57 - */ 58 - parameterOptionalStringWithEmptyDefault?: string; 59 - /** 60 - * This is a optional string with no default 61 - */ 62 - parameterOptionalStringWithNoDefault?: string; 63 - /** 64 - * This is a string that can be null with default 65 - */ 66 - parameterStringNullableWithDefault?: string | null; 67 - /** 68 - * This is a string that can be null with no default 69 - */ 70 - parameterStringNullableWithNoDefault?: string | null; 71 - /** 72 - * This is a string with default 73 - */ 74 - parameterStringWithDefault?: string; 75 - /** 76 - * This is a string with empty default 77 - */ 78 - parameterStringWithEmptyDefault?: string; 79 - /** 80 - * This is a string with no default 81 - */ 82 - parameterStringWithNoDefault: string; 83 - }; 84 - 85 - export class DefaultsService { 86 - /** 87 - * @throws ApiError 88 - */ 89 - public static callWithDefaultParameters(data: TDataCallWithDefaultParameters): CancelablePromise<void> { 90 - const { 91 - parameterBoolean = true, 92 - parameterEnum = 'Success', 93 - parameterModel = { 94 - prop: 'Hello World!', 95 - }, 96 - parameterNumber = 123, 97 - parameterString = 'Hello World!', 98 - } = data; 99 - return __request(OpenAPI, { 100 - method: 'GET', 101 - url: '/api/v{api-version}/defaults', 102 - query: { 103 - parameterString, 104 - parameterNumber, 105 - parameterBoolean, 106 - parameterEnum, 107 - parameterModel, 108 - }, 109 - }); 110 - } 111 - 112 - /** 113 - * @throws ApiError 114 - */ 115 - public static callWithDefaultOptionalParameters( 116 - data: TDataCallWithDefaultOptionalParameters = {} 117 - ): CancelablePromise<void> { 118 - const { 119 - parameterBoolean = true, 120 - parameterEnum = 'Success', 121 - parameterModel = { 122 - prop: 'Hello World!', 123 - }, 124 - parameterNumber = 123, 125 - parameterString = 'Hello World!', 126 - } = data; 127 - return __request(OpenAPI, { 128 - method: 'POST', 129 - url: '/api/v{api-version}/defaults', 130 - query: { 131 - parameterString, 132 - parameterNumber, 133 - parameterBoolean, 134 - parameterEnum, 135 - parameterModel, 136 - }, 137 - }); 138 - } 139 - 140 - /** 141 - * @throws ApiError 142 - */ 143 - public static callToTestOrderOfParams(data: TDataCallToTestOrderOfParams): CancelablePromise<void> { 144 - const { 145 - parameterOptionalStringWithDefault = 'Hello World!', 146 - parameterOptionalStringWithEmptyDefault = '', 147 - parameterOptionalStringWithNoDefault, 148 - parameterStringNullableWithDefault = null, 149 - parameterStringNullableWithNoDefault, 150 - parameterStringWithDefault = 'Hello World!', 151 - parameterStringWithEmptyDefault = '', 152 - parameterStringWithNoDefault, 153 - } = data; 154 - return __request(OpenAPI, { 155 - method: 'PUT', 156 - url: '/api/v{api-version}/defaults', 157 - query: { 158 - parameterOptionalStringWithDefault, 159 - parameterOptionalStringWithEmptyDefault, 160 - parameterOptionalStringWithNoDefault, 161 - parameterStringWithDefault, 162 - parameterStringWithEmptyDefault, 163 - parameterStringWithNoDefault, 164 - parameterStringNullableWithNoDefault, 165 - parameterStringNullableWithDefault, 166 - }, 167 - }); 168 - } 169 - }
-61
test/__snapshots__/v2/services/DescriptionsService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataCallWithDescriptions = { 6 - /** 7 - * Testing backticks in string: `backticks` and ```multiple backticks``` should work 8 - */ 9 - parameterWithBackticks?: string; 10 - /** 11 - * Testing multiline comments in string: First line 12 - * Second line 13 - * 14 - * Fourth line 15 - */ 16 - parameterWithBreaks?: string; 17 - /** 18 - * Testing expression placeholders in string: ${expression} should work 19 - */ 20 - parameterWithExpressionPlaceholders?: string; 21 - /** 22 - * Testing quotes in string: 'single quote''' and "double quotes""" should work 23 - */ 24 - parameterWithQuotes?: string; 25 - /** 26 - * Testing reserved characters in string: * inline * and ** inline ** should work 27 - */ 28 - parameterWithReservedCharacters?: string; 29 - /** 30 - * Testing slashes in string: \backwards\\\ and /forwards/// should work 31 - */ 32 - parameterWithSlashes?: string; 33 - }; 34 - 35 - export class DescriptionsService { 36 - /** 37 - * @throws ApiError 38 - */ 39 - public static callWithDescriptions(data: TDataCallWithDescriptions = {}): CancelablePromise<void> { 40 - const { 41 - parameterWithBackticks, 42 - parameterWithBreaks, 43 - parameterWithExpressionPlaceholders, 44 - parameterWithQuotes, 45 - parameterWithReservedCharacters, 46 - parameterWithSlashes, 47 - } = data; 48 - return __request(OpenAPI, { 49 - method: 'POST', 50 - url: '/api/v{api-version}/descriptions/', 51 - query: { 52 - parameterWithBreaks, 53 - parameterWithBackticks, 54 - parameterWithSlashes, 55 - parameterWithExpressionPlaceholders, 56 - parameterWithQuotes, 57 - parameterWithReservedCharacters, 58 - }, 59 - }); 60 - } 61 - }
-45
test/__snapshots__/v2/services/DuplicateService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class DuplicateService { 6 - /** 7 - * @throws ApiError 8 - */ 9 - public static duplicateName(): CancelablePromise<void> { 10 - return __request(OpenAPI, { 11 - method: 'GET', 12 - url: '/api/v{api-version}/duplicate', 13 - }); 14 - } 15 - 16 - /** 17 - * @throws ApiError 18 - */ 19 - public static duplicateName1(): CancelablePromise<void> { 20 - return __request(OpenAPI, { 21 - method: 'POST', 22 - url: '/api/v{api-version}/duplicate', 23 - }); 24 - } 25 - 26 - /** 27 - * @throws ApiError 28 - */ 29 - public static duplicateName2(): CancelablePromise<void> { 30 - return __request(OpenAPI, { 31 - method: 'PUT', 32 - url: '/api/v{api-version}/duplicate', 33 - }); 34 - } 35 - 36 - /** 37 - * @throws ApiError 38 - */ 39 - public static duplicateName3(): CancelablePromise<void> { 40 - return __request(OpenAPI, { 41 - method: 'DELETE', 42 - url: '/api/v{api-version}/duplicate', 43 - }); 44 - } 45 - }
-33
test/__snapshots__/v2/services/ErrorService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataTestErrorCode = { 6 - /** 7 - * Status code to return 8 - */ 9 - status: string; 10 - }; 11 - 12 - export class ErrorService { 13 - /** 14 - * @returns any Custom message: Successful response 15 - * @throws ApiError 16 - */ 17 - public static testErrorCode(data: TDataTestErrorCode): CancelablePromise<any> { 18 - const { status } = data; 19 - return __request(OpenAPI, { 20 - method: 'POST', 21 - url: '/api/v{api-version}/error', 22 - query: { 23 - status, 24 - }, 25 - errors: { 26 - 500: `Custom message: Internal Server Error`, 27 - 501: `Custom message: Not Implemented`, 28 - 502: `Custom message: Bad Gateway`, 29 - 503: `Custom message: Service Unavailable`, 30 - }, 31 - }); 32 - } 33 - }
-21
test/__snapshots__/v2/services/HeaderService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class HeaderService { 6 - /** 7 - * @returns string Successful response 8 - * @throws ApiError 9 - */ 10 - public static callWithResultFromHeader(): CancelablePromise<string> { 11 - return __request(OpenAPI, { 12 - method: 'POST', 13 - url: '/api/v{api-version}/header', 14 - responseHeader: 'operation-location', 15 - errors: { 16 - 400: `400 server error`, 17 - 500: `500 server error`, 18 - }, 19 - }); 20 - } 21 - }
-27
test/__snapshots__/v2/services/MultipleTags1Service.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class MultipleTags1Service { 6 - /** 7 - * @returns void Success 8 - * @throws ApiError 9 - */ 10 - public static dummyA(): CancelablePromise<void> { 11 - return __request(OpenAPI, { 12 - method: 'GET', 13 - url: '/api/v{api-version}/multiple-tags/a', 14 - }); 15 - } 16 - 17 - /** 18 - * @returns void Success 19 - * @throws ApiError 20 - */ 21 - public static dummyB(): CancelablePromise<void> { 22 - return __request(OpenAPI, { 23 - method: 'GET', 24 - url: '/api/v{api-version}/multiple-tags/b', 25 - }); 26 - } 27 - }
-27
test/__snapshots__/v2/services/MultipleTags2Service.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class MultipleTags2Service { 6 - /** 7 - * @returns void Success 8 - * @throws ApiError 9 - */ 10 - public static dummyA(): CancelablePromise<void> { 11 - return __request(OpenAPI, { 12 - method: 'GET', 13 - url: '/api/v{api-version}/multiple-tags/a', 14 - }); 15 - } 16 - 17 - /** 18 - * @returns void Success 19 - * @throws ApiError 20 - */ 21 - public static dummyB(): CancelablePromise<void> { 22 - return __request(OpenAPI, { 23 - method: 'GET', 24 - url: '/api/v{api-version}/multiple-tags/b', 25 - }); 26 - } 27 - }
-16
test/__snapshots__/v2/services/MultipleTags3Service.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class MultipleTags3Service { 6 - /** 7 - * @returns void Success 8 - * @throws ApiError 9 - */ 10 - public static dummyB(): CancelablePromise<void> { 11 - return __request(OpenAPI, { 12 - method: 'GET', 13 - url: '/api/v{api-version}/multiple-tags/b', 14 - }); 15 - } 16 - }
-28
test/__snapshots__/v2/services/NoContentService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class NoContentService { 6 - /** 7 - * @returns void Success 8 - * @throws ApiError 9 - */ 10 - public static callWithNoContentResponse(): CancelablePromise<void> { 11 - return __request(OpenAPI, { 12 - method: 'GET', 13 - url: '/api/v{api-version}/no-content', 14 - }); 15 - } 16 - 17 - /** 18 - * @returns any Response is a simple number 19 - * @returns void Success 20 - * @throws ApiError 21 - */ 22 - public static callWithResponseAndNoContentResponse(): CancelablePromise<any | void> { 23 - return __request(OpenAPI, { 24 - method: 'GET', 25 - url: '/api/v{api-version}/multiple-tags/response-and-no-content', 26 - }); 27 - } 28 - }
-30
test/__snapshots__/v2/services/NonAsciiÆøåÆøÅöôêÊService.ts.snap
··· 1 - import type { NonAsciiStringæøåÆØÅöôêÊ字符串 } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataNonAsciiæøåÆøÅöôêÊ字符串 = { 7 - /** 8 - * Dummy input param 9 - */ 10 - nonAsciiParamæøåÆøÅöôêÊ: number; 11 - }; 12 - 13 - export class NonAsciiÆøåÆøÅöôêÊService { 14 - /** 15 - * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response 16 - * @throws ApiError 17 - */ 18 - public static nonAsciiæøåÆøÅöôêÊ字符串( 19 - data: TDataNonAsciiæøåÆøÅöôêÊ字符串 20 - ): CancelablePromise<NonAsciiStringæøåÆØÅöôêÊ字符串> { 21 - const { nonAsciiParamæøåÆøÅöôêÊ } = data; 22 - return __request(OpenAPI, { 23 - method: 'POST', 24 - url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 25 - query: { 26 - nonAsciiParamæøåÆØÅöôêÊ: nonAsciiParamæøåÆøÅöôêÊ, 27 - }, 28 - }); 29 - } 30 - }
-122
test/__snapshots__/v2/services/ParametersService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataCallWithParameters = { 6 - /** 7 - * This is the parameter that is sent as request body 8 - */ 9 - parameterBody: string; 10 - /** 11 - * This is the parameter that goes into the form data 12 - */ 13 - parameterForm: string; 14 - /** 15 - * This is the parameter that goes into the header 16 - */ 17 - parameterHeader: string; 18 - /** 19 - * This is the parameter that goes into the path 20 - */ 21 - parameterPath: string; 22 - /** 23 - * This is the parameter that goes into the query params 24 - */ 25 - parameterQuery: string; 26 - }; 27 - export type TDataCallWithWeirdParameterNames = { 28 - /** 29 - * This is the parameter with a reserved keyword 30 - */ 31 - _default?: string; 32 - /** 33 - * This is the parameter that is sent as request body 34 - */ 35 - parameterBody: string; 36 - /** 37 - * This is the parameter that goes into the request form data 38 - */ 39 - parameterForm: string; 40 - /** 41 - * This is the parameter that goes into the request header 42 - */ 43 - parameterHeader: string; 44 - /** 45 - * This is the parameter that goes into the path 46 - */ 47 - parameterPath1?: string; 48 - /** 49 - * This is the parameter that goes into the path 50 - */ 51 - parameterPath2?: string; 52 - /** 53 - * This is the parameter that goes into the path 54 - */ 55 - parameterPath3?: string; 56 - /** 57 - * This is the parameter that goes into the request query params 58 - */ 59 - parameterQuery: string; 60 - }; 61 - 62 - export class ParametersService { 63 - /** 64 - * @throws ApiError 65 - */ 66 - public static callWithParameters(data: TDataCallWithParameters): CancelablePromise<void> { 67 - const { parameterBody, parameterForm, parameterHeader, parameterPath, parameterQuery } = data; 68 - return __request(OpenAPI, { 69 - method: 'POST', 70 - url: '/api/v{api-version}/parameters/{parameterPath}', 71 - path: { 72 - parameterPath, 73 - }, 74 - headers: { 75 - parameterHeader, 76 - }, 77 - query: { 78 - parameterQuery, 79 - }, 80 - formData: { 81 - parameterForm, 82 - }, 83 - body: parameterBody, 84 - }); 85 - } 86 - 87 - /** 88 - * @throws ApiError 89 - */ 90 - public static callWithWeirdParameterNames(data: TDataCallWithWeirdParameterNames): CancelablePromise<void> { 91 - const { 92 - _default, 93 - parameterBody, 94 - parameterForm, 95 - parameterHeader, 96 - parameterPath1, 97 - parameterPath2, 98 - parameterPath3, 99 - parameterQuery, 100 - } = data; 101 - return __request(OpenAPI, { 102 - method: 'POST', 103 - url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', 104 - path: { 105 - 'parameter.path.1': parameterPath1, 106 - 'parameter-path-2': parameterPath2, 107 - 'PARAMETER-PATH-3': parameterPath3, 108 - }, 109 - headers: { 110 - 'parameter.header': parameterHeader, 111 - }, 112 - query: { 113 - default: _default, 114 - 'parameter-query': parameterQuery, 115 - }, 116 - formData: { 117 - parameter_form: parameterForm, 118 - }, 119 - body: parameterBody, 120 - }); 121 - } 122 - }
-73
test/__snapshots__/v2/services/ResponseService.ts.snap
··· 1 - import type { ModelThatExtends, ModelThatExtendsExtends, ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export class ResponseService { 7 - /** 8 - * @returns any Response is a simple number 9 - * @returns void Success 10 - * @throws ApiError 11 - */ 12 - public static callWithResponseAndNoContentResponse(): CancelablePromise<any | void> { 13 - return __request(OpenAPI, { 14 - method: 'GET', 15 - url: '/api/v{api-version}/multiple-tags/response-and-no-content', 16 - }); 17 - } 18 - 19 - /** 20 - * @returns ModelWithString Message for default response 21 - * @throws ApiError 22 - */ 23 - public static callWithResponse(): CancelablePromise<ModelWithString> { 24 - return __request(OpenAPI, { 25 - method: 'GET', 26 - url: '/api/v{api-version}/response', 27 - }); 28 - } 29 - 30 - /** 31 - * @returns ModelWithString Message for default response 32 - * @throws ApiError 33 - */ 34 - public static callWithDuplicateResponses(): CancelablePromise<ModelWithString> { 35 - return __request(OpenAPI, { 36 - method: 'POST', 37 - url: '/api/v{api-version}/response', 38 - errors: { 39 - 500: `Message for 500 error`, 40 - 501: `Message for 501 error`, 41 - 502: `Message for 502 error`, 42 - }, 43 - }); 44 - } 45 - 46 - /** 47 - * @returns any Message for 200 response 48 - * @returns ModelWithString Message for default response 49 - * @returns ModelThatExtends Message for 201 response 50 - * @returns ModelThatExtendsExtends Message for 202 response 51 - * @throws ApiError 52 - */ 53 - public static callWithResponses(): CancelablePromise< 54 - | { 55 - readonly '@namespace.string'?: string; 56 - readonly '@namespace.integer'?: number; 57 - readonly value?: Array<ModelWithString>; 58 - } 59 - | ModelWithString 60 - | ModelThatExtends 61 - | ModelThatExtendsExtends 62 - > { 63 - return __request(OpenAPI, { 64 - method: 'PUT', 65 - url: '/api/v{api-version}/response', 66 - errors: { 67 - 500: `Message for 500 error`, 68 - 501: `Message for 501 error`, 69 - 502: `Message for 502 error`, 70 - }, 71 - }); 72 - } 73 - }
-75
test/__snapshots__/v2/services/SimpleService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class SimpleService { 6 - /** 7 - * @throws ApiError 8 - */ 9 - public static getCallWithoutParametersAndResponse(): CancelablePromise<void> { 10 - return __request(OpenAPI, { 11 - method: 'GET', 12 - url: '/api/v{api-version}/simple', 13 - }); 14 - } 15 - 16 - /** 17 - * @throws ApiError 18 - */ 19 - public static putCallWithoutParametersAndResponse(): CancelablePromise<void> { 20 - return __request(OpenAPI, { 21 - method: 'PUT', 22 - url: '/api/v{api-version}/simple', 23 - }); 24 - } 25 - 26 - /** 27 - * @throws ApiError 28 - */ 29 - public static postCallWithoutParametersAndResponse(): CancelablePromise<void> { 30 - return __request(OpenAPI, { 31 - method: 'POST', 32 - url: '/api/v{api-version}/simple', 33 - }); 34 - } 35 - 36 - /** 37 - * @throws ApiError 38 - */ 39 - public static deleteCallWithoutParametersAndResponse(): CancelablePromise<void> { 40 - return __request(OpenAPI, { 41 - method: 'DELETE', 42 - url: '/api/v{api-version}/simple', 43 - }); 44 - } 45 - 46 - /** 47 - * @throws ApiError 48 - */ 49 - public static optionsCallWithoutParametersAndResponse(): CancelablePromise<void> { 50 - return __request(OpenAPI, { 51 - method: 'OPTIONS', 52 - url: '/api/v{api-version}/simple', 53 - }); 54 - } 55 - 56 - /** 57 - * @throws ApiError 58 - */ 59 - public static headCallWithoutParametersAndResponse(): CancelablePromise<void> { 60 - return __request(OpenAPI, { 61 - method: 'HEAD', 62 - url: '/api/v{api-version}/simple', 63 - }); 64 - } 65 - 66 - /** 67 - * @throws ApiError 68 - */ 69 - public static patchCallWithoutParametersAndResponse(): CancelablePromise<void> { 70 - return __request(OpenAPI, { 71 - method: 'PATCH', 72 - url: '/api/v{api-version}/simple', 73 - }); 74 - } 75 - }
-76
test/__snapshots__/v2/services/TypesService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataTypes = { 6 - /** 7 - * This is a number parameter 8 - */ 9 - id?: number; 10 - /** 11 - * This is an array parameter 12 - */ 13 - parameterArray: Array<string>; 14 - /** 15 - * This is a boolean parameter 16 - */ 17 - parameterBoolean?: boolean; 18 - /** 19 - * This is a dictionary parameter 20 - */ 21 - parameterDictionary: Record<string, string>; 22 - /** 23 - * This is an enum parameter 24 - */ 25 - parameterEnum: 'Success' | 'Warning' | 'Error'; 26 - /** 27 - * This is a number parameter 28 - */ 29 - parameterNumber?: number; 30 - /** 31 - * This is an object parameter 32 - */ 33 - parameterObject?: unknown; 34 - /** 35 - * This is a string parameter 36 - */ 37 - parameterString?: string; 38 - }; 39 - 40 - export class TypesService { 41 - /** 42 - * @returns number Response is a simple number 43 - * @returns string Response is a simple string 44 - * @returns boolean Response is a simple boolean 45 - * @returns any Response is a simple object 46 - * @throws ApiError 47 - */ 48 - public static types(data: TDataTypes): CancelablePromise<number | string | boolean | unknown> { 49 - const { 50 - id, 51 - parameterArray, 52 - parameterBoolean = true, 53 - parameterDictionary, 54 - parameterEnum, 55 - parameterNumber = 123, 56 - parameterObject = null, 57 - parameterString = 'default', 58 - } = data; 59 - return __request(OpenAPI, { 60 - method: 'GET', 61 - url: '/api/v{api-version}/types', 62 - path: { 63 - id, 64 - }, 65 - query: { 66 - parameterNumber, 67 - parameterString, 68 - parameterBoolean, 69 - parameterObject, 70 - parameterArray, 71 - parameterDictionary, 72 - parameterEnum, 73 - }, 74 - }); 75 - } 76 - }
-17
test/__snapshots__/v2/services/index.ts.snap
··· 1 - export { CollectionFormatService } from './CollectionFormatService'; 2 - export { ComplexService } from './ComplexService'; 3 - export { DefaultService } from './DefaultService'; 4 - export { DefaultsService } from './DefaultsService'; 5 - export { DescriptionsService } from './DescriptionsService'; 6 - export { DuplicateService } from './DuplicateService'; 7 - export { ErrorService } from './ErrorService'; 8 - export { HeaderService } from './HeaderService'; 9 - export { MultipleTags1Service } from './MultipleTags1Service'; 10 - export { MultipleTags2Service } from './MultipleTags2Service'; 11 - export { MultipleTags3Service } from './MultipleTags3Service'; 12 - export { NoContentService } from './NoContentService'; 13 - export { NonAsciiÆøåÆøÅöôêÊService } from './NonAsciiÆøåÆøÅöôêÊService'; 14 - export { ParametersService } from './ParametersService'; 15 - export { ResponseService } from './ResponseService'; 16 - export { SimpleService } from './SimpleService'; 17 - export { TypesService } from './TypesService';
+1198
test/__snapshots__/v3/services.ts.snap
··· 1 + import type { CancelablePromise } from './core/CancelablePromise'; 2 + import { OpenAPI } from './core/OpenAPI'; 3 + import { request as __request } from './core/request'; 4 + 5 + import type { 6 + ModelWithArrayReadOnlyAndWriteOnly, 7 + ModelWithReadOnlyAndWriteOnly, 8 + ModelWithNestedArrayEnumsDataFoo, 9 + ModelWithOneOfEnum, 10 + ModelWithString, 11 + Pageable, 12 + DeprecatedModel, 13 + ModelThatExtends, 14 + ModelThatExtendsExtends, 15 + ModelWithArray, 16 + ModelWithDictionary, 17 + ModelWithEnum, 18 + NonAsciiStringæøåÆØÅöôêÊ字符串, 19 + } from './models'; 20 + 21 + export type TDataPostServiceWithEmptyTag = { 22 + requestBody: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 23 + }; 24 + 25 + export class DefaultService { 26 + /** 27 + * @throws ApiError 28 + */ 29 + public static serviceWithEmptyTag(): CancelablePromise<void> { 30 + return __request(OpenAPI, { 31 + method: 'GET', 32 + url: '/api/v{api-version}/no-tag', 33 + }); 34 + } 35 + 36 + /** 37 + * @returns ModelWithReadOnlyAndWriteOnly 38 + * @throws ApiError 39 + */ 40 + public static postServiceWithEmptyTag( 41 + data: TDataPostServiceWithEmptyTag 42 + ): CancelablePromise<ModelWithReadOnlyAndWriteOnly> { 43 + const { requestBody } = data; 44 + return __request(OpenAPI, { 45 + method: 'POST', 46 + url: '/api/v{api-version}/no-tag', 47 + body: requestBody, 48 + mediaType: 'application/json', 49 + }); 50 + } 51 + } 52 + 53 + export class SimpleService { 54 + /** 55 + * @throws ApiError 56 + */ 57 + public static getCallWithoutParametersAndResponse(): CancelablePromise<void> { 58 + return __request(OpenAPI, { 59 + method: 'GET', 60 + url: '/api/v{api-version}/simple', 61 + }); 62 + } 63 + 64 + /** 65 + * @throws ApiError 66 + */ 67 + public static putCallWithoutParametersAndResponse(): CancelablePromise<void> { 68 + return __request(OpenAPI, { 69 + method: 'PUT', 70 + url: '/api/v{api-version}/simple', 71 + }); 72 + } 73 + 74 + /** 75 + * @throws ApiError 76 + */ 77 + public static postCallWithoutParametersAndResponse(): CancelablePromise<void> { 78 + return __request(OpenAPI, { 79 + method: 'POST', 80 + url: '/api/v{api-version}/simple', 81 + }); 82 + } 83 + 84 + /** 85 + * @throws ApiError 86 + */ 87 + public static deleteCallWithoutParametersAndResponse(): CancelablePromise<void> { 88 + return __request(OpenAPI, { 89 + method: 'DELETE', 90 + url: '/api/v{api-version}/simple', 91 + }); 92 + } 93 + 94 + /** 95 + * @throws ApiError 96 + */ 97 + public static optionsCallWithoutParametersAndResponse(): CancelablePromise<void> { 98 + return __request(OpenAPI, { 99 + method: 'OPTIONS', 100 + url: '/api/v{api-version}/simple', 101 + }); 102 + } 103 + 104 + /** 105 + * @throws ApiError 106 + */ 107 + public static headCallWithoutParametersAndResponse(): CancelablePromise<void> { 108 + return __request(OpenAPI, { 109 + method: 'HEAD', 110 + url: '/api/v{api-version}/simple', 111 + }); 112 + } 113 + 114 + /** 115 + * @throws ApiError 116 + */ 117 + public static patchCallWithoutParametersAndResponse(): CancelablePromise<void> { 118 + return __request(OpenAPI, { 119 + method: 'PATCH', 120 + url: '/api/v{api-version}/simple', 121 + }); 122 + } 123 + } 124 + 125 + export type TDataDeleteFoo = { 126 + /** 127 + * bar in method 128 + */ 129 + bar: string; 130 + /** 131 + * foo in method 132 + */ 133 + foo: string; 134 + }; 135 + export type TDataCallWithParameters = { 136 + fooAllOfEnum: ModelWithNestedArrayEnumsDataFoo; 137 + fooRefEnum?: ModelWithNestedArrayEnumsDataFoo; 138 + /** 139 + * This is the parameter that goes into the cookie 140 + */ 141 + parameterCookie: string | null; 142 + /** 143 + * This is the parameter that goes into the form data 144 + */ 145 + parameterForm: string | null; 146 + /** 147 + * This is the parameter that goes into the header 148 + */ 149 + parameterHeader: string | null; 150 + /** 151 + * This is the parameter that goes into the path 152 + */ 153 + parameterPath: string | null; 154 + /** 155 + * This is the parameter that goes into the query params 156 + */ 157 + parameterQuery: string | null; 158 + /** 159 + * This is the parameter that goes into the body 160 + */ 161 + requestBody: ModelWithString | null; 162 + }; 163 + export type TDataCallWithWeirdParameterNames = { 164 + /** 165 + * This is the parameter with a reserved keyword 166 + */ 167 + _default?: string; 168 + /** 169 + * This is the parameter that goes into the cookie 170 + */ 171 + parameterCookie: string | null; 172 + /** 173 + * This is the parameter that goes into the request form data 174 + */ 175 + parameterForm: string | null; 176 + /** 177 + * This is the parameter that goes into the request header 178 + */ 179 + parameterHeader: string | null; 180 + /** 181 + * This is the parameter that goes into the path 182 + */ 183 + parameterPath1?: string; 184 + /** 185 + * This is the parameter that goes into the path 186 + */ 187 + parameterPath2?: string; 188 + /** 189 + * This is the parameter that goes into the path 190 + */ 191 + parameterPath3?: string; 192 + /** 193 + * This is the parameter that goes into the request query params 194 + */ 195 + parameterQuery: string | null; 196 + /** 197 + * This is the parameter that goes into the body 198 + */ 199 + requestBody: ModelWithString | null; 200 + }; 201 + export type TDataGetCallWithOptionalParam = { 202 + /** 203 + * This is an optional parameter 204 + */ 205 + parameter?: string; 206 + /** 207 + * This is a required parameter 208 + */ 209 + requestBody: ModelWithOneOfEnum; 210 + }; 211 + export type TDataPostCallWithOptionalParam = { 212 + /** 213 + * This is a required parameter 214 + */ 215 + parameter: Pageable; 216 + /** 217 + * This is an optional parameter 218 + */ 219 + requestBody?: ModelWithString; 220 + }; 221 + 222 + export class ParametersService { 223 + /** 224 + * @throws ApiError 225 + */ 226 + public static deleteFoo(data: TDataDeleteFoo): CancelablePromise<void> { 227 + const { bar, foo } = data; 228 + return __request(OpenAPI, { 229 + method: 'DELETE', 230 + url: '/api/v{api-version}/foo/{foo}/bar/{bar}', 231 + path: { 232 + foo, 233 + bar, 234 + }, 235 + }); 236 + } 237 + 238 + /** 239 + * @throws ApiError 240 + */ 241 + public static callWithParameters(data: TDataCallWithParameters): CancelablePromise<void> { 242 + const { 243 + fooAllOfEnum, 244 + fooRefEnum, 245 + parameterCookie, 246 + parameterForm, 247 + parameterHeader, 248 + parameterPath, 249 + parameterQuery, 250 + requestBody, 251 + } = data; 252 + return __request(OpenAPI, { 253 + method: 'POST', 254 + url: '/api/v{api-version}/parameters/{parameterPath}', 255 + path: { 256 + parameterPath, 257 + }, 258 + cookies: { 259 + parameterCookie, 260 + }, 261 + headers: { 262 + parameterHeader, 263 + }, 264 + query: { 265 + foo_ref_enum: fooRefEnum, 266 + foo_all_of_enum: fooAllOfEnum, 267 + parameterQuery, 268 + }, 269 + formData: { 270 + parameterForm, 271 + }, 272 + body: requestBody, 273 + mediaType: 'application/json', 274 + }); 275 + } 276 + 277 + /** 278 + * @throws ApiError 279 + */ 280 + public static callWithWeirdParameterNames(data: TDataCallWithWeirdParameterNames): CancelablePromise<void> { 281 + const { 282 + _default, 283 + parameterCookie, 284 + parameterForm, 285 + parameterHeader, 286 + parameterPath1, 287 + parameterPath2, 288 + parameterPath3, 289 + parameterQuery, 290 + requestBody, 291 + } = data; 292 + return __request(OpenAPI, { 293 + method: 'POST', 294 + url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', 295 + path: { 296 + 'parameter.path.1': parameterPath1, 297 + 'parameter-path-2': parameterPath2, 298 + 'PARAMETER-PATH-3': parameterPath3, 299 + }, 300 + cookies: { 301 + 'PARAMETER-COOKIE': parameterCookie, 302 + }, 303 + headers: { 304 + 'parameter.header': parameterHeader, 305 + }, 306 + query: { 307 + default: _default, 308 + 'parameter-query': parameterQuery, 309 + }, 310 + formData: { 311 + parameter_form: parameterForm, 312 + }, 313 + body: requestBody, 314 + mediaType: 'application/json', 315 + }); 316 + } 317 + 318 + /** 319 + * @throws ApiError 320 + */ 321 + public static getCallWithOptionalParam(data: TDataGetCallWithOptionalParam): CancelablePromise<void> { 322 + const { parameter, requestBody } = data; 323 + return __request(OpenAPI, { 324 + method: 'GET', 325 + url: '/api/v{api-version}/parameters/', 326 + query: { 327 + parameter, 328 + }, 329 + body: requestBody, 330 + mediaType: 'application/json', 331 + }); 332 + } 333 + 334 + /** 335 + * @throws ApiError 336 + */ 337 + public static postCallWithOptionalParam(data: TDataPostCallWithOptionalParam): CancelablePromise<void> { 338 + const { parameter, requestBody } = data; 339 + return __request(OpenAPI, { 340 + method: 'POST', 341 + url: '/api/v{api-version}/parameters/', 342 + query: { 343 + parameter, 344 + }, 345 + body: requestBody, 346 + mediaType: 'application/json', 347 + }); 348 + } 349 + } 350 + 351 + export type TDataCallWithDescriptions = { 352 + /** 353 + * Testing backticks in string: `backticks` and ```multiple backticks``` should work 354 + */ 355 + parameterWithBackticks?: unknown; 356 + /** 357 + * Testing multiline comments in string: First line 358 + * Second line 359 + * 360 + * Fourth line 361 + */ 362 + parameterWithBreaks?: unknown; 363 + /** 364 + * Testing expression placeholders in string: ${expression} should work 365 + */ 366 + parameterWithExpressionPlaceholders?: unknown; 367 + /** 368 + * Testing quotes in string: 'single quote''' and "double quotes""" should work 369 + */ 370 + parameterWithQuotes?: unknown; 371 + /** 372 + * Testing reserved characters in string: * inline * and ** inline ** should work 373 + */ 374 + parameterWithReservedCharacters?: unknown; 375 + /** 376 + * Testing slashes in string: \backwards\\\ and /forwards/// should work 377 + */ 378 + parameterWithSlashes?: unknown; 379 + }; 380 + 381 + export class DescriptionsService { 382 + /** 383 + * @throws ApiError 384 + */ 385 + public static callWithDescriptions(data: TDataCallWithDescriptions = {}): CancelablePromise<void> { 386 + const { 387 + parameterWithBackticks, 388 + parameterWithBreaks, 389 + parameterWithExpressionPlaceholders, 390 + parameterWithQuotes, 391 + parameterWithReservedCharacters, 392 + parameterWithSlashes, 393 + } = data; 394 + return __request(OpenAPI, { 395 + method: 'POST', 396 + url: '/api/v{api-version}/descriptions/', 397 + query: { 398 + parameterWithBreaks, 399 + parameterWithBackticks, 400 + parameterWithSlashes, 401 + parameterWithExpressionPlaceholders, 402 + parameterWithQuotes, 403 + parameterWithReservedCharacters, 404 + }, 405 + }); 406 + } 407 + } 408 + 409 + export type TDataDeprecatedCall = { 410 + /** 411 + * This parameter is deprecated 412 + */ 413 + parameter: DeprecatedModel | null; 414 + }; 415 + 416 + export class DeprecatedService { 417 + /** 418 + * @deprecated 419 + * @throws ApiError 420 + */ 421 + public static deprecatedCall(data: TDataDeprecatedCall): CancelablePromise<void> { 422 + const { parameter } = data; 423 + return __request(OpenAPI, { 424 + method: 'POST', 425 + url: '/api/v{api-version}/parameters/deprecated', 426 + headers: { 427 + parameter, 428 + }, 429 + }); 430 + } 431 + } 432 + 433 + export type TDataPostApiRequestBody = { 434 + /** 435 + * A reusable request body 436 + */ 437 + foo?: ModelWithString; 438 + /** 439 + * This is a reusable parameter 440 + */ 441 + parameter?: string; 442 + }; 443 + 444 + export class RequestBodyService { 445 + /** 446 + * @throws ApiError 447 + */ 448 + public static postApiRequestBody(data: TDataPostApiRequestBody = {}): CancelablePromise<void> { 449 + const { foo, parameter } = data; 450 + return __request(OpenAPI, { 451 + method: 'POST', 452 + url: '/api/v{api-version}/requestBody/', 453 + query: { 454 + parameter, 455 + }, 456 + body: foo, 457 + mediaType: 'application/json', 458 + }); 459 + } 460 + } 461 + 462 + export type TDataPostApiFormData = { 463 + /** 464 + * A reusable request body 465 + */ 466 + formData?: ModelWithString; 467 + /** 468 + * This is a reusable parameter 469 + */ 470 + parameter?: string; 471 + }; 472 + 473 + export class FormDataService { 474 + /** 475 + * @throws ApiError 476 + */ 477 + public static postApiFormData(data: TDataPostApiFormData = {}): CancelablePromise<void> { 478 + const { formData, parameter } = data; 479 + return __request(OpenAPI, { 480 + method: 'POST', 481 + url: '/api/v{api-version}/formData/', 482 + query: { 483 + parameter, 484 + }, 485 + formData: formData, 486 + mediaType: 'multipart/form-data', 487 + }); 488 + } 489 + } 490 + 491 + export type TDataCallWithDefaultParameters = { 492 + /** 493 + * This is a simple boolean with default value 494 + */ 495 + parameterBoolean?: boolean | null; 496 + /** 497 + * This is a simple enum with default value 498 + */ 499 + parameterEnum?: 'Success' | 'Warning' | 'Error'; 500 + /** 501 + * This is a simple model with default value 502 + */ 503 + parameterModel?: ModelWithString | null; 504 + /** 505 + * This is a simple number with default value 506 + */ 507 + parameterNumber?: number | null; 508 + /** 509 + * This is a simple string with default value 510 + */ 511 + parameterString?: string | null; 512 + }; 513 + export type TDataCallWithDefaultOptionalParameters = { 514 + /** 515 + * This is a simple boolean that is optional with default value 516 + */ 517 + parameterBoolean?: boolean; 518 + /** 519 + * This is a simple enum that is optional with default value 520 + */ 521 + parameterEnum?: 'Success' | 'Warning' | 'Error'; 522 + /** 523 + * This is a simple model that is optional with default value 524 + */ 525 + parameterModel?: ModelWithString; 526 + /** 527 + * This is a simple number that is optional with default value 528 + */ 529 + parameterNumber?: number; 530 + /** 531 + * This is a simple string that is optional with default value 532 + */ 533 + parameterString?: string; 534 + }; 535 + export type TDataCallToTestOrderOfParams = { 536 + /** 537 + * This is a optional string with default 538 + */ 539 + parameterOptionalStringWithDefault?: string; 540 + /** 541 + * This is a optional string with empty default 542 + */ 543 + parameterOptionalStringWithEmptyDefault?: string; 544 + /** 545 + * This is a optional string with no default 546 + */ 547 + parameterOptionalStringWithNoDefault?: string; 548 + /** 549 + * This is a string that can be null with default 550 + */ 551 + parameterStringNullableWithDefault?: string | null; 552 + /** 553 + * This is a string that can be null with no default 554 + */ 555 + parameterStringNullableWithNoDefault?: string | null; 556 + /** 557 + * This is a string with default 558 + */ 559 + parameterStringWithDefault?: string; 560 + /** 561 + * This is a string with empty default 562 + */ 563 + parameterStringWithEmptyDefault?: string; 564 + /** 565 + * This is a string with no default 566 + */ 567 + parameterStringWithNoDefault: string; 568 + }; 569 + 570 + export class DefaultsService { 571 + /** 572 + * @throws ApiError 573 + */ 574 + public static callWithDefaultParameters(data: TDataCallWithDefaultParameters = {}): CancelablePromise<void> { 575 + const { 576 + parameterBoolean = true, 577 + parameterEnum = 'Success', 578 + parameterModel = { 579 + prop: 'Hello World!', 580 + }, 581 + parameterNumber = 123, 582 + parameterString = 'Hello World!', 583 + } = data; 584 + return __request(OpenAPI, { 585 + method: 'GET', 586 + url: '/api/v{api-version}/defaults', 587 + query: { 588 + parameterString, 589 + parameterNumber, 590 + parameterBoolean, 591 + parameterEnum, 592 + parameterModel, 593 + }, 594 + }); 595 + } 596 + 597 + /** 598 + * @throws ApiError 599 + */ 600 + public static callWithDefaultOptionalParameters( 601 + data: TDataCallWithDefaultOptionalParameters = {} 602 + ): CancelablePromise<void> { 603 + const { 604 + parameterBoolean = true, 605 + parameterEnum = 'Success', 606 + parameterModel = { 607 + prop: 'Hello World!', 608 + }, 609 + parameterNumber = 123, 610 + parameterString = 'Hello World!', 611 + } = data; 612 + return __request(OpenAPI, { 613 + method: 'POST', 614 + url: '/api/v{api-version}/defaults', 615 + query: { 616 + parameterString, 617 + parameterNumber, 618 + parameterBoolean, 619 + parameterEnum, 620 + parameterModel, 621 + }, 622 + }); 623 + } 624 + 625 + /** 626 + * @throws ApiError 627 + */ 628 + public static callToTestOrderOfParams(data: TDataCallToTestOrderOfParams): CancelablePromise<void> { 629 + const { 630 + parameterOptionalStringWithDefault = 'Hello World!', 631 + parameterOptionalStringWithEmptyDefault = '', 632 + parameterOptionalStringWithNoDefault, 633 + parameterStringNullableWithDefault = null, 634 + parameterStringNullableWithNoDefault, 635 + parameterStringWithDefault = 'Hello World!', 636 + parameterStringWithEmptyDefault = '', 637 + parameterStringWithNoDefault, 638 + } = data; 639 + return __request(OpenAPI, { 640 + method: 'PUT', 641 + url: '/api/v{api-version}/defaults', 642 + query: { 643 + parameterOptionalStringWithDefault, 644 + parameterOptionalStringWithEmptyDefault, 645 + parameterOptionalStringWithNoDefault, 646 + parameterStringWithDefault, 647 + parameterStringWithEmptyDefault, 648 + parameterStringWithNoDefault, 649 + parameterStringNullableWithNoDefault, 650 + parameterStringNullableWithDefault, 651 + }, 652 + }); 653 + } 654 + } 655 + 656 + export class DuplicateService { 657 + /** 658 + * @throws ApiError 659 + */ 660 + public static duplicateName(): CancelablePromise<void> { 661 + return __request(OpenAPI, { 662 + method: 'GET', 663 + url: '/api/v{api-version}/duplicate', 664 + }); 665 + } 666 + 667 + /** 668 + * @throws ApiError 669 + */ 670 + public static duplicateName1(): CancelablePromise<void> { 671 + return __request(OpenAPI, { 672 + method: 'POST', 673 + url: '/api/v{api-version}/duplicate', 674 + }); 675 + } 676 + 677 + /** 678 + * @throws ApiError 679 + */ 680 + public static duplicateName2(): CancelablePromise<void> { 681 + return __request(OpenAPI, { 682 + method: 'PUT', 683 + url: '/api/v{api-version}/duplicate', 684 + }); 685 + } 686 + 687 + /** 688 + * @throws ApiError 689 + */ 690 + public static duplicateName3(): CancelablePromise<void> { 691 + return __request(OpenAPI, { 692 + method: 'DELETE', 693 + url: '/api/v{api-version}/duplicate', 694 + }); 695 + } 696 + } 697 + 698 + export class NoContentService { 699 + /** 700 + * @returns void Success 701 + * @throws ApiError 702 + */ 703 + public static callWithNoContentResponse(): CancelablePromise<void> { 704 + return __request(OpenAPI, { 705 + method: 'GET', 706 + url: '/api/v{api-version}/no-content', 707 + }); 708 + } 709 + 710 + /** 711 + * @returns number Response is a simple number 712 + * @returns void Success 713 + * @throws ApiError 714 + */ 715 + public static callWithResponseAndNoContentResponse(): CancelablePromise<number | void> { 716 + return __request(OpenAPI, { 717 + method: 'GET', 718 + url: '/api/v{api-version}/multiple-tags/response-and-no-content', 719 + }); 720 + } 721 + } 722 + 723 + export class ResponseService { 724 + /** 725 + * @returns number Response is a simple number 726 + * @returns void Success 727 + * @throws ApiError 728 + */ 729 + public static callWithResponseAndNoContentResponse(): CancelablePromise<number | void> { 730 + return __request(OpenAPI, { 731 + method: 'GET', 732 + url: '/api/v{api-version}/multiple-tags/response-and-no-content', 733 + }); 734 + } 735 + 736 + /** 737 + * @returns ModelWithString 738 + * @throws ApiError 739 + */ 740 + public static callWithResponse(): CancelablePromise<ModelWithString> { 741 + return __request(OpenAPI, { 742 + method: 'GET', 743 + url: '/api/v{api-version}/response', 744 + }); 745 + } 746 + 747 + /** 748 + * @returns ModelWithString Message for default response 749 + * @throws ApiError 750 + */ 751 + public static callWithDuplicateResponses(): CancelablePromise<ModelWithString> { 752 + return __request(OpenAPI, { 753 + method: 'POST', 754 + url: '/api/v{api-version}/response', 755 + errors: { 756 + 500: `Message for 500 error`, 757 + 501: `Message for 501 error`, 758 + 502: `Message for 502 error`, 759 + }, 760 + }); 761 + } 762 + 763 + /** 764 + * @returns any Message for 200 response 765 + * @returns ModelWithString Message for default response 766 + * @returns ModelThatExtends Message for 201 response 767 + * @returns ModelThatExtendsExtends Message for 202 response 768 + * @throws ApiError 769 + */ 770 + public static callWithResponses(): CancelablePromise< 771 + | { 772 + readonly '@namespace.string'?: string; 773 + readonly '@namespace.integer'?: number; 774 + readonly value?: Array<ModelWithString>; 775 + } 776 + | ModelWithString 777 + | ModelThatExtends 778 + | ModelThatExtendsExtends 779 + > { 780 + return __request(OpenAPI, { 781 + method: 'PUT', 782 + url: '/api/v{api-version}/response', 783 + errors: { 784 + 500: `Message for 500 error`, 785 + 501: `Message for 501 error`, 786 + 502: `Message for 502 error`, 787 + }, 788 + }); 789 + } 790 + } 791 + 792 + export class MultipleTags1Service { 793 + /** 794 + * @returns void Success 795 + * @throws ApiError 796 + */ 797 + public static dummyA(): CancelablePromise<void> { 798 + return __request(OpenAPI, { 799 + method: 'GET', 800 + url: '/api/v{api-version}/multiple-tags/a', 801 + }); 802 + } 803 + 804 + /** 805 + * @returns void Success 806 + * @throws ApiError 807 + */ 808 + public static dummyB(): CancelablePromise<void> { 809 + return __request(OpenAPI, { 810 + method: 'GET', 811 + url: '/api/v{api-version}/multiple-tags/b', 812 + }); 813 + } 814 + } 815 + 816 + export class MultipleTags2Service { 817 + /** 818 + * @returns void Success 819 + * @throws ApiError 820 + */ 821 + public static dummyA(): CancelablePromise<void> { 822 + return __request(OpenAPI, { 823 + method: 'GET', 824 + url: '/api/v{api-version}/multiple-tags/a', 825 + }); 826 + } 827 + 828 + /** 829 + * @returns void Success 830 + * @throws ApiError 831 + */ 832 + public static dummyB(): CancelablePromise<void> { 833 + return __request(OpenAPI, { 834 + method: 'GET', 835 + url: '/api/v{api-version}/multiple-tags/b', 836 + }); 837 + } 838 + } 839 + 840 + export class MultipleTags3Service { 841 + /** 842 + * @returns void Success 843 + * @throws ApiError 844 + */ 845 + public static dummyB(): CancelablePromise<void> { 846 + return __request(OpenAPI, { 847 + method: 'GET', 848 + url: '/api/v{api-version}/multiple-tags/b', 849 + }); 850 + } 851 + } 852 + 853 + export type TDataCollectionFormat = { 854 + /** 855 + * This is an array parameter that is sent as csv format (comma-separated values) 856 + */ 857 + parameterArrayCsv: Array<string> | null; 858 + /** 859 + * This is an array parameter that is sent as multi format (multiple parameter instances) 860 + */ 861 + parameterArrayMulti: Array<string> | null; 862 + /** 863 + * This is an array parameter that is sent as pipes format (pipe-separated values) 864 + */ 865 + parameterArrayPipes: Array<string> | null; 866 + /** 867 + * This is an array parameter that is sent as ssv format (space-separated values) 868 + */ 869 + parameterArraySsv: Array<string> | null; 870 + /** 871 + * This is an array parameter that is sent as tsv format (tab-separated values) 872 + */ 873 + parameterArrayTsv: Array<string> | null; 874 + }; 875 + 876 + export class CollectionFormatService { 877 + /** 878 + * @throws ApiError 879 + */ 880 + public static collectionFormat(data: TDataCollectionFormat): CancelablePromise<void> { 881 + const { parameterArrayCsv, parameterArrayMulti, parameterArrayPipes, parameterArraySsv, parameterArrayTsv } = 882 + data; 883 + return __request(OpenAPI, { 884 + method: 'GET', 885 + url: '/api/v{api-version}/collectionFormat', 886 + query: { 887 + parameterArrayCSV: parameterArrayCsv, 888 + parameterArraySSV: parameterArraySsv, 889 + parameterArrayTSV: parameterArrayTsv, 890 + parameterArrayPipes, 891 + parameterArrayMulti, 892 + }, 893 + }); 894 + } 895 + } 896 + 897 + export type TDataTypes = { 898 + /** 899 + * This is a number parameter 900 + */ 901 + id?: number; 902 + /** 903 + * This is an array parameter 904 + */ 905 + parameterArray: Array<string> | null; 906 + /** 907 + * This is a boolean parameter 908 + */ 909 + parameterBoolean?: boolean | null; 910 + /** 911 + * This is a dictionary parameter 912 + */ 913 + parameterDictionary: Record<string, unknown> | null; 914 + /** 915 + * This is an enum parameter 916 + */ 917 + parameterEnum: 'Success' | 'Warning' | 'Error' | null; 918 + /** 919 + * This is a number parameter 920 + */ 921 + parameterNumber?: number; 922 + /** 923 + * This is an object parameter 924 + */ 925 + parameterObject?: Record<string, unknown> | null; 926 + /** 927 + * This is a string parameter 928 + */ 929 + parameterString?: string | null; 930 + }; 931 + 932 + export class TypesService { 933 + /** 934 + * @returns number Response is a simple number 935 + * @returns string Response is a simple string 936 + * @returns boolean Response is a simple boolean 937 + * @returns unknown Response is a simple object 938 + * @throws ApiError 939 + */ 940 + public static types(data: TDataTypes): CancelablePromise<number | string | boolean | Record<string, unknown>> { 941 + const { 942 + id, 943 + parameterArray, 944 + parameterBoolean = true, 945 + parameterDictionary, 946 + parameterEnum, 947 + parameterNumber = 123, 948 + parameterObject = null, 949 + parameterString = 'default', 950 + } = data; 951 + return __request(OpenAPI, { 952 + method: 'GET', 953 + url: '/api/v{api-version}/types', 954 + path: { 955 + id, 956 + }, 957 + query: { 958 + parameterNumber, 959 + parameterString, 960 + parameterBoolean, 961 + parameterObject, 962 + parameterArray, 963 + parameterDictionary, 964 + parameterEnum, 965 + }, 966 + }); 967 + } 968 + } 969 + 970 + export type TDataUploadFile = { 971 + /** 972 + * Supply a file reference for upload 973 + */ 974 + file: Blob | File; 975 + }; 976 + 977 + export class UploadService { 978 + /** 979 + * @returns boolean 980 + * @throws ApiError 981 + */ 982 + public static uploadFile(data: TDataUploadFile): CancelablePromise<boolean> { 983 + const { file } = data; 984 + return __request(OpenAPI, { 985 + method: 'POST', 986 + url: '/api/v{api-version}/upload', 987 + formData: { 988 + file, 989 + }, 990 + }); 991 + } 992 + } 993 + 994 + export type TDataFileResponse = { 995 + id: string; 996 + }; 997 + 998 + export class FileResponseService { 999 + /** 1000 + * @returns binary Success 1001 + * @throws ApiError 1002 + */ 1003 + public static fileResponse(data: TDataFileResponse): CancelablePromise<Blob | File> { 1004 + const { id } = data; 1005 + return __request(OpenAPI, { 1006 + method: 'GET', 1007 + url: '/api/v{api-version}/file/{id}', 1008 + path: { 1009 + id, 1010 + }, 1011 + }); 1012 + } 1013 + } 1014 + 1015 + export type TDataComplexTypes = { 1016 + /** 1017 + * Parameter containing object 1018 + */ 1019 + parameterObject: { 1020 + first?: { 1021 + second?: { 1022 + third?: string; 1023 + }; 1024 + }; 1025 + }; 1026 + /** 1027 + * Parameter containing reference 1028 + */ 1029 + parameterReference: ModelWithString; 1030 + }; 1031 + export type TDataComplexParams = { 1032 + id: number; 1033 + requestBody?: { 1034 + readonly key: string | null; 1035 + name: string | null; 1036 + enabled?: boolean; 1037 + readonly type: 'Monkey' | 'Horse' | 'Bird'; 1038 + listOfModels?: Array<ModelWithString> | null; 1039 + listOfStrings?: Array<string> | null; 1040 + parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; 1041 + readonly user?: { 1042 + readonly id?: number; 1043 + readonly name?: string | null; 1044 + }; 1045 + }; 1046 + }; 1047 + 1048 + export class ComplexService { 1049 + /** 1050 + * @returns ModelWithString Successful response 1051 + * @throws ApiError 1052 + */ 1053 + public static complexTypes(data: TDataComplexTypes): CancelablePromise<Array<ModelWithString>> { 1054 + const { parameterObject, parameterReference } = data; 1055 + return __request(OpenAPI, { 1056 + method: 'GET', 1057 + url: '/api/v{api-version}/complex', 1058 + query: { 1059 + parameterObject, 1060 + parameterReference, 1061 + }, 1062 + errors: { 1063 + 400: `400 server error`, 1064 + 500: `500 server error`, 1065 + }, 1066 + }); 1067 + } 1068 + 1069 + /** 1070 + * @returns ModelWithString Success 1071 + * @throws ApiError 1072 + */ 1073 + public static complexParams(data: TDataComplexParams): CancelablePromise<ModelWithString> { 1074 + const { id, requestBody } = data; 1075 + return __request(OpenAPI, { 1076 + method: 'PUT', 1077 + url: '/api/v{api-version}/complex/{id}', 1078 + path: { 1079 + id, 1080 + }, 1081 + body: requestBody, 1082 + mediaType: 'application/json-patch+json', 1083 + }); 1084 + } 1085 + } 1086 + 1087 + export type TDataMultipartRequest = { 1088 + formData?: { 1089 + content?: Blob | File; 1090 + data?: ModelWithString | null; 1091 + }; 1092 + }; 1093 + 1094 + export class MultipartService { 1095 + /** 1096 + * @throws ApiError 1097 + */ 1098 + public static multipartRequest(data: TDataMultipartRequest = {}): CancelablePromise<void> { 1099 + const { formData } = data; 1100 + return __request(OpenAPI, { 1101 + method: 'POST', 1102 + url: '/api/v{api-version}/multipart', 1103 + formData: formData, 1104 + mediaType: 'multipart/form-data', 1105 + }); 1106 + } 1107 + 1108 + /** 1109 + * @returns any OK 1110 + * @throws ApiError 1111 + */ 1112 + public static multipartResponse(): CancelablePromise<{ 1113 + file?: Blob | File; 1114 + metadata?: { 1115 + foo?: string; 1116 + bar?: string; 1117 + }; 1118 + }> { 1119 + return __request(OpenAPI, { 1120 + method: 'GET', 1121 + url: '/api/v{api-version}/multipart', 1122 + }); 1123 + } 1124 + } 1125 + 1126 + export class HeaderService { 1127 + /** 1128 + * @returns string Successful response 1129 + * @throws ApiError 1130 + */ 1131 + public static callWithResultFromHeader(): CancelablePromise<string> { 1132 + return __request(OpenAPI, { 1133 + method: 'POST', 1134 + url: '/api/v{api-version}/header', 1135 + responseHeader: 'operation-location', 1136 + errors: { 1137 + 400: `400 server error`, 1138 + 500: `500 server error`, 1139 + }, 1140 + }); 1141 + } 1142 + } 1143 + 1144 + export type TDataTestErrorCode = { 1145 + /** 1146 + * Status code to return 1147 + */ 1148 + status: number; 1149 + }; 1150 + 1151 + export class ErrorService { 1152 + /** 1153 + * @returns any Custom message: Successful response 1154 + * @throws ApiError 1155 + */ 1156 + public static testErrorCode(data: TDataTestErrorCode): CancelablePromise<any> { 1157 + const { status } = data; 1158 + return __request(OpenAPI, { 1159 + method: 'POST', 1160 + url: '/api/v{api-version}/error', 1161 + query: { 1162 + status, 1163 + }, 1164 + errors: { 1165 + 500: `Custom message: Internal Server Error`, 1166 + 501: `Custom message: Not Implemented`, 1167 + 502: `Custom message: Bad Gateway`, 1168 + 503: `Custom message: Service Unavailable`, 1169 + }, 1170 + }); 1171 + } 1172 + } 1173 + 1174 + export type TDataNonAsciiæøåÆøÅöôêÊ字符串 = { 1175 + /** 1176 + * Dummy input param 1177 + */ 1178 + nonAsciiParamæøåÆøÅöôêÊ: number; 1179 + }; 1180 + 1181 + export class NonAsciiÆøåÆøÅöôêÊService { 1182 + /** 1183 + * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response 1184 + * @throws ApiError 1185 + */ 1186 + public static nonAsciiæøåÆøÅöôêÊ字符串( 1187 + data: TDataNonAsciiæøåÆøÅöôêÊ字符串 1188 + ): CancelablePromise<Array<NonAsciiStringæøåÆØÅöôêÊ字符串>> { 1189 + const { nonAsciiParamæøåÆøÅöôêÊ } = data; 1190 + return __request(OpenAPI, { 1191 + method: 'POST', 1192 + url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 1193 + query: { 1194 + nonAsciiParamæøåÆØÅöôêÊ: nonAsciiParamæøåÆøÅöôêÊ, 1195 + }, 1196 + }); 1197 + } 1198 + }
-47
test/__snapshots__/v3/services/CollectionFormatService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataCollectionFormat = { 6 - /** 7 - * This is an array parameter that is sent as csv format (comma-separated values) 8 - */ 9 - parameterArrayCsv: Array<string> | null; 10 - /** 11 - * This is an array parameter that is sent as multi format (multiple parameter instances) 12 - */ 13 - parameterArrayMulti: Array<string> | null; 14 - /** 15 - * This is an array parameter that is sent as pipes format (pipe-separated values) 16 - */ 17 - parameterArrayPipes: Array<string> | null; 18 - /** 19 - * This is an array parameter that is sent as ssv format (space-separated values) 20 - */ 21 - parameterArraySsv: Array<string> | null; 22 - /** 23 - * This is an array parameter that is sent as tsv format (tab-separated values) 24 - */ 25 - parameterArrayTsv: Array<string> | null; 26 - }; 27 - 28 - export class CollectionFormatService { 29 - /** 30 - * @throws ApiError 31 - */ 32 - public static collectionFormat(data: TDataCollectionFormat): CancelablePromise<void> { 33 - const { parameterArrayCsv, parameterArrayMulti, parameterArrayPipes, parameterArraySsv, parameterArrayTsv } = 34 - data; 35 - return __request(OpenAPI, { 36 - method: 'GET', 37 - url: '/api/v{api-version}/collectionFormat', 38 - query: { 39 - parameterArrayCSV: parameterArrayCsv, 40 - parameterArraySSV: parameterArraySsv, 41 - parameterArrayTSV: parameterArrayTsv, 42 - parameterArrayPipes, 43 - parameterArrayMulti, 44 - }, 45 - }); 46 - } 47 - }
-76
test/__snapshots__/v3/services/ComplexService.ts.snap
··· 1 - import type { ModelWithArray, ModelWithDictionary, ModelWithEnum, ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataComplexTypes = { 7 - /** 8 - * Parameter containing object 9 - */ 10 - parameterObject: { 11 - first?: { 12 - second?: { 13 - third?: string; 14 - }; 15 - }; 16 - }; 17 - /** 18 - * Parameter containing reference 19 - */ 20 - parameterReference: ModelWithString; 21 - }; 22 - export type TDataComplexParams = { 23 - id: number; 24 - requestBody?: { 25 - readonly key: string | null; 26 - name: string | null; 27 - enabled?: boolean; 28 - readonly type: 'Monkey' | 'Horse' | 'Bird'; 29 - listOfModels?: Array<ModelWithString> | null; 30 - listOfStrings?: Array<string> | null; 31 - parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; 32 - readonly user?: { 33 - readonly id?: number; 34 - readonly name?: string | null; 35 - }; 36 - }; 37 - }; 38 - 39 - export class ComplexService { 40 - /** 41 - * @returns ModelWithString Successful response 42 - * @throws ApiError 43 - */ 44 - public static complexTypes(data: TDataComplexTypes): CancelablePromise<Array<ModelWithString>> { 45 - const { parameterObject, parameterReference } = data; 46 - return __request(OpenAPI, { 47 - method: 'GET', 48 - url: '/api/v{api-version}/complex', 49 - query: { 50 - parameterObject, 51 - parameterReference, 52 - }, 53 - errors: { 54 - 400: `400 server error`, 55 - 500: `500 server error`, 56 - }, 57 - }); 58 - } 59 - 60 - /** 61 - * @returns ModelWithString Success 62 - * @throws ApiError 63 - */ 64 - public static complexParams(data: TDataComplexParams): CancelablePromise<ModelWithString> { 65 - const { id, requestBody } = data; 66 - return __request(OpenAPI, { 67 - method: 'PUT', 68 - url: '/api/v{api-version}/complex/{id}', 69 - path: { 70 - id, 71 - }, 72 - body: requestBody, 73 - mediaType: 'application/json-patch+json', 74 - }); 75 - } 76 - }
-36
test/__snapshots__/v3/services/DefaultService.ts.snap
··· 1 - import type { ModelWithArrayReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnly } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataPostServiceWithEmptyTag = { 7 - requestBody: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 8 - }; 9 - 10 - export class DefaultService { 11 - /** 12 - * @throws ApiError 13 - */ 14 - public static serviceWithEmptyTag(): CancelablePromise<void> { 15 - return __request(OpenAPI, { 16 - method: 'GET', 17 - url: '/api/v{api-version}/no-tag', 18 - }); 19 - } 20 - 21 - /** 22 - * @returns ModelWithReadOnlyAndWriteOnly 23 - * @throws ApiError 24 - */ 25 - public static postServiceWithEmptyTag( 26 - data: TDataPostServiceWithEmptyTag 27 - ): CancelablePromise<ModelWithReadOnlyAndWriteOnly> { 28 - const { requestBody } = data; 29 - return __request(OpenAPI, { 30 - method: 'POST', 31 - url: '/api/v{api-version}/no-tag', 32 - body: requestBody, 33 - mediaType: 'application/json', 34 - }); 35 - } 36 - }
-169
test/__snapshots__/v3/services/DefaultsService.ts.snap
··· 1 - import type { ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataCallWithDefaultParameters = { 7 - /** 8 - * This is a simple boolean with default value 9 - */ 10 - parameterBoolean?: boolean | null; 11 - /** 12 - * This is a simple enum with default value 13 - */ 14 - parameterEnum?: 'Success' | 'Warning' | 'Error'; 15 - /** 16 - * This is a simple model with default value 17 - */ 18 - parameterModel?: ModelWithString | null; 19 - /** 20 - * This is a simple number with default value 21 - */ 22 - parameterNumber?: number | null; 23 - /** 24 - * This is a simple string with default value 25 - */ 26 - parameterString?: string | null; 27 - }; 28 - export type TDataCallWithDefaultOptionalParameters = { 29 - /** 30 - * This is a simple boolean that is optional with default value 31 - */ 32 - parameterBoolean?: boolean; 33 - /** 34 - * This is a simple enum that is optional with default value 35 - */ 36 - parameterEnum?: 'Success' | 'Warning' | 'Error'; 37 - /** 38 - * This is a simple model that is optional with default value 39 - */ 40 - parameterModel?: ModelWithString; 41 - /** 42 - * This is a simple number that is optional with default value 43 - */ 44 - parameterNumber?: number; 45 - /** 46 - * This is a simple string that is optional with default value 47 - */ 48 - parameterString?: string; 49 - }; 50 - export type TDataCallToTestOrderOfParams = { 51 - /** 52 - * This is a optional string with default 53 - */ 54 - parameterOptionalStringWithDefault?: string; 55 - /** 56 - * This is a optional string with empty default 57 - */ 58 - parameterOptionalStringWithEmptyDefault?: string; 59 - /** 60 - * This is a optional string with no default 61 - */ 62 - parameterOptionalStringWithNoDefault?: string; 63 - /** 64 - * This is a string that can be null with default 65 - */ 66 - parameterStringNullableWithDefault?: string | null; 67 - /** 68 - * This is a string that can be null with no default 69 - */ 70 - parameterStringNullableWithNoDefault?: string | null; 71 - /** 72 - * This is a string with default 73 - */ 74 - parameterStringWithDefault?: string; 75 - /** 76 - * This is a string with empty default 77 - */ 78 - parameterStringWithEmptyDefault?: string; 79 - /** 80 - * This is a string with no default 81 - */ 82 - parameterStringWithNoDefault: string; 83 - }; 84 - 85 - export class DefaultsService { 86 - /** 87 - * @throws ApiError 88 - */ 89 - public static callWithDefaultParameters(data: TDataCallWithDefaultParameters = {}): CancelablePromise<void> { 90 - const { 91 - parameterBoolean = true, 92 - parameterEnum = 'Success', 93 - parameterModel = { 94 - prop: 'Hello World!', 95 - }, 96 - parameterNumber = 123, 97 - parameterString = 'Hello World!', 98 - } = data; 99 - return __request(OpenAPI, { 100 - method: 'GET', 101 - url: '/api/v{api-version}/defaults', 102 - query: { 103 - parameterString, 104 - parameterNumber, 105 - parameterBoolean, 106 - parameterEnum, 107 - parameterModel, 108 - }, 109 - }); 110 - } 111 - 112 - /** 113 - * @throws ApiError 114 - */ 115 - public static callWithDefaultOptionalParameters( 116 - data: TDataCallWithDefaultOptionalParameters = {} 117 - ): CancelablePromise<void> { 118 - const { 119 - parameterBoolean = true, 120 - parameterEnum = 'Success', 121 - parameterModel = { 122 - prop: 'Hello World!', 123 - }, 124 - parameterNumber = 123, 125 - parameterString = 'Hello World!', 126 - } = data; 127 - return __request(OpenAPI, { 128 - method: 'POST', 129 - url: '/api/v{api-version}/defaults', 130 - query: { 131 - parameterString, 132 - parameterNumber, 133 - parameterBoolean, 134 - parameterEnum, 135 - parameterModel, 136 - }, 137 - }); 138 - } 139 - 140 - /** 141 - * @throws ApiError 142 - */ 143 - public static callToTestOrderOfParams(data: TDataCallToTestOrderOfParams): CancelablePromise<void> { 144 - const { 145 - parameterOptionalStringWithDefault = 'Hello World!', 146 - parameterOptionalStringWithEmptyDefault = '', 147 - parameterOptionalStringWithNoDefault, 148 - parameterStringNullableWithDefault = null, 149 - parameterStringNullableWithNoDefault, 150 - parameterStringWithDefault = 'Hello World!', 151 - parameterStringWithEmptyDefault = '', 152 - parameterStringWithNoDefault, 153 - } = data; 154 - return __request(OpenAPI, { 155 - method: 'PUT', 156 - url: '/api/v{api-version}/defaults', 157 - query: { 158 - parameterOptionalStringWithDefault, 159 - parameterOptionalStringWithEmptyDefault, 160 - parameterOptionalStringWithNoDefault, 161 - parameterStringWithDefault, 162 - parameterStringWithEmptyDefault, 163 - parameterStringWithNoDefault, 164 - parameterStringNullableWithNoDefault, 165 - parameterStringNullableWithDefault, 166 - }, 167 - }); 168 - } 169 - }
-28
test/__snapshots__/v3/services/DeprecatedService.ts.snap
··· 1 - import type { DeprecatedModel } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataDeprecatedCall = { 7 - /** 8 - * This parameter is deprecated 9 - */ 10 - parameter: DeprecatedModel | null; 11 - }; 12 - 13 - export class DeprecatedService { 14 - /** 15 - * @deprecated 16 - * @throws ApiError 17 - */ 18 - public static deprecatedCall(data: TDataDeprecatedCall): CancelablePromise<void> { 19 - const { parameter } = data; 20 - return __request(OpenAPI, { 21 - method: 'POST', 22 - url: '/api/v{api-version}/parameters/deprecated', 23 - headers: { 24 - parameter, 25 - }, 26 - }); 27 - } 28 - }
-61
test/__snapshots__/v3/services/DescriptionsService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataCallWithDescriptions = { 6 - /** 7 - * Testing backticks in string: `backticks` and ```multiple backticks``` should work 8 - */ 9 - parameterWithBackticks?: unknown; 10 - /** 11 - * Testing multiline comments in string: First line 12 - * Second line 13 - * 14 - * Fourth line 15 - */ 16 - parameterWithBreaks?: unknown; 17 - /** 18 - * Testing expression placeholders in string: ${expression} should work 19 - */ 20 - parameterWithExpressionPlaceholders?: unknown; 21 - /** 22 - * Testing quotes in string: 'single quote''' and "double quotes""" should work 23 - */ 24 - parameterWithQuotes?: unknown; 25 - /** 26 - * Testing reserved characters in string: * inline * and ** inline ** should work 27 - */ 28 - parameterWithReservedCharacters?: unknown; 29 - /** 30 - * Testing slashes in string: \backwards\\\ and /forwards/// should work 31 - */ 32 - parameterWithSlashes?: unknown; 33 - }; 34 - 35 - export class DescriptionsService { 36 - /** 37 - * @throws ApiError 38 - */ 39 - public static callWithDescriptions(data: TDataCallWithDescriptions = {}): CancelablePromise<void> { 40 - const { 41 - parameterWithBackticks, 42 - parameterWithBreaks, 43 - parameterWithExpressionPlaceholders, 44 - parameterWithQuotes, 45 - parameterWithReservedCharacters, 46 - parameterWithSlashes, 47 - } = data; 48 - return __request(OpenAPI, { 49 - method: 'POST', 50 - url: '/api/v{api-version}/descriptions/', 51 - query: { 52 - parameterWithBreaks, 53 - parameterWithBackticks, 54 - parameterWithSlashes, 55 - parameterWithExpressionPlaceholders, 56 - parameterWithQuotes, 57 - parameterWithReservedCharacters, 58 - }, 59 - }); 60 - } 61 - }
-45
test/__snapshots__/v3/services/DuplicateService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class DuplicateService { 6 - /** 7 - * @throws ApiError 8 - */ 9 - public static duplicateName(): CancelablePromise<void> { 10 - return __request(OpenAPI, { 11 - method: 'GET', 12 - url: '/api/v{api-version}/duplicate', 13 - }); 14 - } 15 - 16 - /** 17 - * @throws ApiError 18 - */ 19 - public static duplicateName1(): CancelablePromise<void> { 20 - return __request(OpenAPI, { 21 - method: 'POST', 22 - url: '/api/v{api-version}/duplicate', 23 - }); 24 - } 25 - 26 - /** 27 - * @throws ApiError 28 - */ 29 - public static duplicateName2(): CancelablePromise<void> { 30 - return __request(OpenAPI, { 31 - method: 'PUT', 32 - url: '/api/v{api-version}/duplicate', 33 - }); 34 - } 35 - 36 - /** 37 - * @throws ApiError 38 - */ 39 - public static duplicateName3(): CancelablePromise<void> { 40 - return __request(OpenAPI, { 41 - method: 'DELETE', 42 - url: '/api/v{api-version}/duplicate', 43 - }); 44 - } 45 - }
-33
test/__snapshots__/v3/services/ErrorService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataTestErrorCode = { 6 - /** 7 - * Status code to return 8 - */ 9 - status: number; 10 - }; 11 - 12 - export class ErrorService { 13 - /** 14 - * @returns any Custom message: Successful response 15 - * @throws ApiError 16 - */ 17 - public static testErrorCode(data: TDataTestErrorCode): CancelablePromise<any> { 18 - const { status } = data; 19 - return __request(OpenAPI, { 20 - method: 'POST', 21 - url: '/api/v{api-version}/error', 22 - query: { 23 - status, 24 - }, 25 - errors: { 26 - 500: `Custom message: Internal Server Error`, 27 - 501: `Custom message: Not Implemented`, 28 - 502: `Custom message: Bad Gateway`, 29 - 503: `Custom message: Service Unavailable`, 30 - }, 31 - }); 32 - } 33 - }
-24
test/__snapshots__/v3/services/FileResponseService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataFileResponse = { 6 - id: string; 7 - }; 8 - 9 - export class FileResponseService { 10 - /** 11 - * @returns binary Success 12 - * @throws ApiError 13 - */ 14 - public static fileResponse(data: TDataFileResponse): CancelablePromise<Blob | File> { 15 - const { id } = data; 16 - return __request(OpenAPI, { 17 - method: 'GET', 18 - url: '/api/v{api-version}/file/{id}', 19 - path: { 20 - id, 21 - }, 22 - }); 23 - } 24 - }
-33
test/__snapshots__/v3/services/FormDataService.ts.snap
··· 1 - import type { ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataPostApiFormData = { 7 - /** 8 - * A reusable request body 9 - */ 10 - formData?: ModelWithString; 11 - /** 12 - * This is a reusable parameter 13 - */ 14 - parameter?: string; 15 - }; 16 - 17 - export class FormDataService { 18 - /** 19 - * @throws ApiError 20 - */ 21 - public static postApiFormData(data: TDataPostApiFormData = {}): CancelablePromise<void> { 22 - const { formData, parameter } = data; 23 - return __request(OpenAPI, { 24 - method: 'POST', 25 - url: '/api/v{api-version}/formData/', 26 - query: { 27 - parameter, 28 - }, 29 - formData: formData, 30 - mediaType: 'multipart/form-data', 31 - }); 32 - } 33 - }
-21
test/__snapshots__/v3/services/HeaderService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class HeaderService { 6 - /** 7 - * @returns string Successful response 8 - * @throws ApiError 9 - */ 10 - public static callWithResultFromHeader(): CancelablePromise<string> { 11 - return __request(OpenAPI, { 12 - method: 'POST', 13 - url: '/api/v{api-version}/header', 14 - responseHeader: 'operation-location', 15 - errors: { 16 - 400: `400 server error`, 17 - 500: `500 server error`, 18 - }, 19 - }); 20 - } 21 - }
-43
test/__snapshots__/v3/services/MultipartService.ts.snap
··· 1 - import type { ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataMultipartRequest = { 7 - formData?: { 8 - content?: Blob | File; 9 - data?: ModelWithString | null; 10 - }; 11 - }; 12 - 13 - export class MultipartService { 14 - /** 15 - * @throws ApiError 16 - */ 17 - public static multipartRequest(data: TDataMultipartRequest = {}): CancelablePromise<void> { 18 - const { formData } = data; 19 - return __request(OpenAPI, { 20 - method: 'POST', 21 - url: '/api/v{api-version}/multipart', 22 - formData: formData, 23 - mediaType: 'multipart/form-data', 24 - }); 25 - } 26 - 27 - /** 28 - * @returns any OK 29 - * @throws ApiError 30 - */ 31 - public static multipartResponse(): CancelablePromise<{ 32 - file?: Blob | File; 33 - metadata?: { 34 - foo?: string; 35 - bar?: string; 36 - }; 37 - }> { 38 - return __request(OpenAPI, { 39 - method: 'GET', 40 - url: '/api/v{api-version}/multipart', 41 - }); 42 - } 43 - }
-27
test/__snapshots__/v3/services/MultipleTags1Service.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class MultipleTags1Service { 6 - /** 7 - * @returns void Success 8 - * @throws ApiError 9 - */ 10 - public static dummyA(): CancelablePromise<void> { 11 - return __request(OpenAPI, { 12 - method: 'GET', 13 - url: '/api/v{api-version}/multiple-tags/a', 14 - }); 15 - } 16 - 17 - /** 18 - * @returns void Success 19 - * @throws ApiError 20 - */ 21 - public static dummyB(): CancelablePromise<void> { 22 - return __request(OpenAPI, { 23 - method: 'GET', 24 - url: '/api/v{api-version}/multiple-tags/b', 25 - }); 26 - } 27 - }
-27
test/__snapshots__/v3/services/MultipleTags2Service.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class MultipleTags2Service { 6 - /** 7 - * @returns void Success 8 - * @throws ApiError 9 - */ 10 - public static dummyA(): CancelablePromise<void> { 11 - return __request(OpenAPI, { 12 - method: 'GET', 13 - url: '/api/v{api-version}/multiple-tags/a', 14 - }); 15 - } 16 - 17 - /** 18 - * @returns void Success 19 - * @throws ApiError 20 - */ 21 - public static dummyB(): CancelablePromise<void> { 22 - return __request(OpenAPI, { 23 - method: 'GET', 24 - url: '/api/v{api-version}/multiple-tags/b', 25 - }); 26 - } 27 - }
-16
test/__snapshots__/v3/services/MultipleTags3Service.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class MultipleTags3Service { 6 - /** 7 - * @returns void Success 8 - * @throws ApiError 9 - */ 10 - public static dummyB(): CancelablePromise<void> { 11 - return __request(OpenAPI, { 12 - method: 'GET', 13 - url: '/api/v{api-version}/multiple-tags/b', 14 - }); 15 - } 16 - }
-28
test/__snapshots__/v3/services/NoContentService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class NoContentService { 6 - /** 7 - * @returns void Success 8 - * @throws ApiError 9 - */ 10 - public static callWithNoContentResponse(): CancelablePromise<void> { 11 - return __request(OpenAPI, { 12 - method: 'GET', 13 - url: '/api/v{api-version}/no-content', 14 - }); 15 - } 16 - 17 - /** 18 - * @returns number Response is a simple number 19 - * @returns void Success 20 - * @throws ApiError 21 - */ 22 - public static callWithResponseAndNoContentResponse(): CancelablePromise<number | void> { 23 - return __request(OpenAPI, { 24 - method: 'GET', 25 - url: '/api/v{api-version}/multiple-tags/response-and-no-content', 26 - }); 27 - } 28 - }
-30
test/__snapshots__/v3/services/NonAsciiÆøåÆøÅöôêÊService.ts.snap
··· 1 - import type { NonAsciiStringæøåÆØÅöôêÊ字符串 } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataNonAsciiæøåÆøÅöôêÊ字符串 = { 7 - /** 8 - * Dummy input param 9 - */ 10 - nonAsciiParamæøåÆøÅöôêÊ: number; 11 - }; 12 - 13 - export class NonAsciiÆøåÆøÅöôêÊService { 14 - /** 15 - * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response 16 - * @throws ApiError 17 - */ 18 - public static nonAsciiæøåÆøÅöôêÊ字符串( 19 - data: TDataNonAsciiæøåÆøÅöôêÊ字符串 20 - ): CancelablePromise<Array<NonAsciiStringæøåÆØÅöôêÊ字符串>> { 21 - const { nonAsciiParamæøåÆøÅöôêÊ } = data; 22 - return __request(OpenAPI, { 23 - method: 'POST', 24 - url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 25 - query: { 26 - nonAsciiParamæøåÆØÅöôêÊ: nonAsciiParamæøåÆøÅöôêÊ, 27 - }, 28 - }); 29 - } 30 - }
-230
test/__snapshots__/v3/services/ParametersService.ts.snap
··· 1 - import type { ModelWithNestedArrayEnumsDataFoo, ModelWithOneOfEnum, ModelWithString, Pageable } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataDeleteFoo = { 7 - /** 8 - * bar in method 9 - */ 10 - bar: string; 11 - /** 12 - * foo in method 13 - */ 14 - foo: string; 15 - }; 16 - export type TDataCallWithParameters = { 17 - fooAllOfEnum: ModelWithNestedArrayEnumsDataFoo; 18 - fooRefEnum?: ModelWithNestedArrayEnumsDataFoo; 19 - /** 20 - * This is the parameter that goes into the cookie 21 - */ 22 - parameterCookie: string | null; 23 - /** 24 - * This is the parameter that goes into the form data 25 - */ 26 - parameterForm: string | null; 27 - /** 28 - * This is the parameter that goes into the header 29 - */ 30 - parameterHeader: string | null; 31 - /** 32 - * This is the parameter that goes into the path 33 - */ 34 - parameterPath: string | null; 35 - /** 36 - * This is the parameter that goes into the query params 37 - */ 38 - parameterQuery: string | null; 39 - /** 40 - * This is the parameter that goes into the body 41 - */ 42 - requestBody: ModelWithString | null; 43 - }; 44 - export type TDataCallWithWeirdParameterNames = { 45 - /** 46 - * This is the parameter with a reserved keyword 47 - */ 48 - _default?: string; 49 - /** 50 - * This is the parameter that goes into the cookie 51 - */ 52 - parameterCookie: string | null; 53 - /** 54 - * This is the parameter that goes into the request form data 55 - */ 56 - parameterForm: string | null; 57 - /** 58 - * This is the parameter that goes into the request header 59 - */ 60 - parameterHeader: string | null; 61 - /** 62 - * This is the parameter that goes into the path 63 - */ 64 - parameterPath1?: string; 65 - /** 66 - * This is the parameter that goes into the path 67 - */ 68 - parameterPath2?: string; 69 - /** 70 - * This is the parameter that goes into the path 71 - */ 72 - parameterPath3?: string; 73 - /** 74 - * This is the parameter that goes into the request query params 75 - */ 76 - parameterQuery: string | null; 77 - /** 78 - * This is the parameter that goes into the body 79 - */ 80 - requestBody: ModelWithString | null; 81 - }; 82 - export type TDataGetCallWithOptionalParam = { 83 - /** 84 - * This is an optional parameter 85 - */ 86 - parameter?: string; 87 - /** 88 - * This is a required parameter 89 - */ 90 - requestBody: ModelWithOneOfEnum; 91 - }; 92 - export type TDataPostCallWithOptionalParam = { 93 - /** 94 - * This is a required parameter 95 - */ 96 - parameter: Pageable; 97 - /** 98 - * This is an optional parameter 99 - */ 100 - requestBody?: ModelWithString; 101 - }; 102 - 103 - export class ParametersService { 104 - /** 105 - * @throws ApiError 106 - */ 107 - public static deleteFoo(data: TDataDeleteFoo): CancelablePromise<void> { 108 - const { bar, foo } = data; 109 - return __request(OpenAPI, { 110 - method: 'DELETE', 111 - url: '/api/v{api-version}/foo/{foo}/bar/{bar}', 112 - path: { 113 - foo, 114 - bar, 115 - }, 116 - }); 117 - } 118 - 119 - /** 120 - * @throws ApiError 121 - */ 122 - public static callWithParameters(data: TDataCallWithParameters): CancelablePromise<void> { 123 - const { 124 - fooAllOfEnum, 125 - fooRefEnum, 126 - parameterCookie, 127 - parameterForm, 128 - parameterHeader, 129 - parameterPath, 130 - parameterQuery, 131 - requestBody, 132 - } = data; 133 - return __request(OpenAPI, { 134 - method: 'POST', 135 - url: '/api/v{api-version}/parameters/{parameterPath}', 136 - path: { 137 - parameterPath, 138 - }, 139 - cookies: { 140 - parameterCookie, 141 - }, 142 - headers: { 143 - parameterHeader, 144 - }, 145 - query: { 146 - foo_ref_enum: fooRefEnum, 147 - foo_all_of_enum: fooAllOfEnum, 148 - parameterQuery, 149 - }, 150 - formData: { 151 - parameterForm, 152 - }, 153 - body: requestBody, 154 - mediaType: 'application/json', 155 - }); 156 - } 157 - 158 - /** 159 - * @throws ApiError 160 - */ 161 - public static callWithWeirdParameterNames(data: TDataCallWithWeirdParameterNames): CancelablePromise<void> { 162 - const { 163 - _default, 164 - parameterCookie, 165 - parameterForm, 166 - parameterHeader, 167 - parameterPath1, 168 - parameterPath2, 169 - parameterPath3, 170 - parameterQuery, 171 - requestBody, 172 - } = data; 173 - return __request(OpenAPI, { 174 - method: 'POST', 175 - url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', 176 - path: { 177 - 'parameter.path.1': parameterPath1, 178 - 'parameter-path-2': parameterPath2, 179 - 'PARAMETER-PATH-3': parameterPath3, 180 - }, 181 - cookies: { 182 - 'PARAMETER-COOKIE': parameterCookie, 183 - }, 184 - headers: { 185 - 'parameter.header': parameterHeader, 186 - }, 187 - query: { 188 - default: _default, 189 - 'parameter-query': parameterQuery, 190 - }, 191 - formData: { 192 - parameter_form: parameterForm, 193 - }, 194 - body: requestBody, 195 - mediaType: 'application/json', 196 - }); 197 - } 198 - 199 - /** 200 - * @throws ApiError 201 - */ 202 - public static getCallWithOptionalParam(data: TDataGetCallWithOptionalParam): CancelablePromise<void> { 203 - const { parameter, requestBody } = data; 204 - return __request(OpenAPI, { 205 - method: 'GET', 206 - url: '/api/v{api-version}/parameters/', 207 - query: { 208 - parameter, 209 - }, 210 - body: requestBody, 211 - mediaType: 'application/json', 212 - }); 213 - } 214 - 215 - /** 216 - * @throws ApiError 217 - */ 218 - public static postCallWithOptionalParam(data: TDataPostCallWithOptionalParam): CancelablePromise<void> { 219 - const { parameter, requestBody } = data; 220 - return __request(OpenAPI, { 221 - method: 'POST', 222 - url: '/api/v{api-version}/parameters/', 223 - query: { 224 - parameter, 225 - }, 226 - body: requestBody, 227 - mediaType: 'application/json', 228 - }); 229 - } 230 - }
-33
test/__snapshots__/v3/services/RequestBodyService.ts.snap
··· 1 - import type { ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataPostApiRequestBody = { 7 - /** 8 - * A reusable request body 9 - */ 10 - foo?: ModelWithString; 11 - /** 12 - * This is a reusable parameter 13 - */ 14 - parameter?: string; 15 - }; 16 - 17 - export class RequestBodyService { 18 - /** 19 - * @throws ApiError 20 - */ 21 - public static postApiRequestBody(data: TDataPostApiRequestBody = {}): CancelablePromise<void> { 22 - const { foo, parameter } = data; 23 - return __request(OpenAPI, { 24 - method: 'POST', 25 - url: '/api/v{api-version}/requestBody/', 26 - query: { 27 - parameter, 28 - }, 29 - body: foo, 30 - mediaType: 'application/json', 31 - }); 32 - } 33 - }
-73
test/__snapshots__/v3/services/ResponseService.ts.snap
··· 1 - import type { ModelThatExtends, ModelThatExtendsExtends, ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export class ResponseService { 7 - /** 8 - * @returns number Response is a simple number 9 - * @returns void Success 10 - * @throws ApiError 11 - */ 12 - public static callWithResponseAndNoContentResponse(): CancelablePromise<number | void> { 13 - return __request(OpenAPI, { 14 - method: 'GET', 15 - url: '/api/v{api-version}/multiple-tags/response-and-no-content', 16 - }); 17 - } 18 - 19 - /** 20 - * @returns ModelWithString 21 - * @throws ApiError 22 - */ 23 - public static callWithResponse(): CancelablePromise<ModelWithString> { 24 - return __request(OpenAPI, { 25 - method: 'GET', 26 - url: '/api/v{api-version}/response', 27 - }); 28 - } 29 - 30 - /** 31 - * @returns ModelWithString Message for default response 32 - * @throws ApiError 33 - */ 34 - public static callWithDuplicateResponses(): CancelablePromise<ModelWithString> { 35 - return __request(OpenAPI, { 36 - method: 'POST', 37 - url: '/api/v{api-version}/response', 38 - errors: { 39 - 500: `Message for 500 error`, 40 - 501: `Message for 501 error`, 41 - 502: `Message for 502 error`, 42 - }, 43 - }); 44 - } 45 - 46 - /** 47 - * @returns any Message for 200 response 48 - * @returns ModelWithString Message for default response 49 - * @returns ModelThatExtends Message for 201 response 50 - * @returns ModelThatExtendsExtends Message for 202 response 51 - * @throws ApiError 52 - */ 53 - public static callWithResponses(): CancelablePromise< 54 - | { 55 - readonly '@namespace.string'?: string; 56 - readonly '@namespace.integer'?: number; 57 - readonly value?: Array<ModelWithString>; 58 - } 59 - | ModelWithString 60 - | ModelThatExtends 61 - | ModelThatExtendsExtends 62 - > { 63 - return __request(OpenAPI, { 64 - method: 'PUT', 65 - url: '/api/v{api-version}/response', 66 - errors: { 67 - 500: `Message for 500 error`, 68 - 501: `Message for 501 error`, 69 - 502: `Message for 502 error`, 70 - }, 71 - }); 72 - } 73 - }
-75
test/__snapshots__/v3/services/SimpleService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class SimpleService { 6 - /** 7 - * @throws ApiError 8 - */ 9 - public static getCallWithoutParametersAndResponse(): CancelablePromise<void> { 10 - return __request(OpenAPI, { 11 - method: 'GET', 12 - url: '/api/v{api-version}/simple', 13 - }); 14 - } 15 - 16 - /** 17 - * @throws ApiError 18 - */ 19 - public static putCallWithoutParametersAndResponse(): CancelablePromise<void> { 20 - return __request(OpenAPI, { 21 - method: 'PUT', 22 - url: '/api/v{api-version}/simple', 23 - }); 24 - } 25 - 26 - /** 27 - * @throws ApiError 28 - */ 29 - public static postCallWithoutParametersAndResponse(): CancelablePromise<void> { 30 - return __request(OpenAPI, { 31 - method: 'POST', 32 - url: '/api/v{api-version}/simple', 33 - }); 34 - } 35 - 36 - /** 37 - * @throws ApiError 38 - */ 39 - public static deleteCallWithoutParametersAndResponse(): CancelablePromise<void> { 40 - return __request(OpenAPI, { 41 - method: 'DELETE', 42 - url: '/api/v{api-version}/simple', 43 - }); 44 - } 45 - 46 - /** 47 - * @throws ApiError 48 - */ 49 - public static optionsCallWithoutParametersAndResponse(): CancelablePromise<void> { 50 - return __request(OpenAPI, { 51 - method: 'OPTIONS', 52 - url: '/api/v{api-version}/simple', 53 - }); 54 - } 55 - 56 - /** 57 - * @throws ApiError 58 - */ 59 - public static headCallWithoutParametersAndResponse(): CancelablePromise<void> { 60 - return __request(OpenAPI, { 61 - method: 'HEAD', 62 - url: '/api/v{api-version}/simple', 63 - }); 64 - } 65 - 66 - /** 67 - * @throws ApiError 68 - */ 69 - public static patchCallWithoutParametersAndResponse(): CancelablePromise<void> { 70 - return __request(OpenAPI, { 71 - method: 'PATCH', 72 - url: '/api/v{api-version}/simple', 73 - }); 74 - } 75 - }
-76
test/__snapshots__/v3/services/TypesService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataTypes = { 6 - /** 7 - * This is a number parameter 8 - */ 9 - id?: number; 10 - /** 11 - * This is an array parameter 12 - */ 13 - parameterArray: Array<string> | null; 14 - /** 15 - * This is a boolean parameter 16 - */ 17 - parameterBoolean?: boolean | null; 18 - /** 19 - * This is a dictionary parameter 20 - */ 21 - parameterDictionary: Record<string, unknown> | null; 22 - /** 23 - * This is an enum parameter 24 - */ 25 - parameterEnum: 'Success' | 'Warning' | 'Error' | null; 26 - /** 27 - * This is a number parameter 28 - */ 29 - parameterNumber?: number; 30 - /** 31 - * This is an object parameter 32 - */ 33 - parameterObject?: Record<string, unknown> | null; 34 - /** 35 - * This is a string parameter 36 - */ 37 - parameterString?: string | null; 38 - }; 39 - 40 - export class TypesService { 41 - /** 42 - * @returns number Response is a simple number 43 - * @returns string Response is a simple string 44 - * @returns boolean Response is a simple boolean 45 - * @returns unknown Response is a simple object 46 - * @throws ApiError 47 - */ 48 - public static types(data: TDataTypes): CancelablePromise<number | string | boolean | Record<string, unknown>> { 49 - const { 50 - id, 51 - parameterArray, 52 - parameterBoolean = true, 53 - parameterDictionary, 54 - parameterEnum, 55 - parameterNumber = 123, 56 - parameterObject = null, 57 - parameterString = 'default', 58 - } = data; 59 - return __request(OpenAPI, { 60 - method: 'GET', 61 - url: '/api/v{api-version}/types', 62 - path: { 63 - id, 64 - }, 65 - query: { 66 - parameterNumber, 67 - parameterString, 68 - parameterBoolean, 69 - parameterObject, 70 - parameterArray, 71 - parameterDictionary, 72 - parameterEnum, 73 - }, 74 - }); 75 - } 76 - }
-27
test/__snapshots__/v3/services/UploadService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataUploadFile = { 6 - /** 7 - * Supply a file reference for upload 8 - */ 9 - file: Blob | File; 10 - }; 11 - 12 - export class UploadService { 13 - /** 14 - * @returns boolean 15 - * @throws ApiError 16 - */ 17 - public static uploadFile(data: TDataUploadFile): CancelablePromise<boolean> { 18 - const { file } = data; 19 - return __request(OpenAPI, { 20 - method: 'POST', 21 - url: '/api/v{api-version}/upload', 22 - formData: { 23 - file, 24 - }, 25 - }); 26 - } 27 - }
-23
test/__snapshots__/v3/services/index.ts.snap
··· 1 - export { CollectionFormatService } from './CollectionFormatService'; 2 - export { ComplexService } from './ComplexService'; 3 - export { DefaultService } from './DefaultService'; 4 - export { DefaultsService } from './DefaultsService'; 5 - export { DeprecatedService } from './DeprecatedService'; 6 - export { DescriptionsService } from './DescriptionsService'; 7 - export { DuplicateService } from './DuplicateService'; 8 - export { ErrorService } from './ErrorService'; 9 - export { FileResponseService } from './FileResponseService'; 10 - export { FormDataService } from './FormDataService'; 11 - export { HeaderService } from './HeaderService'; 12 - export { MultipartService } from './MultipartService'; 13 - export { MultipleTags1Service } from './MultipleTags1Service'; 14 - export { MultipleTags2Service } from './MultipleTags2Service'; 15 - export { MultipleTags3Service } from './MultipleTags3Service'; 16 - export { NoContentService } from './NoContentService'; 17 - export { NonAsciiÆøåÆøÅöôêÊService } from './NonAsciiÆøåÆøÅöôêÊService'; 18 - export { ParametersService } from './ParametersService'; 19 - export { RequestBodyService } from './RequestBodyService'; 20 - export { ResponseService } from './ResponseService'; 21 - export { SimpleService } from './SimpleService'; 22 - export { TypesService } from './TypesService'; 23 - export { UploadService } from './UploadService';
+1311
test/__snapshots__/v3_angular/services.ts.snap
··· 1 + import { Injectable } from '@angular/core'; 2 + import { HttpClient } from '@angular/common/http'; 3 + import type { Observable } from 'rxjs'; 4 + import { OpenAPI } from './core/OpenAPI'; 5 + import { request as __request } from './core/request'; 6 + 7 + import type { 8 + ModelWithArrayReadOnlyAndWriteOnly, 9 + ModelWithReadOnlyAndWriteOnly, 10 + ModelWithNestedArrayEnumsDataFoo, 11 + ModelWithOneOfEnum, 12 + ModelWithString, 13 + Pageable, 14 + DeprecatedModel, 15 + ModelThatExtends, 16 + ModelThatExtendsExtends, 17 + ModelWithArray, 18 + ModelWithDictionary, 19 + ModelWithEnum, 20 + NonAsciiStringæøåÆØÅöôêÊ字符串, 21 + } from './models'; 22 + 23 + export type TDataPostServiceWithEmptyTag = { 24 + requestBody: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 25 + }; 26 + 27 + @Injectable({ 28 + providedIn: 'root', 29 + }) 30 + export class DefaultService { 31 + constructor(public readonly http: HttpClient) {} 32 + 33 + /** 34 + * @throws ApiError 35 + */ 36 + public serviceWithEmptyTag(): Observable<void> { 37 + return __request(OpenAPI, this.http, { 38 + method: 'GET', 39 + url: '/api/v{api-version}/no-tag', 40 + }); 41 + } 42 + 43 + /** 44 + * @returns ModelWithReadOnlyAndWriteOnly 45 + * @throws ApiError 46 + */ 47 + public postServiceWithEmptyTag(data: TDataPostServiceWithEmptyTag): Observable<ModelWithReadOnlyAndWriteOnly> { 48 + const { requestBody } = data; 49 + return __request(OpenAPI, this.http, { 50 + method: 'POST', 51 + url: '/api/v{api-version}/no-tag', 52 + body: requestBody, 53 + mediaType: 'application/json', 54 + }); 55 + } 56 + } 57 + 58 + @Injectable({ 59 + providedIn: 'root', 60 + }) 61 + export class SimpleService { 62 + constructor(public readonly http: HttpClient) {} 63 + 64 + /** 65 + * @throws ApiError 66 + */ 67 + public getCallWithoutParametersAndResponse(): Observable<void> { 68 + return __request(OpenAPI, this.http, { 69 + method: 'GET', 70 + url: '/api/v{api-version}/simple', 71 + }); 72 + } 73 + 74 + /** 75 + * @throws ApiError 76 + */ 77 + public putCallWithoutParametersAndResponse(): Observable<void> { 78 + return __request(OpenAPI, this.http, { 79 + method: 'PUT', 80 + url: '/api/v{api-version}/simple', 81 + }); 82 + } 83 + 84 + /** 85 + * @throws ApiError 86 + */ 87 + public postCallWithoutParametersAndResponse(): Observable<void> { 88 + return __request(OpenAPI, this.http, { 89 + method: 'POST', 90 + url: '/api/v{api-version}/simple', 91 + }); 92 + } 93 + 94 + /** 95 + * @throws ApiError 96 + */ 97 + public deleteCallWithoutParametersAndResponse(): Observable<void> { 98 + return __request(OpenAPI, this.http, { 99 + method: 'DELETE', 100 + url: '/api/v{api-version}/simple', 101 + }); 102 + } 103 + 104 + /** 105 + * @throws ApiError 106 + */ 107 + public optionsCallWithoutParametersAndResponse(): Observable<void> { 108 + return __request(OpenAPI, this.http, { 109 + method: 'OPTIONS', 110 + url: '/api/v{api-version}/simple', 111 + }); 112 + } 113 + 114 + /** 115 + * @throws ApiError 116 + */ 117 + public headCallWithoutParametersAndResponse(): Observable<void> { 118 + return __request(OpenAPI, this.http, { 119 + method: 'HEAD', 120 + url: '/api/v{api-version}/simple', 121 + }); 122 + } 123 + 124 + /** 125 + * @throws ApiError 126 + */ 127 + public patchCallWithoutParametersAndResponse(): Observable<void> { 128 + return __request(OpenAPI, this.http, { 129 + method: 'PATCH', 130 + url: '/api/v{api-version}/simple', 131 + }); 132 + } 133 + } 134 + 135 + export type TDataDeleteFoo = { 136 + /** 137 + * bar in method 138 + */ 139 + bar: string; 140 + /** 141 + * foo in method 142 + */ 143 + foo: string; 144 + }; 145 + export type TDataCallWithParameters = { 146 + fooAllOfEnum: ModelWithNestedArrayEnumsDataFoo; 147 + fooRefEnum?: ModelWithNestedArrayEnumsDataFoo; 148 + /** 149 + * This is the parameter that goes into the cookie 150 + */ 151 + parameterCookie: string | null; 152 + /** 153 + * This is the parameter that goes into the form data 154 + */ 155 + parameterForm: string | null; 156 + /** 157 + * This is the parameter that goes into the header 158 + */ 159 + parameterHeader: string | null; 160 + /** 161 + * This is the parameter that goes into the path 162 + */ 163 + parameterPath: string | null; 164 + /** 165 + * This is the parameter that goes into the query params 166 + */ 167 + parameterQuery: string | null; 168 + /** 169 + * This is the parameter that goes into the body 170 + */ 171 + requestBody: ModelWithString | null; 172 + }; 173 + export type TDataCallWithWeirdParameterNames = { 174 + /** 175 + * This is the parameter with a reserved keyword 176 + */ 177 + _default?: string; 178 + /** 179 + * This is the parameter that goes into the cookie 180 + */ 181 + parameterCookie: string | null; 182 + /** 183 + * This is the parameter that goes into the request form data 184 + */ 185 + parameterForm: string | null; 186 + /** 187 + * This is the parameter that goes into the request header 188 + */ 189 + parameterHeader: string | null; 190 + /** 191 + * This is the parameter that goes into the path 192 + */ 193 + parameterPath1?: string; 194 + /** 195 + * This is the parameter that goes into the path 196 + */ 197 + parameterPath2?: string; 198 + /** 199 + * This is the parameter that goes into the path 200 + */ 201 + parameterPath3?: string; 202 + /** 203 + * This is the parameter that goes into the request query params 204 + */ 205 + parameterQuery: string | null; 206 + /** 207 + * This is the parameter that goes into the body 208 + */ 209 + requestBody: ModelWithString | null; 210 + }; 211 + export type TDataGetCallWithOptionalParam = { 212 + /** 213 + * This is an optional parameter 214 + */ 215 + parameter?: string; 216 + /** 217 + * This is a required parameter 218 + */ 219 + requestBody: ModelWithOneOfEnum; 220 + }; 221 + export type TDataPostCallWithOptionalParam = { 222 + /** 223 + * This is a required parameter 224 + */ 225 + parameter: Pageable; 226 + /** 227 + * This is an optional parameter 228 + */ 229 + requestBody?: ModelWithString; 230 + }; 231 + 232 + @Injectable({ 233 + providedIn: 'root', 234 + }) 235 + export class ParametersService { 236 + constructor(public readonly http: HttpClient) {} 237 + 238 + /** 239 + * @throws ApiError 240 + */ 241 + public deleteFoo(data: TDataDeleteFoo): Observable<void> { 242 + const { bar, foo } = data; 243 + return __request(OpenAPI, this.http, { 244 + method: 'DELETE', 245 + url: '/api/v{api-version}/foo/{foo}/bar/{bar}', 246 + path: { 247 + foo, 248 + bar, 249 + }, 250 + }); 251 + } 252 + 253 + /** 254 + * @throws ApiError 255 + */ 256 + public callWithParameters(data: TDataCallWithParameters): Observable<void> { 257 + const { 258 + fooAllOfEnum, 259 + fooRefEnum, 260 + parameterCookie, 261 + parameterForm, 262 + parameterHeader, 263 + parameterPath, 264 + parameterQuery, 265 + requestBody, 266 + } = data; 267 + return __request(OpenAPI, this.http, { 268 + method: 'POST', 269 + url: '/api/v{api-version}/parameters/{parameterPath}', 270 + path: { 271 + parameterPath, 272 + }, 273 + cookies: { 274 + parameterCookie, 275 + }, 276 + headers: { 277 + parameterHeader, 278 + }, 279 + query: { 280 + foo_ref_enum: fooRefEnum, 281 + foo_all_of_enum: fooAllOfEnum, 282 + parameterQuery, 283 + }, 284 + formData: { 285 + parameterForm, 286 + }, 287 + body: requestBody, 288 + mediaType: 'application/json', 289 + }); 290 + } 291 + 292 + /** 293 + * @throws ApiError 294 + */ 295 + public callWithWeirdParameterNames(data: TDataCallWithWeirdParameterNames): Observable<void> { 296 + const { 297 + _default, 298 + parameterCookie, 299 + parameterForm, 300 + parameterHeader, 301 + parameterPath1, 302 + parameterPath2, 303 + parameterPath3, 304 + parameterQuery, 305 + requestBody, 306 + } = data; 307 + return __request(OpenAPI, this.http, { 308 + method: 'POST', 309 + url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', 310 + path: { 311 + 'parameter.path.1': parameterPath1, 312 + 'parameter-path-2': parameterPath2, 313 + 'PARAMETER-PATH-3': parameterPath3, 314 + }, 315 + cookies: { 316 + 'PARAMETER-COOKIE': parameterCookie, 317 + }, 318 + headers: { 319 + 'parameter.header': parameterHeader, 320 + }, 321 + query: { 322 + default: _default, 323 + 'parameter-query': parameterQuery, 324 + }, 325 + formData: { 326 + parameter_form: parameterForm, 327 + }, 328 + body: requestBody, 329 + mediaType: 'application/json', 330 + }); 331 + } 332 + 333 + /** 334 + * @throws ApiError 335 + */ 336 + public getCallWithOptionalParam(data: TDataGetCallWithOptionalParam): Observable<void> { 337 + const { parameter, requestBody } = data; 338 + return __request(OpenAPI, this.http, { 339 + method: 'GET', 340 + url: '/api/v{api-version}/parameters/', 341 + query: { 342 + parameter, 343 + }, 344 + body: requestBody, 345 + mediaType: 'application/json', 346 + }); 347 + } 348 + 349 + /** 350 + * @throws ApiError 351 + */ 352 + public postCallWithOptionalParam(data: TDataPostCallWithOptionalParam): Observable<void> { 353 + const { parameter, requestBody } = data; 354 + return __request(OpenAPI, this.http, { 355 + method: 'POST', 356 + url: '/api/v{api-version}/parameters/', 357 + query: { 358 + parameter, 359 + }, 360 + body: requestBody, 361 + mediaType: 'application/json', 362 + }); 363 + } 364 + } 365 + 366 + export type TDataCallWithDescriptions = { 367 + /** 368 + * Testing backticks in string: `backticks` and ```multiple backticks``` should work 369 + */ 370 + parameterWithBackticks?: unknown; 371 + /** 372 + * Testing multiline comments in string: First line 373 + * Second line 374 + * 375 + * Fourth line 376 + */ 377 + parameterWithBreaks?: unknown; 378 + /** 379 + * Testing expression placeholders in string: ${expression} should work 380 + */ 381 + parameterWithExpressionPlaceholders?: unknown; 382 + /** 383 + * Testing quotes in string: 'single quote''' and "double quotes""" should work 384 + */ 385 + parameterWithQuotes?: unknown; 386 + /** 387 + * Testing reserved characters in string: * inline * and ** inline ** should work 388 + */ 389 + parameterWithReservedCharacters?: unknown; 390 + /** 391 + * Testing slashes in string: \backwards\\\ and /forwards/// should work 392 + */ 393 + parameterWithSlashes?: unknown; 394 + }; 395 + 396 + @Injectable({ 397 + providedIn: 'root', 398 + }) 399 + export class DescriptionsService { 400 + constructor(public readonly http: HttpClient) {} 401 + 402 + /** 403 + * @throws ApiError 404 + */ 405 + public callWithDescriptions(data: TDataCallWithDescriptions = {}): Observable<void> { 406 + const { 407 + parameterWithBackticks, 408 + parameterWithBreaks, 409 + parameterWithExpressionPlaceholders, 410 + parameterWithQuotes, 411 + parameterWithReservedCharacters, 412 + parameterWithSlashes, 413 + } = data; 414 + return __request(OpenAPI, this.http, { 415 + method: 'POST', 416 + url: '/api/v{api-version}/descriptions/', 417 + query: { 418 + parameterWithBreaks, 419 + parameterWithBackticks, 420 + parameterWithSlashes, 421 + parameterWithExpressionPlaceholders, 422 + parameterWithQuotes, 423 + parameterWithReservedCharacters, 424 + }, 425 + }); 426 + } 427 + } 428 + 429 + export type TDataDeprecatedCall = { 430 + /** 431 + * This parameter is deprecated 432 + */ 433 + parameter: DeprecatedModel | null; 434 + }; 435 + 436 + @Injectable({ 437 + providedIn: 'root', 438 + }) 439 + export class DeprecatedService { 440 + constructor(public readonly http: HttpClient) {} 441 + 442 + /** 443 + * @deprecated 444 + * @throws ApiError 445 + */ 446 + public deprecatedCall(data: TDataDeprecatedCall): Observable<void> { 447 + const { parameter } = data; 448 + return __request(OpenAPI, this.http, { 449 + method: 'POST', 450 + url: '/api/v{api-version}/parameters/deprecated', 451 + headers: { 452 + parameter, 453 + }, 454 + }); 455 + } 456 + } 457 + 458 + export type TDataPostApiRequestBody = { 459 + /** 460 + * A reusable request body 461 + */ 462 + foo?: ModelWithString; 463 + /** 464 + * This is a reusable parameter 465 + */ 466 + parameter?: string; 467 + }; 468 + 469 + @Injectable({ 470 + providedIn: 'root', 471 + }) 472 + export class RequestBodyService { 473 + constructor(public readonly http: HttpClient) {} 474 + 475 + /** 476 + * @throws ApiError 477 + */ 478 + public postApiRequestBody(data: TDataPostApiRequestBody = {}): Observable<void> { 479 + const { foo, parameter } = data; 480 + return __request(OpenAPI, this.http, { 481 + method: 'POST', 482 + url: '/api/v{api-version}/requestBody/', 483 + query: { 484 + parameter, 485 + }, 486 + body: foo, 487 + mediaType: 'application/json', 488 + }); 489 + } 490 + } 491 + 492 + export type TDataPostApiFormData = { 493 + /** 494 + * A reusable request body 495 + */ 496 + formData?: ModelWithString; 497 + /** 498 + * This is a reusable parameter 499 + */ 500 + parameter?: string; 501 + }; 502 + 503 + @Injectable({ 504 + providedIn: 'root', 505 + }) 506 + export class FormDataService { 507 + constructor(public readonly http: HttpClient) {} 508 + 509 + /** 510 + * @throws ApiError 511 + */ 512 + public postApiFormData(data: TDataPostApiFormData = {}): Observable<void> { 513 + const { formData, parameter } = data; 514 + return __request(OpenAPI, this.http, { 515 + method: 'POST', 516 + url: '/api/v{api-version}/formData/', 517 + query: { 518 + parameter, 519 + }, 520 + formData: formData, 521 + mediaType: 'multipart/form-data', 522 + }); 523 + } 524 + } 525 + 526 + export type TDataCallWithDefaultParameters = { 527 + /** 528 + * This is a simple boolean with default value 529 + */ 530 + parameterBoolean?: boolean | null; 531 + /** 532 + * This is a simple enum with default value 533 + */ 534 + parameterEnum?: 'Success' | 'Warning' | 'Error'; 535 + /** 536 + * This is a simple model with default value 537 + */ 538 + parameterModel?: ModelWithString | null; 539 + /** 540 + * This is a simple number with default value 541 + */ 542 + parameterNumber?: number | null; 543 + /** 544 + * This is a simple string with default value 545 + */ 546 + parameterString?: string | null; 547 + }; 548 + export type TDataCallWithDefaultOptionalParameters = { 549 + /** 550 + * This is a simple boolean that is optional with default value 551 + */ 552 + parameterBoolean?: boolean; 553 + /** 554 + * This is a simple enum that is optional with default value 555 + */ 556 + parameterEnum?: 'Success' | 'Warning' | 'Error'; 557 + /** 558 + * This is a simple model that is optional with default value 559 + */ 560 + parameterModel?: ModelWithString; 561 + /** 562 + * This is a simple number that is optional with default value 563 + */ 564 + parameterNumber?: number; 565 + /** 566 + * This is a simple string that is optional with default value 567 + */ 568 + parameterString?: string; 569 + }; 570 + export type TDataCallToTestOrderOfParams = { 571 + /** 572 + * This is a optional string with default 573 + */ 574 + parameterOptionalStringWithDefault?: string; 575 + /** 576 + * This is a optional string with empty default 577 + */ 578 + parameterOptionalStringWithEmptyDefault?: string; 579 + /** 580 + * This is a optional string with no default 581 + */ 582 + parameterOptionalStringWithNoDefault?: string; 583 + /** 584 + * This is a string that can be null with default 585 + */ 586 + parameterStringNullableWithDefault?: string | null; 587 + /** 588 + * This is a string that can be null with no default 589 + */ 590 + parameterStringNullableWithNoDefault?: string | null; 591 + /** 592 + * This is a string with default 593 + */ 594 + parameterStringWithDefault?: string; 595 + /** 596 + * This is a string with empty default 597 + */ 598 + parameterStringWithEmptyDefault?: string; 599 + /** 600 + * This is a string with no default 601 + */ 602 + parameterStringWithNoDefault: string; 603 + }; 604 + 605 + @Injectable({ 606 + providedIn: 'root', 607 + }) 608 + export class DefaultsService { 609 + constructor(public readonly http: HttpClient) {} 610 + 611 + /** 612 + * @throws ApiError 613 + */ 614 + public callWithDefaultParameters(data: TDataCallWithDefaultParameters = {}): Observable<void> { 615 + const { 616 + parameterBoolean = true, 617 + parameterEnum = 'Success', 618 + parameterModel = { 619 + prop: 'Hello World!', 620 + }, 621 + parameterNumber = 123, 622 + parameterString = 'Hello World!', 623 + } = data; 624 + return __request(OpenAPI, this.http, { 625 + method: 'GET', 626 + url: '/api/v{api-version}/defaults', 627 + query: { 628 + parameterString, 629 + parameterNumber, 630 + parameterBoolean, 631 + parameterEnum, 632 + parameterModel, 633 + }, 634 + }); 635 + } 636 + 637 + /** 638 + * @throws ApiError 639 + */ 640 + public callWithDefaultOptionalParameters(data: TDataCallWithDefaultOptionalParameters = {}): Observable<void> { 641 + const { 642 + parameterBoolean = true, 643 + parameterEnum = 'Success', 644 + parameterModel = { 645 + prop: 'Hello World!', 646 + }, 647 + parameterNumber = 123, 648 + parameterString = 'Hello World!', 649 + } = data; 650 + return __request(OpenAPI, this.http, { 651 + method: 'POST', 652 + url: '/api/v{api-version}/defaults', 653 + query: { 654 + parameterString, 655 + parameterNumber, 656 + parameterBoolean, 657 + parameterEnum, 658 + parameterModel, 659 + }, 660 + }); 661 + } 662 + 663 + /** 664 + * @throws ApiError 665 + */ 666 + public callToTestOrderOfParams(data: TDataCallToTestOrderOfParams): Observable<void> { 667 + const { 668 + parameterOptionalStringWithDefault = 'Hello World!', 669 + parameterOptionalStringWithEmptyDefault = '', 670 + parameterOptionalStringWithNoDefault, 671 + parameterStringNullableWithDefault = null, 672 + parameterStringNullableWithNoDefault, 673 + parameterStringWithDefault = 'Hello World!', 674 + parameterStringWithEmptyDefault = '', 675 + parameterStringWithNoDefault, 676 + } = data; 677 + return __request(OpenAPI, this.http, { 678 + method: 'PUT', 679 + url: '/api/v{api-version}/defaults', 680 + query: { 681 + parameterOptionalStringWithDefault, 682 + parameterOptionalStringWithEmptyDefault, 683 + parameterOptionalStringWithNoDefault, 684 + parameterStringWithDefault, 685 + parameterStringWithEmptyDefault, 686 + parameterStringWithNoDefault, 687 + parameterStringNullableWithNoDefault, 688 + parameterStringNullableWithDefault, 689 + }, 690 + }); 691 + } 692 + } 693 + 694 + @Injectable({ 695 + providedIn: 'root', 696 + }) 697 + export class DuplicateService { 698 + constructor(public readonly http: HttpClient) {} 699 + 700 + /** 701 + * @throws ApiError 702 + */ 703 + public duplicateName(): Observable<void> { 704 + return __request(OpenAPI, this.http, { 705 + method: 'GET', 706 + url: '/api/v{api-version}/duplicate', 707 + }); 708 + } 709 + 710 + /** 711 + * @throws ApiError 712 + */ 713 + public duplicateName1(): Observable<void> { 714 + return __request(OpenAPI, this.http, { 715 + method: 'POST', 716 + url: '/api/v{api-version}/duplicate', 717 + }); 718 + } 719 + 720 + /** 721 + * @throws ApiError 722 + */ 723 + public duplicateName2(): Observable<void> { 724 + return __request(OpenAPI, this.http, { 725 + method: 'PUT', 726 + url: '/api/v{api-version}/duplicate', 727 + }); 728 + } 729 + 730 + /** 731 + * @throws ApiError 732 + */ 733 + public duplicateName3(): Observable<void> { 734 + return __request(OpenAPI, this.http, { 735 + method: 'DELETE', 736 + url: '/api/v{api-version}/duplicate', 737 + }); 738 + } 739 + } 740 + 741 + @Injectable({ 742 + providedIn: 'root', 743 + }) 744 + export class NoContentService { 745 + constructor(public readonly http: HttpClient) {} 746 + 747 + /** 748 + * @returns void Success 749 + * @throws ApiError 750 + */ 751 + public callWithNoContentResponse(): Observable<void> { 752 + return __request(OpenAPI, this.http, { 753 + method: 'GET', 754 + url: '/api/v{api-version}/no-content', 755 + }); 756 + } 757 + 758 + /** 759 + * @returns number Response is a simple number 760 + * @returns void Success 761 + * @throws ApiError 762 + */ 763 + public callWithResponseAndNoContentResponse(): Observable<number | void> { 764 + return __request(OpenAPI, this.http, { 765 + method: 'GET', 766 + url: '/api/v{api-version}/multiple-tags/response-and-no-content', 767 + }); 768 + } 769 + } 770 + 771 + @Injectable({ 772 + providedIn: 'root', 773 + }) 774 + export class ResponseService { 775 + constructor(public readonly http: HttpClient) {} 776 + 777 + /** 778 + * @returns number Response is a simple number 779 + * @returns void Success 780 + * @throws ApiError 781 + */ 782 + public callWithResponseAndNoContentResponse(): Observable<number | void> { 783 + return __request(OpenAPI, this.http, { 784 + method: 'GET', 785 + url: '/api/v{api-version}/multiple-tags/response-and-no-content', 786 + }); 787 + } 788 + 789 + /** 790 + * @returns ModelWithString 791 + * @throws ApiError 792 + */ 793 + public callWithResponse(): Observable<ModelWithString> { 794 + return __request(OpenAPI, this.http, { 795 + method: 'GET', 796 + url: '/api/v{api-version}/response', 797 + }); 798 + } 799 + 800 + /** 801 + * @returns ModelWithString Message for default response 802 + * @throws ApiError 803 + */ 804 + public callWithDuplicateResponses(): Observable<ModelWithString> { 805 + return __request(OpenAPI, this.http, { 806 + method: 'POST', 807 + url: '/api/v{api-version}/response', 808 + errors: { 809 + 500: `Message for 500 error`, 810 + 501: `Message for 501 error`, 811 + 502: `Message for 502 error`, 812 + }, 813 + }); 814 + } 815 + 816 + /** 817 + * @returns any Message for 200 response 818 + * @returns ModelWithString Message for default response 819 + * @returns ModelThatExtends Message for 201 response 820 + * @returns ModelThatExtendsExtends Message for 202 response 821 + * @throws ApiError 822 + */ 823 + public callWithResponses(): Observable< 824 + | { 825 + readonly '@namespace.string'?: string; 826 + readonly '@namespace.integer'?: number; 827 + readonly value?: Array<ModelWithString>; 828 + } 829 + | ModelWithString 830 + | ModelThatExtends 831 + | ModelThatExtendsExtends 832 + > { 833 + return __request(OpenAPI, this.http, { 834 + method: 'PUT', 835 + url: '/api/v{api-version}/response', 836 + errors: { 837 + 500: `Message for 500 error`, 838 + 501: `Message for 501 error`, 839 + 502: `Message for 502 error`, 840 + }, 841 + }); 842 + } 843 + } 844 + 845 + @Injectable({ 846 + providedIn: 'root', 847 + }) 848 + export class MultipleTags1Service { 849 + constructor(public readonly http: HttpClient) {} 850 + 851 + /** 852 + * @returns void Success 853 + * @throws ApiError 854 + */ 855 + public dummyA(): Observable<void> { 856 + return __request(OpenAPI, this.http, { 857 + method: 'GET', 858 + url: '/api/v{api-version}/multiple-tags/a', 859 + }); 860 + } 861 + 862 + /** 863 + * @returns void Success 864 + * @throws ApiError 865 + */ 866 + public dummyB(): Observable<void> { 867 + return __request(OpenAPI, this.http, { 868 + method: 'GET', 869 + url: '/api/v{api-version}/multiple-tags/b', 870 + }); 871 + } 872 + } 873 + 874 + @Injectable({ 875 + providedIn: 'root', 876 + }) 877 + export class MultipleTags2Service { 878 + constructor(public readonly http: HttpClient) {} 879 + 880 + /** 881 + * @returns void Success 882 + * @throws ApiError 883 + */ 884 + public dummyA(): Observable<void> { 885 + return __request(OpenAPI, this.http, { 886 + method: 'GET', 887 + url: '/api/v{api-version}/multiple-tags/a', 888 + }); 889 + } 890 + 891 + /** 892 + * @returns void Success 893 + * @throws ApiError 894 + */ 895 + public dummyB(): Observable<void> { 896 + return __request(OpenAPI, this.http, { 897 + method: 'GET', 898 + url: '/api/v{api-version}/multiple-tags/b', 899 + }); 900 + } 901 + } 902 + 903 + @Injectable({ 904 + providedIn: 'root', 905 + }) 906 + export class MultipleTags3Service { 907 + constructor(public readonly http: HttpClient) {} 908 + 909 + /** 910 + * @returns void Success 911 + * @throws ApiError 912 + */ 913 + public dummyB(): Observable<void> { 914 + return __request(OpenAPI, this.http, { 915 + method: 'GET', 916 + url: '/api/v{api-version}/multiple-tags/b', 917 + }); 918 + } 919 + } 920 + 921 + export type TDataCollectionFormat = { 922 + /** 923 + * This is an array parameter that is sent as csv format (comma-separated values) 924 + */ 925 + parameterArrayCsv: Array<string> | null; 926 + /** 927 + * This is an array parameter that is sent as multi format (multiple parameter instances) 928 + */ 929 + parameterArrayMulti: Array<string> | null; 930 + /** 931 + * This is an array parameter that is sent as pipes format (pipe-separated values) 932 + */ 933 + parameterArrayPipes: Array<string> | null; 934 + /** 935 + * This is an array parameter that is sent as ssv format (space-separated values) 936 + */ 937 + parameterArraySsv: Array<string> | null; 938 + /** 939 + * This is an array parameter that is sent as tsv format (tab-separated values) 940 + */ 941 + parameterArrayTsv: Array<string> | null; 942 + }; 943 + 944 + @Injectable({ 945 + providedIn: 'root', 946 + }) 947 + export class CollectionFormatService { 948 + constructor(public readonly http: HttpClient) {} 949 + 950 + /** 951 + * @throws ApiError 952 + */ 953 + public collectionFormat(data: TDataCollectionFormat): Observable<void> { 954 + const { parameterArrayCsv, parameterArrayMulti, parameterArrayPipes, parameterArraySsv, parameterArrayTsv } = 955 + data; 956 + return __request(OpenAPI, this.http, { 957 + method: 'GET', 958 + url: '/api/v{api-version}/collectionFormat', 959 + query: { 960 + parameterArrayCSV: parameterArrayCsv, 961 + parameterArraySSV: parameterArraySsv, 962 + parameterArrayTSV: parameterArrayTsv, 963 + parameterArrayPipes, 964 + parameterArrayMulti, 965 + }, 966 + }); 967 + } 968 + } 969 + 970 + export type TDataTypes = { 971 + /** 972 + * This is a number parameter 973 + */ 974 + id?: number; 975 + /** 976 + * This is an array parameter 977 + */ 978 + parameterArray: Array<string> | null; 979 + /** 980 + * This is a boolean parameter 981 + */ 982 + parameterBoolean?: boolean | null; 983 + /** 984 + * This is a dictionary parameter 985 + */ 986 + parameterDictionary: Record<string, unknown> | null; 987 + /** 988 + * This is an enum parameter 989 + */ 990 + parameterEnum: 'Success' | 'Warning' | 'Error' | null; 991 + /** 992 + * This is a number parameter 993 + */ 994 + parameterNumber?: number; 995 + /** 996 + * This is an object parameter 997 + */ 998 + parameterObject?: Record<string, unknown> | null; 999 + /** 1000 + * This is a string parameter 1001 + */ 1002 + parameterString?: string | null; 1003 + }; 1004 + 1005 + @Injectable({ 1006 + providedIn: 'root', 1007 + }) 1008 + export class TypesService { 1009 + constructor(public readonly http: HttpClient) {} 1010 + 1011 + /** 1012 + * @returns number Response is a simple number 1013 + * @returns string Response is a simple string 1014 + * @returns boolean Response is a simple boolean 1015 + * @returns unknown Response is a simple object 1016 + * @throws ApiError 1017 + */ 1018 + public types(data: TDataTypes): Observable<number | string | boolean | Record<string, unknown>> { 1019 + const { 1020 + id, 1021 + parameterArray, 1022 + parameterBoolean = true, 1023 + parameterDictionary, 1024 + parameterEnum, 1025 + parameterNumber = 123, 1026 + parameterObject = null, 1027 + parameterString = 'default', 1028 + } = data; 1029 + return __request(OpenAPI, this.http, { 1030 + method: 'GET', 1031 + url: '/api/v{api-version}/types', 1032 + path: { 1033 + id, 1034 + }, 1035 + query: { 1036 + parameterNumber, 1037 + parameterString, 1038 + parameterBoolean, 1039 + parameterObject, 1040 + parameterArray, 1041 + parameterDictionary, 1042 + parameterEnum, 1043 + }, 1044 + }); 1045 + } 1046 + } 1047 + 1048 + export type TDataUploadFile = { 1049 + /** 1050 + * Supply a file reference for upload 1051 + */ 1052 + file: Blob | File; 1053 + }; 1054 + 1055 + @Injectable({ 1056 + providedIn: 'root', 1057 + }) 1058 + export class UploadService { 1059 + constructor(public readonly http: HttpClient) {} 1060 + 1061 + /** 1062 + * @returns boolean 1063 + * @throws ApiError 1064 + */ 1065 + public uploadFile(data: TDataUploadFile): Observable<boolean> { 1066 + const { file } = data; 1067 + return __request(OpenAPI, this.http, { 1068 + method: 'POST', 1069 + url: '/api/v{api-version}/upload', 1070 + formData: { 1071 + file, 1072 + }, 1073 + }); 1074 + } 1075 + } 1076 + 1077 + export type TDataFileResponse = { 1078 + id: string; 1079 + }; 1080 + 1081 + @Injectable({ 1082 + providedIn: 'root', 1083 + }) 1084 + export class FileResponseService { 1085 + constructor(public readonly http: HttpClient) {} 1086 + 1087 + /** 1088 + * @returns binary Success 1089 + * @throws ApiError 1090 + */ 1091 + public fileResponse(data: TDataFileResponse): Observable<Blob | File> { 1092 + const { id } = data; 1093 + return __request(OpenAPI, this.http, { 1094 + method: 'GET', 1095 + url: '/api/v{api-version}/file/{id}', 1096 + path: { 1097 + id, 1098 + }, 1099 + }); 1100 + } 1101 + } 1102 + 1103 + export type TDataComplexTypes = { 1104 + /** 1105 + * Parameter containing object 1106 + */ 1107 + parameterObject: { 1108 + first?: { 1109 + second?: { 1110 + third?: string; 1111 + }; 1112 + }; 1113 + }; 1114 + /** 1115 + * Parameter containing reference 1116 + */ 1117 + parameterReference: ModelWithString; 1118 + }; 1119 + export type TDataComplexParams = { 1120 + id: number; 1121 + requestBody?: { 1122 + readonly key: string | null; 1123 + name: string | null; 1124 + enabled?: boolean; 1125 + readonly type: 'Monkey' | 'Horse' | 'Bird'; 1126 + listOfModels?: Array<ModelWithString> | null; 1127 + listOfStrings?: Array<string> | null; 1128 + parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; 1129 + readonly user?: { 1130 + readonly id?: number; 1131 + readonly name?: string | null; 1132 + }; 1133 + }; 1134 + }; 1135 + 1136 + @Injectable({ 1137 + providedIn: 'root', 1138 + }) 1139 + export class ComplexService { 1140 + constructor(public readonly http: HttpClient) {} 1141 + 1142 + /** 1143 + * @returns ModelWithString Successful response 1144 + * @throws ApiError 1145 + */ 1146 + public complexTypes(data: TDataComplexTypes): Observable<Array<ModelWithString>> { 1147 + const { parameterObject, parameterReference } = data; 1148 + return __request(OpenAPI, this.http, { 1149 + method: 'GET', 1150 + url: '/api/v{api-version}/complex', 1151 + query: { 1152 + parameterObject, 1153 + parameterReference, 1154 + }, 1155 + errors: { 1156 + 400: `400 server error`, 1157 + 500: `500 server error`, 1158 + }, 1159 + }); 1160 + } 1161 + 1162 + /** 1163 + * @returns ModelWithString Success 1164 + * @throws ApiError 1165 + */ 1166 + public complexParams(data: TDataComplexParams): Observable<ModelWithString> { 1167 + const { id, requestBody } = data; 1168 + return __request(OpenAPI, this.http, { 1169 + method: 'PUT', 1170 + url: '/api/v{api-version}/complex/{id}', 1171 + path: { 1172 + id, 1173 + }, 1174 + body: requestBody, 1175 + mediaType: 'application/json-patch+json', 1176 + }); 1177 + } 1178 + } 1179 + 1180 + export type TDataMultipartRequest = { 1181 + formData?: { 1182 + content?: Blob | File; 1183 + data?: ModelWithString | null; 1184 + }; 1185 + }; 1186 + 1187 + @Injectable({ 1188 + providedIn: 'root', 1189 + }) 1190 + export class MultipartService { 1191 + constructor(public readonly http: HttpClient) {} 1192 + 1193 + /** 1194 + * @throws ApiError 1195 + */ 1196 + public multipartRequest(data: TDataMultipartRequest = {}): Observable<void> { 1197 + const { formData } = data; 1198 + return __request(OpenAPI, this.http, { 1199 + method: 'POST', 1200 + url: '/api/v{api-version}/multipart', 1201 + formData: formData, 1202 + mediaType: 'multipart/form-data', 1203 + }); 1204 + } 1205 + 1206 + /** 1207 + * @returns any OK 1208 + * @throws ApiError 1209 + */ 1210 + public multipartResponse(): Observable<{ 1211 + file?: Blob | File; 1212 + metadata?: { 1213 + foo?: string; 1214 + bar?: string; 1215 + }; 1216 + }> { 1217 + return __request(OpenAPI, this.http, { 1218 + method: 'GET', 1219 + url: '/api/v{api-version}/multipart', 1220 + }); 1221 + } 1222 + } 1223 + 1224 + @Injectable({ 1225 + providedIn: 'root', 1226 + }) 1227 + export class HeaderService { 1228 + constructor(public readonly http: HttpClient) {} 1229 + 1230 + /** 1231 + * @returns string Successful response 1232 + * @throws ApiError 1233 + */ 1234 + public callWithResultFromHeader(): Observable<string> { 1235 + return __request(OpenAPI, this.http, { 1236 + method: 'POST', 1237 + url: '/api/v{api-version}/header', 1238 + responseHeader: 'operation-location', 1239 + errors: { 1240 + 400: `400 server error`, 1241 + 500: `500 server error`, 1242 + }, 1243 + }); 1244 + } 1245 + } 1246 + 1247 + export type TDataTestErrorCode = { 1248 + /** 1249 + * Status code to return 1250 + */ 1251 + status: number; 1252 + }; 1253 + 1254 + @Injectable({ 1255 + providedIn: 'root', 1256 + }) 1257 + export class ErrorService { 1258 + constructor(public readonly http: HttpClient) {} 1259 + 1260 + /** 1261 + * @returns any Custom message: Successful response 1262 + * @throws ApiError 1263 + */ 1264 + public testErrorCode(data: TDataTestErrorCode): Observable<any> { 1265 + const { status } = data; 1266 + return __request(OpenAPI, this.http, { 1267 + method: 'POST', 1268 + url: '/api/v{api-version}/error', 1269 + query: { 1270 + status, 1271 + }, 1272 + errors: { 1273 + 500: `Custom message: Internal Server Error`, 1274 + 501: `Custom message: Not Implemented`, 1275 + 502: `Custom message: Bad Gateway`, 1276 + 503: `Custom message: Service Unavailable`, 1277 + }, 1278 + }); 1279 + } 1280 + } 1281 + 1282 + export type TDataNonAsciiæøåÆøÅöôêÊ字符串 = { 1283 + /** 1284 + * Dummy input param 1285 + */ 1286 + nonAsciiParamæøåÆøÅöôêÊ: number; 1287 + }; 1288 + 1289 + @Injectable({ 1290 + providedIn: 'root', 1291 + }) 1292 + export class NonAsciiÆøåÆøÅöôêÊService { 1293 + constructor(public readonly http: HttpClient) {} 1294 + 1295 + /** 1296 + * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response 1297 + * @throws ApiError 1298 + */ 1299 + public nonAsciiæøåÆøÅöôêÊ字符串( 1300 + data: TDataNonAsciiæøåÆøÅöôêÊ字符串 1301 + ): Observable<Array<NonAsciiStringæøåÆØÅöôêÊ字符串>> { 1302 + const { nonAsciiParamæøåÆøÅöôêÊ } = data; 1303 + return __request(OpenAPI, this.http, { 1304 + method: 'POST', 1305 + url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 1306 + query: { 1307 + nonAsciiParamæøåÆØÅöôêÊ: nonAsciiParamæøåÆøÅöôêÊ, 1308 + }, 1309 + }); 1310 + } 1311 + }
-55
test/__snapshots__/v3_angular/services/CollectionFormatService.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - export type TDataCollectionFormat = { 9 - /** 10 - * This is an array parameter that is sent as csv format (comma-separated values) 11 - */ 12 - parameterArrayCsv: Array<string> | null; 13 - /** 14 - * This is an array parameter that is sent as multi format (multiple parameter instances) 15 - */ 16 - parameterArrayMulti: Array<string> | null; 17 - /** 18 - * This is an array parameter that is sent as pipes format (pipe-separated values) 19 - */ 20 - parameterArrayPipes: Array<string> | null; 21 - /** 22 - * This is an array parameter that is sent as ssv format (space-separated values) 23 - */ 24 - parameterArraySsv: Array<string> | null; 25 - /** 26 - * This is an array parameter that is sent as tsv format (tab-separated values) 27 - */ 28 - parameterArrayTsv: Array<string> | null; 29 - }; 30 - 31 - @Injectable({ 32 - providedIn: 'root', 33 - }) 34 - export class CollectionFormatService { 35 - constructor(public readonly http: HttpClient) {} 36 - 37 - /** 38 - * @throws ApiError 39 - */ 40 - public collectionFormat(data: TDataCollectionFormat): Observable<void> { 41 - const { parameterArrayCsv, parameterArrayMulti, parameterArrayPipes, parameterArraySsv, parameterArrayTsv } = 42 - data; 43 - return __request(OpenAPI, this.http, { 44 - method: 'GET', 45 - url: '/api/v{api-version}/collectionFormat', 46 - query: { 47 - parameterArrayCSV: parameterArrayCsv, 48 - parameterArraySSV: parameterArraySsv, 49 - parameterArrayTSV: parameterArrayTsv, 50 - parameterArrayPipes, 51 - parameterArrayMulti, 52 - }, 53 - }); 54 - } 55 - }
-83
test/__snapshots__/v3_angular/services/ComplexService.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - import type { ModelWithArray, ModelWithDictionary, ModelWithEnum, ModelWithString } from '../models'; 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - export type TDataComplexTypes = { 9 - /** 10 - * Parameter containing object 11 - */ 12 - parameterObject: { 13 - first?: { 14 - second?: { 15 - third?: string; 16 - }; 17 - }; 18 - }; 19 - /** 20 - * Parameter containing reference 21 - */ 22 - parameterReference: ModelWithString; 23 - }; 24 - export type TDataComplexParams = { 25 - id: number; 26 - requestBody?: { 27 - readonly key: string | null; 28 - name: string | null; 29 - enabled?: boolean; 30 - readonly type: 'Monkey' | 'Horse' | 'Bird'; 31 - listOfModels?: Array<ModelWithString> | null; 32 - listOfStrings?: Array<string> | null; 33 - parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; 34 - readonly user?: { 35 - readonly id?: number; 36 - readonly name?: string | null; 37 - }; 38 - }; 39 - }; 40 - 41 - @Injectable({ 42 - providedIn: 'root', 43 - }) 44 - export class ComplexService { 45 - constructor(public readonly http: HttpClient) {} 46 - 47 - /** 48 - * @returns ModelWithString Successful response 49 - * @throws ApiError 50 - */ 51 - public complexTypes(data: TDataComplexTypes): Observable<Array<ModelWithString>> { 52 - const { parameterObject, parameterReference } = data; 53 - return __request(OpenAPI, this.http, { 54 - method: 'GET', 55 - url: '/api/v{api-version}/complex', 56 - query: { 57 - parameterObject, 58 - parameterReference, 59 - }, 60 - errors: { 61 - 400: `400 server error`, 62 - 500: `500 server error`, 63 - }, 64 - }); 65 - } 66 - 67 - /** 68 - * @returns ModelWithString Success 69 - * @throws ApiError 70 - */ 71 - public complexParams(data: TDataComplexParams): Observable<ModelWithString> { 72 - const { id, requestBody } = data; 73 - return __request(OpenAPI, this.http, { 74 - method: 'PUT', 75 - url: '/api/v{api-version}/complex/{id}', 76 - path: { 77 - id, 78 - }, 79 - body: requestBody, 80 - mediaType: 'application/json-patch+json', 81 - }); 82 - } 83 - }
-41
test/__snapshots__/v3_angular/services/DefaultService.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - import type { ModelWithArrayReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnly } from '../models'; 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - export type TDataPostServiceWithEmptyTag = { 9 - requestBody: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 10 - }; 11 - 12 - @Injectable({ 13 - providedIn: 'root', 14 - }) 15 - export class DefaultService { 16 - constructor(public readonly http: HttpClient) {} 17 - 18 - /** 19 - * @throws ApiError 20 - */ 21 - public serviceWithEmptyTag(): Observable<void> { 22 - return __request(OpenAPI, this.http, { 23 - method: 'GET', 24 - url: '/api/v{api-version}/no-tag', 25 - }); 26 - } 27 - 28 - /** 29 - * @returns ModelWithReadOnlyAndWriteOnly 30 - * @throws ApiError 31 - */ 32 - public postServiceWithEmptyTag(data: TDataPostServiceWithEmptyTag): Observable<ModelWithReadOnlyAndWriteOnly> { 33 - const { requestBody } = data; 34 - return __request(OpenAPI, this.http, { 35 - method: 'POST', 36 - url: '/api/v{api-version}/no-tag', 37 - body: requestBody, 38 - mediaType: 'application/json', 39 - }); 40 - } 41 - }
-174
test/__snapshots__/v3_angular/services/DefaultsService.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - import type { ModelWithString } from '../models'; 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - export type TDataCallWithDefaultParameters = { 9 - /** 10 - * This is a simple boolean with default value 11 - */ 12 - parameterBoolean?: boolean | null; 13 - /** 14 - * This is a simple enum with default value 15 - */ 16 - parameterEnum?: 'Success' | 'Warning' | 'Error'; 17 - /** 18 - * This is a simple model with default value 19 - */ 20 - parameterModel?: ModelWithString | null; 21 - /** 22 - * This is a simple number with default value 23 - */ 24 - parameterNumber?: number | null; 25 - /** 26 - * This is a simple string with default value 27 - */ 28 - parameterString?: string | null; 29 - }; 30 - export type TDataCallWithDefaultOptionalParameters = { 31 - /** 32 - * This is a simple boolean that is optional with default value 33 - */ 34 - parameterBoolean?: boolean; 35 - /** 36 - * This is a simple enum that is optional with default value 37 - */ 38 - parameterEnum?: 'Success' | 'Warning' | 'Error'; 39 - /** 40 - * This is a simple model that is optional with default value 41 - */ 42 - parameterModel?: ModelWithString; 43 - /** 44 - * This is a simple number that is optional with default value 45 - */ 46 - parameterNumber?: number; 47 - /** 48 - * This is a simple string that is optional with default value 49 - */ 50 - parameterString?: string; 51 - }; 52 - export type TDataCallToTestOrderOfParams = { 53 - /** 54 - * This is a optional string with default 55 - */ 56 - parameterOptionalStringWithDefault?: string; 57 - /** 58 - * This is a optional string with empty default 59 - */ 60 - parameterOptionalStringWithEmptyDefault?: string; 61 - /** 62 - * This is a optional string with no default 63 - */ 64 - parameterOptionalStringWithNoDefault?: string; 65 - /** 66 - * This is a string that can be null with default 67 - */ 68 - parameterStringNullableWithDefault?: string | null; 69 - /** 70 - * This is a string that can be null with no default 71 - */ 72 - parameterStringNullableWithNoDefault?: string | null; 73 - /** 74 - * This is a string with default 75 - */ 76 - parameterStringWithDefault?: string; 77 - /** 78 - * This is a string with empty default 79 - */ 80 - parameterStringWithEmptyDefault?: string; 81 - /** 82 - * This is a string with no default 83 - */ 84 - parameterStringWithNoDefault: string; 85 - }; 86 - 87 - @Injectable({ 88 - providedIn: 'root', 89 - }) 90 - export class DefaultsService { 91 - constructor(public readonly http: HttpClient) {} 92 - 93 - /** 94 - * @throws ApiError 95 - */ 96 - public callWithDefaultParameters(data: TDataCallWithDefaultParameters = {}): Observable<void> { 97 - const { 98 - parameterBoolean = true, 99 - parameterEnum = 'Success', 100 - parameterModel = { 101 - prop: 'Hello World!', 102 - }, 103 - parameterNumber = 123, 104 - parameterString = 'Hello World!', 105 - } = data; 106 - return __request(OpenAPI, this.http, { 107 - method: 'GET', 108 - url: '/api/v{api-version}/defaults', 109 - query: { 110 - parameterString, 111 - parameterNumber, 112 - parameterBoolean, 113 - parameterEnum, 114 - parameterModel, 115 - }, 116 - }); 117 - } 118 - 119 - /** 120 - * @throws ApiError 121 - */ 122 - public callWithDefaultOptionalParameters(data: TDataCallWithDefaultOptionalParameters = {}): Observable<void> { 123 - const { 124 - parameterBoolean = true, 125 - parameterEnum = 'Success', 126 - parameterModel = { 127 - prop: 'Hello World!', 128 - }, 129 - parameterNumber = 123, 130 - parameterString = 'Hello World!', 131 - } = data; 132 - return __request(OpenAPI, this.http, { 133 - method: 'POST', 134 - url: '/api/v{api-version}/defaults', 135 - query: { 136 - parameterString, 137 - parameterNumber, 138 - parameterBoolean, 139 - parameterEnum, 140 - parameterModel, 141 - }, 142 - }); 143 - } 144 - 145 - /** 146 - * @throws ApiError 147 - */ 148 - public callToTestOrderOfParams(data: TDataCallToTestOrderOfParams): Observable<void> { 149 - const { 150 - parameterOptionalStringWithDefault = 'Hello World!', 151 - parameterOptionalStringWithEmptyDefault = '', 152 - parameterOptionalStringWithNoDefault, 153 - parameterStringNullableWithDefault = null, 154 - parameterStringNullableWithNoDefault, 155 - parameterStringWithDefault = 'Hello World!', 156 - parameterStringWithEmptyDefault = '', 157 - parameterStringWithNoDefault, 158 - } = data; 159 - return __request(OpenAPI, this.http, { 160 - method: 'PUT', 161 - url: '/api/v{api-version}/defaults', 162 - query: { 163 - parameterOptionalStringWithDefault, 164 - parameterOptionalStringWithEmptyDefault, 165 - parameterOptionalStringWithNoDefault, 166 - parameterStringWithDefault, 167 - parameterStringWithEmptyDefault, 168 - parameterStringWithNoDefault, 169 - parameterStringNullableWithNoDefault, 170 - parameterStringNullableWithDefault, 171 - }, 172 - }); 173 - } 174 - }
-35
test/__snapshots__/v3_angular/services/DeprecatedService.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - import type { DeprecatedModel } from '../models'; 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - export type TDataDeprecatedCall = { 9 - /** 10 - * This parameter is deprecated 11 - */ 12 - parameter: DeprecatedModel | null; 13 - }; 14 - 15 - @Injectable({ 16 - providedIn: 'root', 17 - }) 18 - export class DeprecatedService { 19 - constructor(public readonly http: HttpClient) {} 20 - 21 - /** 22 - * @deprecated 23 - * @throws ApiError 24 - */ 25 - public deprecatedCall(data: TDataDeprecatedCall): Observable<void> { 26 - const { parameter } = data; 27 - return __request(OpenAPI, this.http, { 28 - method: 'POST', 29 - url: '/api/v{api-version}/parameters/deprecated', 30 - headers: { 31 - parameter, 32 - }, 33 - }); 34 - } 35 - }
-69
test/__snapshots__/v3_angular/services/DescriptionsService.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - export type TDataCallWithDescriptions = { 9 - /** 10 - * Testing backticks in string: `backticks` and ```multiple backticks``` should work 11 - */ 12 - parameterWithBackticks?: unknown; 13 - /** 14 - * Testing multiline comments in string: First line 15 - * Second line 16 - * 17 - * Fourth line 18 - */ 19 - parameterWithBreaks?: unknown; 20 - /** 21 - * Testing expression placeholders in string: ${expression} should work 22 - */ 23 - parameterWithExpressionPlaceholders?: unknown; 24 - /** 25 - * Testing quotes in string: 'single quote''' and "double quotes""" should work 26 - */ 27 - parameterWithQuotes?: unknown; 28 - /** 29 - * Testing reserved characters in string: * inline * and ** inline ** should work 30 - */ 31 - parameterWithReservedCharacters?: unknown; 32 - /** 33 - * Testing slashes in string: \backwards\\\ and /forwards/// should work 34 - */ 35 - parameterWithSlashes?: unknown; 36 - }; 37 - 38 - @Injectable({ 39 - providedIn: 'root', 40 - }) 41 - export class DescriptionsService { 42 - constructor(public readonly http: HttpClient) {} 43 - 44 - /** 45 - * @throws ApiError 46 - */ 47 - public callWithDescriptions(data: TDataCallWithDescriptions = {}): Observable<void> { 48 - const { 49 - parameterWithBackticks, 50 - parameterWithBreaks, 51 - parameterWithExpressionPlaceholders, 52 - parameterWithQuotes, 53 - parameterWithReservedCharacters, 54 - parameterWithSlashes, 55 - } = data; 56 - return __request(OpenAPI, this.http, { 57 - method: 'POST', 58 - url: '/api/v{api-version}/descriptions/', 59 - query: { 60 - parameterWithBreaks, 61 - parameterWithBackticks, 62 - parameterWithSlashes, 63 - parameterWithExpressionPlaceholders, 64 - parameterWithQuotes, 65 - parameterWithReservedCharacters, 66 - }, 67 - }); 68 - } 69 - }
-53
test/__snapshots__/v3_angular/services/DuplicateService.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - @Injectable({ 9 - providedIn: 'root', 10 - }) 11 - export class DuplicateService { 12 - constructor(public readonly http: HttpClient) {} 13 - 14 - /** 15 - * @throws ApiError 16 - */ 17 - public duplicateName(): Observable<void> { 18 - return __request(OpenAPI, this.http, { 19 - method: 'GET', 20 - url: '/api/v{api-version}/duplicate', 21 - }); 22 - } 23 - 24 - /** 25 - * @throws ApiError 26 - */ 27 - public duplicateName1(): Observable<void> { 28 - return __request(OpenAPI, this.http, { 29 - method: 'POST', 30 - url: '/api/v{api-version}/duplicate', 31 - }); 32 - } 33 - 34 - /** 35 - * @throws ApiError 36 - */ 37 - public duplicateName2(): Observable<void> { 38 - return __request(OpenAPI, this.http, { 39 - method: 'PUT', 40 - url: '/api/v{api-version}/duplicate', 41 - }); 42 - } 43 - 44 - /** 45 - * @throws ApiError 46 - */ 47 - public duplicateName3(): Observable<void> { 48 - return __request(OpenAPI, this.http, { 49 - method: 'DELETE', 50 - url: '/api/v{api-version}/duplicate', 51 - }); 52 - } 53 - }
-41
test/__snapshots__/v3_angular/services/ErrorService.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - export type TDataTestErrorCode = { 9 - /** 10 - * Status code to return 11 - */ 12 - status: number; 13 - }; 14 - 15 - @Injectable({ 16 - providedIn: 'root', 17 - }) 18 - export class ErrorService { 19 - constructor(public readonly http: HttpClient) {} 20 - 21 - /** 22 - * @returns any Custom message: Successful response 23 - * @throws ApiError 24 - */ 25 - public testErrorCode(data: TDataTestErrorCode): Observable<any> { 26 - const { status } = data; 27 - return __request(OpenAPI, this.http, { 28 - method: 'POST', 29 - url: '/api/v{api-version}/error', 30 - query: { 31 - status, 32 - }, 33 - errors: { 34 - 500: `Custom message: Internal Server Error`, 35 - 501: `Custom message: Not Implemented`, 36 - 502: `Custom message: Bad Gateway`, 37 - 503: `Custom message: Service Unavailable`, 38 - }, 39 - }); 40 - } 41 - }
-32
test/__snapshots__/v3_angular/services/FileResponseService.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - export type TDataFileResponse = { 9 - id: string; 10 - }; 11 - 12 - @Injectable({ 13 - providedIn: 'root', 14 - }) 15 - export class FileResponseService { 16 - constructor(public readonly http: HttpClient) {} 17 - 18 - /** 19 - * @returns binary Success 20 - * @throws ApiError 21 - */ 22 - public fileResponse(data: TDataFileResponse): Observable<Blob | File> { 23 - const { id } = data; 24 - return __request(OpenAPI, this.http, { 25 - method: 'GET', 26 - url: '/api/v{api-version}/file/{id}', 27 - path: { 28 - id, 29 - }, 30 - }); 31 - } 32 - }
-40
test/__snapshots__/v3_angular/services/FormDataService.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - import type { ModelWithString } from '../models'; 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - export type TDataPostApiFormData = { 9 - /** 10 - * A reusable request body 11 - */ 12 - formData?: ModelWithString; 13 - /** 14 - * This is a reusable parameter 15 - */ 16 - parameter?: string; 17 - }; 18 - 19 - @Injectable({ 20 - providedIn: 'root', 21 - }) 22 - export class FormDataService { 23 - constructor(public readonly http: HttpClient) {} 24 - 25 - /** 26 - * @throws ApiError 27 - */ 28 - public postApiFormData(data: TDataPostApiFormData = {}): Observable<void> { 29 - const { formData, parameter } = data; 30 - return __request(OpenAPI, this.http, { 31 - method: 'POST', 32 - url: '/api/v{api-version}/formData/', 33 - query: { 34 - parameter, 35 - }, 36 - formData: formData, 37 - mediaType: 'multipart/form-data', 38 - }); 39 - } 40 - }
-29
test/__snapshots__/v3_angular/services/HeaderService.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - @Injectable({ 9 - providedIn: 'root', 10 - }) 11 - export class HeaderService { 12 - constructor(public readonly http: HttpClient) {} 13 - 14 - /** 15 - * @returns string Successful response 16 - * @throws ApiError 17 - */ 18 - public callWithResultFromHeader(): Observable<string> { 19 - return __request(OpenAPI, this.http, { 20 - method: 'POST', 21 - url: '/api/v{api-version}/header', 22 - responseHeader: 'operation-location', 23 - errors: { 24 - 400: `400 server error`, 25 - 500: `500 server error`, 26 - }, 27 - }); 28 - } 29 - }
-50
test/__snapshots__/v3_angular/services/MultipartService.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - import type { ModelWithString } from '../models'; 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - export type TDataMultipartRequest = { 9 - formData?: { 10 - content?: Blob | File; 11 - data?: ModelWithString | null; 12 - }; 13 - }; 14 - 15 - @Injectable({ 16 - providedIn: 'root', 17 - }) 18 - export class MultipartService { 19 - constructor(public readonly http: HttpClient) {} 20 - 21 - /** 22 - * @throws ApiError 23 - */ 24 - public multipartRequest(data: TDataMultipartRequest = {}): Observable<void> { 25 - const { formData } = data; 26 - return __request(OpenAPI, this.http, { 27 - method: 'POST', 28 - url: '/api/v{api-version}/multipart', 29 - formData: formData, 30 - mediaType: 'multipart/form-data', 31 - }); 32 - } 33 - 34 - /** 35 - * @returns any OK 36 - * @throws ApiError 37 - */ 38 - public multipartResponse(): Observable<{ 39 - file?: Blob | File; 40 - metadata?: { 41 - foo?: string; 42 - bar?: string; 43 - }; 44 - }> { 45 - return __request(OpenAPI, this.http, { 46 - method: 'GET', 47 - url: '/api/v{api-version}/multipart', 48 - }); 49 - } 50 - }
-35
test/__snapshots__/v3_angular/services/MultipleTags1Service.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - @Injectable({ 9 - providedIn: 'root', 10 - }) 11 - export class MultipleTags1Service { 12 - constructor(public readonly http: HttpClient) {} 13 - 14 - /** 15 - * @returns void Success 16 - * @throws ApiError 17 - */ 18 - public dummyA(): Observable<void> { 19 - return __request(OpenAPI, this.http, { 20 - method: 'GET', 21 - url: '/api/v{api-version}/multiple-tags/a', 22 - }); 23 - } 24 - 25 - /** 26 - * @returns void Success 27 - * @throws ApiError 28 - */ 29 - public dummyB(): Observable<void> { 30 - return __request(OpenAPI, this.http, { 31 - method: 'GET', 32 - url: '/api/v{api-version}/multiple-tags/b', 33 - }); 34 - } 35 - }
-35
test/__snapshots__/v3_angular/services/MultipleTags2Service.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - @Injectable({ 9 - providedIn: 'root', 10 - }) 11 - export class MultipleTags2Service { 12 - constructor(public readonly http: HttpClient) {} 13 - 14 - /** 15 - * @returns void Success 16 - * @throws ApiError 17 - */ 18 - public dummyA(): Observable<void> { 19 - return __request(OpenAPI, this.http, { 20 - method: 'GET', 21 - url: '/api/v{api-version}/multiple-tags/a', 22 - }); 23 - } 24 - 25 - /** 26 - * @returns void Success 27 - * @throws ApiError 28 - */ 29 - public dummyB(): Observable<void> { 30 - return __request(OpenAPI, this.http, { 31 - method: 'GET', 32 - url: '/api/v{api-version}/multiple-tags/b', 33 - }); 34 - } 35 - }
-24
test/__snapshots__/v3_angular/services/MultipleTags3Service.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - @Injectable({ 9 - providedIn: 'root', 10 - }) 11 - export class MultipleTags3Service { 12 - constructor(public readonly http: HttpClient) {} 13 - 14 - /** 15 - * @returns void Success 16 - * @throws ApiError 17 - */ 18 - public dummyB(): Observable<void> { 19 - return __request(OpenAPI, this.http, { 20 - method: 'GET', 21 - url: '/api/v{api-version}/multiple-tags/b', 22 - }); 23 - } 24 - }
-36
test/__snapshots__/v3_angular/services/NoContentService.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - @Injectable({ 9 - providedIn: 'root', 10 - }) 11 - export class NoContentService { 12 - constructor(public readonly http: HttpClient) {} 13 - 14 - /** 15 - * @returns void Success 16 - * @throws ApiError 17 - */ 18 - public callWithNoContentResponse(): Observable<void> { 19 - return __request(OpenAPI, this.http, { 20 - method: 'GET', 21 - url: '/api/v{api-version}/no-content', 22 - }); 23 - } 24 - 25 - /** 26 - * @returns number Response is a simple number 27 - * @returns void Success 28 - * @throws ApiError 29 - */ 30 - public callWithResponseAndNoContentResponse(): Observable<number | void> { 31 - return __request(OpenAPI, this.http, { 32 - method: 'GET', 33 - url: '/api/v{api-version}/multiple-tags/response-and-no-content', 34 - }); 35 - } 36 - }
-37
test/__snapshots__/v3_angular/services/NonAsciiÆøåÆøÅöôêÊService.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - import type { NonAsciiStringæøåÆØÅöôêÊ字符串 } from '../models'; 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - export type TDataNonAsciiæøåÆøÅöôêÊ字符串 = { 9 - /** 10 - * Dummy input param 11 - */ 12 - nonAsciiParamæøåÆøÅöôêÊ: number; 13 - }; 14 - 15 - @Injectable({ 16 - providedIn: 'root', 17 - }) 18 - export class NonAsciiÆøåÆøÅöôêÊService { 19 - constructor(public readonly http: HttpClient) {} 20 - 21 - /** 22 - * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response 23 - * @throws ApiError 24 - */ 25 - public nonAsciiæøåÆøÅöôêÊ字符串( 26 - data: TDataNonAsciiæøåÆøÅöôêÊ字符串 27 - ): Observable<Array<NonAsciiStringæøåÆØÅöôêÊ字符串>> { 28 - const { nonAsciiParamæøåÆøÅöôêÊ } = data; 29 - return __request(OpenAPI, this.http, { 30 - method: 'POST', 31 - url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 32 - query: { 33 - nonAsciiParamæøåÆØÅöôêÊ: nonAsciiParamæøåÆøÅöôêÊ, 34 - }, 35 - }); 36 - } 37 - }
-237
test/__snapshots__/v3_angular/services/ParametersService.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - import type { ModelWithNestedArrayEnumsDataFoo, ModelWithOneOfEnum, ModelWithString, Pageable } from '../models'; 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - export type TDataDeleteFoo = { 9 - /** 10 - * bar in method 11 - */ 12 - bar: string; 13 - /** 14 - * foo in method 15 - */ 16 - foo: string; 17 - }; 18 - export type TDataCallWithParameters = { 19 - fooAllOfEnum: ModelWithNestedArrayEnumsDataFoo; 20 - fooRefEnum?: ModelWithNestedArrayEnumsDataFoo; 21 - /** 22 - * This is the parameter that goes into the cookie 23 - */ 24 - parameterCookie: string | null; 25 - /** 26 - * This is the parameter that goes into the form data 27 - */ 28 - parameterForm: string | null; 29 - /** 30 - * This is the parameter that goes into the header 31 - */ 32 - parameterHeader: string | null; 33 - /** 34 - * This is the parameter that goes into the path 35 - */ 36 - parameterPath: string | null; 37 - /** 38 - * This is the parameter that goes into the query params 39 - */ 40 - parameterQuery: string | null; 41 - /** 42 - * This is the parameter that goes into the body 43 - */ 44 - requestBody: ModelWithString | null; 45 - }; 46 - export type TDataCallWithWeirdParameterNames = { 47 - /** 48 - * This is the parameter with a reserved keyword 49 - */ 50 - _default?: string; 51 - /** 52 - * This is the parameter that goes into the cookie 53 - */ 54 - parameterCookie: string | null; 55 - /** 56 - * This is the parameter that goes into the request form data 57 - */ 58 - parameterForm: string | null; 59 - /** 60 - * This is the parameter that goes into the request header 61 - */ 62 - parameterHeader: string | null; 63 - /** 64 - * This is the parameter that goes into the path 65 - */ 66 - parameterPath1?: string; 67 - /** 68 - * This is the parameter that goes into the path 69 - */ 70 - parameterPath2?: string; 71 - /** 72 - * This is the parameter that goes into the path 73 - */ 74 - parameterPath3?: string; 75 - /** 76 - * This is the parameter that goes into the request query params 77 - */ 78 - parameterQuery: string | null; 79 - /** 80 - * This is the parameter that goes into the body 81 - */ 82 - requestBody: ModelWithString | null; 83 - }; 84 - export type TDataGetCallWithOptionalParam = { 85 - /** 86 - * This is an optional parameter 87 - */ 88 - parameter?: string; 89 - /** 90 - * This is a required parameter 91 - */ 92 - requestBody: ModelWithOneOfEnum; 93 - }; 94 - export type TDataPostCallWithOptionalParam = { 95 - /** 96 - * This is a required parameter 97 - */ 98 - parameter: Pageable; 99 - /** 100 - * This is an optional parameter 101 - */ 102 - requestBody?: ModelWithString; 103 - }; 104 - 105 - @Injectable({ 106 - providedIn: 'root', 107 - }) 108 - export class ParametersService { 109 - constructor(public readonly http: HttpClient) {} 110 - 111 - /** 112 - * @throws ApiError 113 - */ 114 - public deleteFoo(data: TDataDeleteFoo): Observable<void> { 115 - const { bar, foo } = data; 116 - return __request(OpenAPI, this.http, { 117 - method: 'DELETE', 118 - url: '/api/v{api-version}/foo/{foo}/bar/{bar}', 119 - path: { 120 - foo, 121 - bar, 122 - }, 123 - }); 124 - } 125 - 126 - /** 127 - * @throws ApiError 128 - */ 129 - public callWithParameters(data: TDataCallWithParameters): Observable<void> { 130 - const { 131 - fooAllOfEnum, 132 - fooRefEnum, 133 - parameterCookie, 134 - parameterForm, 135 - parameterHeader, 136 - parameterPath, 137 - parameterQuery, 138 - requestBody, 139 - } = data; 140 - return __request(OpenAPI, this.http, { 141 - method: 'POST', 142 - url: '/api/v{api-version}/parameters/{parameterPath}', 143 - path: { 144 - parameterPath, 145 - }, 146 - cookies: { 147 - parameterCookie, 148 - }, 149 - headers: { 150 - parameterHeader, 151 - }, 152 - query: { 153 - foo_ref_enum: fooRefEnum, 154 - foo_all_of_enum: fooAllOfEnum, 155 - parameterQuery, 156 - }, 157 - formData: { 158 - parameterForm, 159 - }, 160 - body: requestBody, 161 - mediaType: 'application/json', 162 - }); 163 - } 164 - 165 - /** 166 - * @throws ApiError 167 - */ 168 - public callWithWeirdParameterNames(data: TDataCallWithWeirdParameterNames): Observable<void> { 169 - const { 170 - _default, 171 - parameterCookie, 172 - parameterForm, 173 - parameterHeader, 174 - parameterPath1, 175 - parameterPath2, 176 - parameterPath3, 177 - parameterQuery, 178 - requestBody, 179 - } = data; 180 - return __request(OpenAPI, this.http, { 181 - method: 'POST', 182 - url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', 183 - path: { 184 - 'parameter.path.1': parameterPath1, 185 - 'parameter-path-2': parameterPath2, 186 - 'PARAMETER-PATH-3': parameterPath3, 187 - }, 188 - cookies: { 189 - 'PARAMETER-COOKIE': parameterCookie, 190 - }, 191 - headers: { 192 - 'parameter.header': parameterHeader, 193 - }, 194 - query: { 195 - default: _default, 196 - 'parameter-query': parameterQuery, 197 - }, 198 - formData: { 199 - parameter_form: parameterForm, 200 - }, 201 - body: requestBody, 202 - mediaType: 'application/json', 203 - }); 204 - } 205 - 206 - /** 207 - * @throws ApiError 208 - */ 209 - public getCallWithOptionalParam(data: TDataGetCallWithOptionalParam): Observable<void> { 210 - const { parameter, requestBody } = data; 211 - return __request(OpenAPI, this.http, { 212 - method: 'GET', 213 - url: '/api/v{api-version}/parameters/', 214 - query: { 215 - parameter, 216 - }, 217 - body: requestBody, 218 - mediaType: 'application/json', 219 - }); 220 - } 221 - 222 - /** 223 - * @throws ApiError 224 - */ 225 - public postCallWithOptionalParam(data: TDataPostCallWithOptionalParam): Observable<void> { 226 - const { parameter, requestBody } = data; 227 - return __request(OpenAPI, this.http, { 228 - method: 'POST', 229 - url: '/api/v{api-version}/parameters/', 230 - query: { 231 - parameter, 232 - }, 233 - body: requestBody, 234 - mediaType: 'application/json', 235 - }); 236 - } 237 - }
-40
test/__snapshots__/v3_angular/services/RequestBodyService.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - import type { ModelWithString } from '../models'; 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - export type TDataPostApiRequestBody = { 9 - /** 10 - * A reusable request body 11 - */ 12 - foo?: ModelWithString; 13 - /** 14 - * This is a reusable parameter 15 - */ 16 - parameter?: string; 17 - }; 18 - 19 - @Injectable({ 20 - providedIn: 'root', 21 - }) 22 - export class RequestBodyService { 23 - constructor(public readonly http: HttpClient) {} 24 - 25 - /** 26 - * @throws ApiError 27 - */ 28 - public postApiRequestBody(data: TDataPostApiRequestBody = {}): Observable<void> { 29 - const { foo, parameter } = data; 30 - return __request(OpenAPI, this.http, { 31 - method: 'POST', 32 - url: '/api/v{api-version}/requestBody/', 33 - query: { 34 - parameter, 35 - }, 36 - body: foo, 37 - mediaType: 'application/json', 38 - }); 39 - } 40 - }
-80
test/__snapshots__/v3_angular/services/ResponseService.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - import type { ModelThatExtends, ModelThatExtendsExtends, ModelWithString } from '../models'; 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - @Injectable({ 9 - providedIn: 'root', 10 - }) 11 - export class ResponseService { 12 - constructor(public readonly http: HttpClient) {} 13 - 14 - /** 15 - * @returns number Response is a simple number 16 - * @returns void Success 17 - * @throws ApiError 18 - */ 19 - public callWithResponseAndNoContentResponse(): Observable<number | void> { 20 - return __request(OpenAPI, this.http, { 21 - method: 'GET', 22 - url: '/api/v{api-version}/multiple-tags/response-and-no-content', 23 - }); 24 - } 25 - 26 - /** 27 - * @returns ModelWithString 28 - * @throws ApiError 29 - */ 30 - public callWithResponse(): Observable<ModelWithString> { 31 - return __request(OpenAPI, this.http, { 32 - method: 'GET', 33 - url: '/api/v{api-version}/response', 34 - }); 35 - } 36 - 37 - /** 38 - * @returns ModelWithString Message for default response 39 - * @throws ApiError 40 - */ 41 - public callWithDuplicateResponses(): Observable<ModelWithString> { 42 - return __request(OpenAPI, this.http, { 43 - method: 'POST', 44 - url: '/api/v{api-version}/response', 45 - errors: { 46 - 500: `Message for 500 error`, 47 - 501: `Message for 501 error`, 48 - 502: `Message for 502 error`, 49 - }, 50 - }); 51 - } 52 - 53 - /** 54 - * @returns any Message for 200 response 55 - * @returns ModelWithString Message for default response 56 - * @returns ModelThatExtends Message for 201 response 57 - * @returns ModelThatExtendsExtends Message for 202 response 58 - * @throws ApiError 59 - */ 60 - public callWithResponses(): Observable< 61 - | { 62 - readonly '@namespace.string'?: string; 63 - readonly '@namespace.integer'?: number; 64 - readonly value?: Array<ModelWithString>; 65 - } 66 - | ModelWithString 67 - | ModelThatExtends 68 - | ModelThatExtendsExtends 69 - > { 70 - return __request(OpenAPI, this.http, { 71 - method: 'PUT', 72 - url: '/api/v{api-version}/response', 73 - errors: { 74 - 500: `Message for 500 error`, 75 - 501: `Message for 501 error`, 76 - 502: `Message for 502 error`, 77 - }, 78 - }); 79 - } 80 - }
-83
test/__snapshots__/v3_angular/services/SimpleService.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - @Injectable({ 9 - providedIn: 'root', 10 - }) 11 - export class SimpleService { 12 - constructor(public readonly http: HttpClient) {} 13 - 14 - /** 15 - * @throws ApiError 16 - */ 17 - public getCallWithoutParametersAndResponse(): Observable<void> { 18 - return __request(OpenAPI, this.http, { 19 - method: 'GET', 20 - url: '/api/v{api-version}/simple', 21 - }); 22 - } 23 - 24 - /** 25 - * @throws ApiError 26 - */ 27 - public putCallWithoutParametersAndResponse(): Observable<void> { 28 - return __request(OpenAPI, this.http, { 29 - method: 'PUT', 30 - url: '/api/v{api-version}/simple', 31 - }); 32 - } 33 - 34 - /** 35 - * @throws ApiError 36 - */ 37 - public postCallWithoutParametersAndResponse(): Observable<void> { 38 - return __request(OpenAPI, this.http, { 39 - method: 'POST', 40 - url: '/api/v{api-version}/simple', 41 - }); 42 - } 43 - 44 - /** 45 - * @throws ApiError 46 - */ 47 - public deleteCallWithoutParametersAndResponse(): Observable<void> { 48 - return __request(OpenAPI, this.http, { 49 - method: 'DELETE', 50 - url: '/api/v{api-version}/simple', 51 - }); 52 - } 53 - 54 - /** 55 - * @throws ApiError 56 - */ 57 - public optionsCallWithoutParametersAndResponse(): Observable<void> { 58 - return __request(OpenAPI, this.http, { 59 - method: 'OPTIONS', 60 - url: '/api/v{api-version}/simple', 61 - }); 62 - } 63 - 64 - /** 65 - * @throws ApiError 66 - */ 67 - public headCallWithoutParametersAndResponse(): Observable<void> { 68 - return __request(OpenAPI, this.http, { 69 - method: 'HEAD', 70 - url: '/api/v{api-version}/simple', 71 - }); 72 - } 73 - 74 - /** 75 - * @throws ApiError 76 - */ 77 - public patchCallWithoutParametersAndResponse(): Observable<void> { 78 - return __request(OpenAPI, this.http, { 79 - method: 'PATCH', 80 - url: '/api/v{api-version}/simple', 81 - }); 82 - } 83 - }
-84
test/__snapshots__/v3_angular/services/TypesService.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - export type TDataTypes = { 9 - /** 10 - * This is a number parameter 11 - */ 12 - id?: number; 13 - /** 14 - * This is an array parameter 15 - */ 16 - parameterArray: Array<string> | null; 17 - /** 18 - * This is a boolean parameter 19 - */ 20 - parameterBoolean?: boolean | null; 21 - /** 22 - * This is a dictionary parameter 23 - */ 24 - parameterDictionary: Record<string, unknown> | null; 25 - /** 26 - * This is an enum parameter 27 - */ 28 - parameterEnum: 'Success' | 'Warning' | 'Error' | null; 29 - /** 30 - * This is a number parameter 31 - */ 32 - parameterNumber?: number; 33 - /** 34 - * This is an object parameter 35 - */ 36 - parameterObject?: Record<string, unknown> | null; 37 - /** 38 - * This is a string parameter 39 - */ 40 - parameterString?: string | null; 41 - }; 42 - 43 - @Injectable({ 44 - providedIn: 'root', 45 - }) 46 - export class TypesService { 47 - constructor(public readonly http: HttpClient) {} 48 - 49 - /** 50 - * @returns number Response is a simple number 51 - * @returns string Response is a simple string 52 - * @returns boolean Response is a simple boolean 53 - * @returns unknown Response is a simple object 54 - * @throws ApiError 55 - */ 56 - public types(data: TDataTypes): Observable<number | string | boolean | Record<string, unknown>> { 57 - const { 58 - id, 59 - parameterArray, 60 - parameterBoolean = true, 61 - parameterDictionary, 62 - parameterEnum, 63 - parameterNumber = 123, 64 - parameterObject = null, 65 - parameterString = 'default', 66 - } = data; 67 - return __request(OpenAPI, this.http, { 68 - method: 'GET', 69 - url: '/api/v{api-version}/types', 70 - path: { 71 - id, 72 - }, 73 - query: { 74 - parameterNumber, 75 - parameterString, 76 - parameterBoolean, 77 - parameterObject, 78 - parameterArray, 79 - parameterDictionary, 80 - parameterEnum, 81 - }, 82 - }); 83 - } 84 - }
-35
test/__snapshots__/v3_angular/services/UploadService.ts.snap
··· 1 - import { Injectable } from '@angular/core'; 2 - import { HttpClient } from '@angular/common/http'; 3 - import type { Observable } from 'rxjs'; 4 - 5 - import { OpenAPI } from '../core/OpenAPI'; 6 - import { request as __request } from '../core/request'; 7 - 8 - export type TDataUploadFile = { 9 - /** 10 - * Supply a file reference for upload 11 - */ 12 - file: Blob | File; 13 - }; 14 - 15 - @Injectable({ 16 - providedIn: 'root', 17 - }) 18 - export class UploadService { 19 - constructor(public readonly http: HttpClient) {} 20 - 21 - /** 22 - * @returns boolean 23 - * @throws ApiError 24 - */ 25 - public uploadFile(data: TDataUploadFile): Observable<boolean> { 26 - const { file } = data; 27 - return __request(OpenAPI, this.http, { 28 - method: 'POST', 29 - url: '/api/v{api-version}/upload', 30 - formData: { 31 - file, 32 - }, 33 - }); 34 - } 35 - }
-23
test/__snapshots__/v3_angular/services/index.ts.snap
··· 1 - export { CollectionFormatService } from './CollectionFormatService'; 2 - export { ComplexService } from './ComplexService'; 3 - export { DefaultService } from './DefaultService'; 4 - export { DefaultsService } from './DefaultsService'; 5 - export { DeprecatedService } from './DeprecatedService'; 6 - export { DescriptionsService } from './DescriptionsService'; 7 - export { DuplicateService } from './DuplicateService'; 8 - export { ErrorService } from './ErrorService'; 9 - export { FileResponseService } from './FileResponseService'; 10 - export { FormDataService } from './FormDataService'; 11 - export { HeaderService } from './HeaderService'; 12 - export { MultipartService } from './MultipartService'; 13 - export { MultipleTags1Service } from './MultipleTags1Service'; 14 - export { MultipleTags2Service } from './MultipleTags2Service'; 15 - export { MultipleTags3Service } from './MultipleTags3Service'; 16 - export { NoContentService } from './NoContentService'; 17 - export { NonAsciiÆøåÆøÅöôêÊService } from './NonAsciiÆøåÆøÅöôêÊService'; 18 - export { ParametersService } from './ParametersService'; 19 - export { RequestBodyService } from './RequestBodyService'; 20 - export { ResponseService } from './ResponseService'; 21 - export { SimpleService } from './SimpleService'; 22 - export { TypesService } from './TypesService'; 23 - export { UploadService } from './UploadService';
+23 -23
test/__snapshots__/v3_client/ApiClient.ts.snap
··· 3 3 import { Interceptors } from './core/OpenAPI'; 4 4 import { FetchHttpRequest } from './core/FetchHttpRequest'; 5 5 6 - import { CollectionFormatService } from './services/CollectionFormatService'; 7 - import { ComplexService } from './services/ComplexService'; 8 - import { DefaultService } from './services/DefaultService'; 9 - import { DefaultsService } from './services/DefaultsService'; 10 - import { DeprecatedService } from './services/DeprecatedService'; 11 - import { DescriptionsService } from './services/DescriptionsService'; 12 - import { DuplicateService } from './services/DuplicateService'; 13 - import { ErrorService } from './services/ErrorService'; 14 - import { FileResponseService } from './services/FileResponseService'; 15 - import { FormDataService } from './services/FormDataService'; 16 - import { HeaderService } from './services/HeaderService'; 17 - import { MultipartService } from './services/MultipartService'; 18 - import { MultipleTags1Service } from './services/MultipleTags1Service'; 19 - import { MultipleTags2Service } from './services/MultipleTags2Service'; 20 - import { MultipleTags3Service } from './services/MultipleTags3Service'; 21 - import { NoContentService } from './services/NoContentService'; 22 - import { NonAsciiÆøåÆøÅöôêÊService } from './services/NonAsciiÆøåÆøÅöôêÊService'; 23 - import { ParametersService } from './services/ParametersService'; 24 - import { RequestBodyService } from './services/RequestBodyService'; 25 - import { ResponseService } from './services/ResponseService'; 26 - import { SimpleService } from './services/SimpleService'; 27 - import { TypesService } from './services/TypesService'; 28 - import { UploadService } from './services/UploadService'; 6 + import { CollectionFormatService } from './services'; 7 + import { ComplexService } from './services'; 8 + import { DefaultService } from './services'; 9 + import { DefaultsService } from './services'; 10 + import { DeprecatedService } from './services'; 11 + import { DescriptionsService } from './services'; 12 + import { DuplicateService } from './services'; 13 + import { ErrorService } from './services'; 14 + import { FileResponseService } from './services'; 15 + import { FormDataService } from './services'; 16 + import { HeaderService } from './services'; 17 + import { MultipartService } from './services'; 18 + import { MultipleTags1Service } from './services'; 19 + import { MultipleTags2Service } from './services'; 20 + import { MultipleTags3Service } from './services'; 21 + import { NoContentService } from './services'; 22 + import { NonAsciiÆøåÆøÅöôêÊService } from './services'; 23 + import { ParametersService } from './services'; 24 + import { RequestBodyService } from './services'; 25 + import { ResponseService } from './services'; 26 + import { SimpleService } from './services'; 27 + import { TypesService } from './services'; 28 + import { UploadService } from './services'; 29 29 30 30 type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest; 31 31
+1243
test/__snapshots__/v3_client/services.ts.snap
··· 1 + import type { CancelablePromise } from './core/CancelablePromise'; 2 + import type { BaseHttpRequest } from './core/BaseHttpRequest'; 3 + 4 + import type { 5 + ModelWithArrayReadOnlyAndWriteOnly, 6 + ModelWithReadOnlyAndWriteOnly, 7 + ModelWithNestedArrayEnumsDataFoo, 8 + ModelWithOneOfEnum, 9 + ModelWithString, 10 + Pageable, 11 + DeprecatedModel, 12 + ModelThatExtends, 13 + ModelThatExtendsExtends, 14 + ModelWithArray, 15 + ModelWithDictionary, 16 + ModelWithEnum, 17 + NonAsciiStringæøåÆØÅöôêÊ字符串, 18 + } from './models'; 19 + 20 + export type TDataPostServiceWithEmptyTag = { 21 + requestBody: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 22 + }; 23 + 24 + export class DefaultService { 25 + constructor(public readonly httpRequest: BaseHttpRequest) {} 26 + 27 + /** 28 + * @throws ApiError 29 + */ 30 + public serviceWithEmptyTag(): CancelablePromise<void> { 31 + return this.httpRequest.request({ 32 + method: 'GET', 33 + url: '/api/v{api-version}/no-tag', 34 + }); 35 + } 36 + 37 + /** 38 + * @returns ModelWithReadOnlyAndWriteOnly 39 + * @throws ApiError 40 + */ 41 + public postServiceWithEmptyTag( 42 + data: TDataPostServiceWithEmptyTag 43 + ): CancelablePromise<ModelWithReadOnlyAndWriteOnly> { 44 + const { requestBody } = data; 45 + return this.httpRequest.request({ 46 + method: 'POST', 47 + url: '/api/v{api-version}/no-tag', 48 + body: requestBody, 49 + mediaType: 'application/json', 50 + }); 51 + } 52 + } 53 + 54 + export class SimpleService { 55 + constructor(public readonly httpRequest: BaseHttpRequest) {} 56 + 57 + /** 58 + * @throws ApiError 59 + */ 60 + public getCallWithoutParametersAndResponse(): CancelablePromise<void> { 61 + return this.httpRequest.request({ 62 + method: 'GET', 63 + url: '/api/v{api-version}/simple', 64 + }); 65 + } 66 + 67 + /** 68 + * @throws ApiError 69 + */ 70 + public putCallWithoutParametersAndResponse(): CancelablePromise<void> { 71 + return this.httpRequest.request({ 72 + method: 'PUT', 73 + url: '/api/v{api-version}/simple', 74 + }); 75 + } 76 + 77 + /** 78 + * @throws ApiError 79 + */ 80 + public postCallWithoutParametersAndResponse(): CancelablePromise<void> { 81 + return this.httpRequest.request({ 82 + method: 'POST', 83 + url: '/api/v{api-version}/simple', 84 + }); 85 + } 86 + 87 + /** 88 + * @throws ApiError 89 + */ 90 + public deleteCallWithoutParametersAndResponse(): CancelablePromise<void> { 91 + return this.httpRequest.request({ 92 + method: 'DELETE', 93 + url: '/api/v{api-version}/simple', 94 + }); 95 + } 96 + 97 + /** 98 + * @throws ApiError 99 + */ 100 + public optionsCallWithoutParametersAndResponse(): CancelablePromise<void> { 101 + return this.httpRequest.request({ 102 + method: 'OPTIONS', 103 + url: '/api/v{api-version}/simple', 104 + }); 105 + } 106 + 107 + /** 108 + * @throws ApiError 109 + */ 110 + public headCallWithoutParametersAndResponse(): CancelablePromise<void> { 111 + return this.httpRequest.request({ 112 + method: 'HEAD', 113 + url: '/api/v{api-version}/simple', 114 + }); 115 + } 116 + 117 + /** 118 + * @throws ApiError 119 + */ 120 + public patchCallWithoutParametersAndResponse(): CancelablePromise<void> { 121 + return this.httpRequest.request({ 122 + method: 'PATCH', 123 + url: '/api/v{api-version}/simple', 124 + }); 125 + } 126 + } 127 + 128 + export type TDataDeleteFoo = { 129 + /** 130 + * bar in method 131 + */ 132 + bar: string; 133 + /** 134 + * foo in method 135 + */ 136 + foo: string; 137 + }; 138 + export type TDataCallWithParameters = { 139 + fooAllOfEnum: ModelWithNestedArrayEnumsDataFoo; 140 + fooRefEnum?: ModelWithNestedArrayEnumsDataFoo; 141 + /** 142 + * This is the parameter that goes into the cookie 143 + */ 144 + parameterCookie: string | null; 145 + /** 146 + * This is the parameter that goes into the form data 147 + */ 148 + parameterForm: string | null; 149 + /** 150 + * This is the parameter that goes into the header 151 + */ 152 + parameterHeader: string | null; 153 + /** 154 + * This is the parameter that goes into the path 155 + */ 156 + parameterPath: string | null; 157 + /** 158 + * This is the parameter that goes into the query params 159 + */ 160 + parameterQuery: string | null; 161 + /** 162 + * This is the parameter that goes into the body 163 + */ 164 + requestBody: ModelWithString | null; 165 + }; 166 + export type TDataCallWithWeirdParameterNames = { 167 + /** 168 + * This is the parameter with a reserved keyword 169 + */ 170 + _default?: string; 171 + /** 172 + * This is the parameter that goes into the cookie 173 + */ 174 + parameterCookie: string | null; 175 + /** 176 + * This is the parameter that goes into the request form data 177 + */ 178 + parameterForm: string | null; 179 + /** 180 + * This is the parameter that goes into the request header 181 + */ 182 + parameterHeader: string | null; 183 + /** 184 + * This is the parameter that goes into the path 185 + */ 186 + parameterPath1?: string; 187 + /** 188 + * This is the parameter that goes into the path 189 + */ 190 + parameterPath2?: string; 191 + /** 192 + * This is the parameter that goes into the path 193 + */ 194 + parameterPath3?: string; 195 + /** 196 + * This is the parameter that goes into the request query params 197 + */ 198 + parameterQuery: string | null; 199 + /** 200 + * This is the parameter that goes into the body 201 + */ 202 + requestBody: ModelWithString | null; 203 + }; 204 + export type TDataGetCallWithOptionalParam = { 205 + /** 206 + * This is an optional parameter 207 + */ 208 + parameter?: string; 209 + /** 210 + * This is a required parameter 211 + */ 212 + requestBody: ModelWithOneOfEnum; 213 + }; 214 + export type TDataPostCallWithOptionalParam = { 215 + /** 216 + * This is a required parameter 217 + */ 218 + parameter: Pageable; 219 + /** 220 + * This is an optional parameter 221 + */ 222 + requestBody?: ModelWithString; 223 + }; 224 + 225 + export class ParametersService { 226 + constructor(public readonly httpRequest: BaseHttpRequest) {} 227 + 228 + /** 229 + * @throws ApiError 230 + */ 231 + public deleteFoo(data: TDataDeleteFoo): CancelablePromise<void> { 232 + const { bar, foo } = data; 233 + return this.httpRequest.request({ 234 + method: 'DELETE', 235 + url: '/api/v{api-version}/foo/{foo}/bar/{bar}', 236 + path: { 237 + foo, 238 + bar, 239 + }, 240 + }); 241 + } 242 + 243 + /** 244 + * @throws ApiError 245 + */ 246 + public callWithParameters(data: TDataCallWithParameters): CancelablePromise<void> { 247 + const { 248 + fooAllOfEnum, 249 + fooRefEnum, 250 + parameterCookie, 251 + parameterForm, 252 + parameterHeader, 253 + parameterPath, 254 + parameterQuery, 255 + requestBody, 256 + } = data; 257 + return this.httpRequest.request({ 258 + method: 'POST', 259 + url: '/api/v{api-version}/parameters/{parameterPath}', 260 + path: { 261 + parameterPath, 262 + }, 263 + cookies: { 264 + parameterCookie, 265 + }, 266 + headers: { 267 + parameterHeader, 268 + }, 269 + query: { 270 + foo_ref_enum: fooRefEnum, 271 + foo_all_of_enum: fooAllOfEnum, 272 + parameterQuery, 273 + }, 274 + formData: { 275 + parameterForm, 276 + }, 277 + body: requestBody, 278 + mediaType: 'application/json', 279 + }); 280 + } 281 + 282 + /** 283 + * @throws ApiError 284 + */ 285 + public callWithWeirdParameterNames(data: TDataCallWithWeirdParameterNames): CancelablePromise<void> { 286 + const { 287 + _default, 288 + parameterCookie, 289 + parameterForm, 290 + parameterHeader, 291 + parameterPath1, 292 + parameterPath2, 293 + parameterPath3, 294 + parameterQuery, 295 + requestBody, 296 + } = data; 297 + return this.httpRequest.request({ 298 + method: 'POST', 299 + url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', 300 + path: { 301 + 'parameter.path.1': parameterPath1, 302 + 'parameter-path-2': parameterPath2, 303 + 'PARAMETER-PATH-3': parameterPath3, 304 + }, 305 + cookies: { 306 + 'PARAMETER-COOKIE': parameterCookie, 307 + }, 308 + headers: { 309 + 'parameter.header': parameterHeader, 310 + }, 311 + query: { 312 + default: _default, 313 + 'parameter-query': parameterQuery, 314 + }, 315 + formData: { 316 + parameter_form: parameterForm, 317 + }, 318 + body: requestBody, 319 + mediaType: 'application/json', 320 + }); 321 + } 322 + 323 + /** 324 + * @throws ApiError 325 + */ 326 + public getCallWithOptionalParam(data: TDataGetCallWithOptionalParam): CancelablePromise<void> { 327 + const { parameter, requestBody } = data; 328 + return this.httpRequest.request({ 329 + method: 'GET', 330 + url: '/api/v{api-version}/parameters/', 331 + query: { 332 + parameter, 333 + }, 334 + body: requestBody, 335 + mediaType: 'application/json', 336 + }); 337 + } 338 + 339 + /** 340 + * @throws ApiError 341 + */ 342 + public postCallWithOptionalParam(data: TDataPostCallWithOptionalParam): CancelablePromise<void> { 343 + const { parameter, requestBody } = data; 344 + return this.httpRequest.request({ 345 + method: 'POST', 346 + url: '/api/v{api-version}/parameters/', 347 + query: { 348 + parameter, 349 + }, 350 + body: requestBody, 351 + mediaType: 'application/json', 352 + }); 353 + } 354 + } 355 + 356 + export type TDataCallWithDescriptions = { 357 + /** 358 + * Testing backticks in string: `backticks` and ```multiple backticks``` should work 359 + */ 360 + parameterWithBackticks?: unknown; 361 + /** 362 + * Testing multiline comments in string: First line 363 + * Second line 364 + * 365 + * Fourth line 366 + */ 367 + parameterWithBreaks?: unknown; 368 + /** 369 + * Testing expression placeholders in string: ${expression} should work 370 + */ 371 + parameterWithExpressionPlaceholders?: unknown; 372 + /** 373 + * Testing quotes in string: 'single quote''' and "double quotes""" should work 374 + */ 375 + parameterWithQuotes?: unknown; 376 + /** 377 + * Testing reserved characters in string: * inline * and ** inline ** should work 378 + */ 379 + parameterWithReservedCharacters?: unknown; 380 + /** 381 + * Testing slashes in string: \backwards\\\ and /forwards/// should work 382 + */ 383 + parameterWithSlashes?: unknown; 384 + }; 385 + 386 + export class DescriptionsService { 387 + constructor(public readonly httpRequest: BaseHttpRequest) {} 388 + 389 + /** 390 + * @throws ApiError 391 + */ 392 + public callWithDescriptions(data: TDataCallWithDescriptions = {}): CancelablePromise<void> { 393 + const { 394 + parameterWithBackticks, 395 + parameterWithBreaks, 396 + parameterWithExpressionPlaceholders, 397 + parameterWithQuotes, 398 + parameterWithReservedCharacters, 399 + parameterWithSlashes, 400 + } = data; 401 + return this.httpRequest.request({ 402 + method: 'POST', 403 + url: '/api/v{api-version}/descriptions/', 404 + query: { 405 + parameterWithBreaks, 406 + parameterWithBackticks, 407 + parameterWithSlashes, 408 + parameterWithExpressionPlaceholders, 409 + parameterWithQuotes, 410 + parameterWithReservedCharacters, 411 + }, 412 + }); 413 + } 414 + } 415 + 416 + export type TDataDeprecatedCall = { 417 + /** 418 + * This parameter is deprecated 419 + */ 420 + parameter: DeprecatedModel | null; 421 + }; 422 + 423 + export class DeprecatedService { 424 + constructor(public readonly httpRequest: BaseHttpRequest) {} 425 + 426 + /** 427 + * @deprecated 428 + * @throws ApiError 429 + */ 430 + public deprecatedCall(data: TDataDeprecatedCall): CancelablePromise<void> { 431 + const { parameter } = data; 432 + return this.httpRequest.request({ 433 + method: 'POST', 434 + url: '/api/v{api-version}/parameters/deprecated', 435 + headers: { 436 + parameter, 437 + }, 438 + }); 439 + } 440 + } 441 + 442 + export type TDataPostApiRequestBody = { 443 + /** 444 + * A reusable request body 445 + */ 446 + foo?: ModelWithString; 447 + /** 448 + * This is a reusable parameter 449 + */ 450 + parameter?: string; 451 + }; 452 + 453 + export class RequestBodyService { 454 + constructor(public readonly httpRequest: BaseHttpRequest) {} 455 + 456 + /** 457 + * @throws ApiError 458 + */ 459 + public postApiRequestBody(data: TDataPostApiRequestBody = {}): CancelablePromise<void> { 460 + const { foo, parameter } = data; 461 + return this.httpRequest.request({ 462 + method: 'POST', 463 + url: '/api/v{api-version}/requestBody/', 464 + query: { 465 + parameter, 466 + }, 467 + body: foo, 468 + mediaType: 'application/json', 469 + }); 470 + } 471 + } 472 + 473 + export type TDataPostApiFormData = { 474 + /** 475 + * A reusable request body 476 + */ 477 + formData?: ModelWithString; 478 + /** 479 + * This is a reusable parameter 480 + */ 481 + parameter?: string; 482 + }; 483 + 484 + export class FormDataService { 485 + constructor(public readonly httpRequest: BaseHttpRequest) {} 486 + 487 + /** 488 + * @throws ApiError 489 + */ 490 + public postApiFormData(data: TDataPostApiFormData = {}): CancelablePromise<void> { 491 + const { formData, parameter } = data; 492 + return this.httpRequest.request({ 493 + method: 'POST', 494 + url: '/api/v{api-version}/formData/', 495 + query: { 496 + parameter, 497 + }, 498 + formData: formData, 499 + mediaType: 'multipart/form-data', 500 + }); 501 + } 502 + } 503 + 504 + export type TDataCallWithDefaultParameters = { 505 + /** 506 + * This is a simple boolean with default value 507 + */ 508 + parameterBoolean?: boolean | null; 509 + /** 510 + * This is a simple enum with default value 511 + */ 512 + parameterEnum?: 'Success' | 'Warning' | 'Error'; 513 + /** 514 + * This is a simple model with default value 515 + */ 516 + parameterModel?: ModelWithString | null; 517 + /** 518 + * This is a simple number with default value 519 + */ 520 + parameterNumber?: number | null; 521 + /** 522 + * This is a simple string with default value 523 + */ 524 + parameterString?: string | null; 525 + }; 526 + export type TDataCallWithDefaultOptionalParameters = { 527 + /** 528 + * This is a simple boolean that is optional with default value 529 + */ 530 + parameterBoolean?: boolean; 531 + /** 532 + * This is a simple enum that is optional with default value 533 + */ 534 + parameterEnum?: 'Success' | 'Warning' | 'Error'; 535 + /** 536 + * This is a simple model that is optional with default value 537 + */ 538 + parameterModel?: ModelWithString; 539 + /** 540 + * This is a simple number that is optional with default value 541 + */ 542 + parameterNumber?: number; 543 + /** 544 + * This is a simple string that is optional with default value 545 + */ 546 + parameterString?: string; 547 + }; 548 + export type TDataCallToTestOrderOfParams = { 549 + /** 550 + * This is a optional string with default 551 + */ 552 + parameterOptionalStringWithDefault?: string; 553 + /** 554 + * This is a optional string with empty default 555 + */ 556 + parameterOptionalStringWithEmptyDefault?: string; 557 + /** 558 + * This is a optional string with no default 559 + */ 560 + parameterOptionalStringWithNoDefault?: string; 561 + /** 562 + * This is a string that can be null with default 563 + */ 564 + parameterStringNullableWithDefault?: string | null; 565 + /** 566 + * This is a string that can be null with no default 567 + */ 568 + parameterStringNullableWithNoDefault?: string | null; 569 + /** 570 + * This is a string with default 571 + */ 572 + parameterStringWithDefault?: string; 573 + /** 574 + * This is a string with empty default 575 + */ 576 + parameterStringWithEmptyDefault?: string; 577 + /** 578 + * This is a string with no default 579 + */ 580 + parameterStringWithNoDefault: string; 581 + }; 582 + 583 + export class DefaultsService { 584 + constructor(public readonly httpRequest: BaseHttpRequest) {} 585 + 586 + /** 587 + * @throws ApiError 588 + */ 589 + public callWithDefaultParameters(data: TDataCallWithDefaultParameters = {}): CancelablePromise<void> { 590 + const { 591 + parameterBoolean = true, 592 + parameterEnum = 'Success', 593 + parameterModel = { 594 + prop: 'Hello World!', 595 + }, 596 + parameterNumber = 123, 597 + parameterString = 'Hello World!', 598 + } = data; 599 + return this.httpRequest.request({ 600 + method: 'GET', 601 + url: '/api/v{api-version}/defaults', 602 + query: { 603 + parameterString, 604 + parameterNumber, 605 + parameterBoolean, 606 + parameterEnum, 607 + parameterModel, 608 + }, 609 + }); 610 + } 611 + 612 + /** 613 + * @throws ApiError 614 + */ 615 + public callWithDefaultOptionalParameters( 616 + data: TDataCallWithDefaultOptionalParameters = {} 617 + ): CancelablePromise<void> { 618 + const { 619 + parameterBoolean = true, 620 + parameterEnum = 'Success', 621 + parameterModel = { 622 + prop: 'Hello World!', 623 + }, 624 + parameterNumber = 123, 625 + parameterString = 'Hello World!', 626 + } = data; 627 + return this.httpRequest.request({ 628 + method: 'POST', 629 + url: '/api/v{api-version}/defaults', 630 + query: { 631 + parameterString, 632 + parameterNumber, 633 + parameterBoolean, 634 + parameterEnum, 635 + parameterModel, 636 + }, 637 + }); 638 + } 639 + 640 + /** 641 + * @throws ApiError 642 + */ 643 + public callToTestOrderOfParams(data: TDataCallToTestOrderOfParams): CancelablePromise<void> { 644 + const { 645 + parameterOptionalStringWithDefault = 'Hello World!', 646 + parameterOptionalStringWithEmptyDefault = '', 647 + parameterOptionalStringWithNoDefault, 648 + parameterStringNullableWithDefault = null, 649 + parameterStringNullableWithNoDefault, 650 + parameterStringWithDefault = 'Hello World!', 651 + parameterStringWithEmptyDefault = '', 652 + parameterStringWithNoDefault, 653 + } = data; 654 + return this.httpRequest.request({ 655 + method: 'PUT', 656 + url: '/api/v{api-version}/defaults', 657 + query: { 658 + parameterOptionalStringWithDefault, 659 + parameterOptionalStringWithEmptyDefault, 660 + parameterOptionalStringWithNoDefault, 661 + parameterStringWithDefault, 662 + parameterStringWithEmptyDefault, 663 + parameterStringWithNoDefault, 664 + parameterStringNullableWithNoDefault, 665 + parameterStringNullableWithDefault, 666 + }, 667 + }); 668 + } 669 + } 670 + 671 + export class DuplicateService { 672 + constructor(public readonly httpRequest: BaseHttpRequest) {} 673 + 674 + /** 675 + * @throws ApiError 676 + */ 677 + public duplicateName(): CancelablePromise<void> { 678 + return this.httpRequest.request({ 679 + method: 'GET', 680 + url: '/api/v{api-version}/duplicate', 681 + }); 682 + } 683 + 684 + /** 685 + * @throws ApiError 686 + */ 687 + public duplicateName1(): CancelablePromise<void> { 688 + return this.httpRequest.request({ 689 + method: 'POST', 690 + url: '/api/v{api-version}/duplicate', 691 + }); 692 + } 693 + 694 + /** 695 + * @throws ApiError 696 + */ 697 + public duplicateName2(): CancelablePromise<void> { 698 + return this.httpRequest.request({ 699 + method: 'PUT', 700 + url: '/api/v{api-version}/duplicate', 701 + }); 702 + } 703 + 704 + /** 705 + * @throws ApiError 706 + */ 707 + public duplicateName3(): CancelablePromise<void> { 708 + return this.httpRequest.request({ 709 + method: 'DELETE', 710 + url: '/api/v{api-version}/duplicate', 711 + }); 712 + } 713 + } 714 + 715 + export class NoContentService { 716 + constructor(public readonly httpRequest: BaseHttpRequest) {} 717 + 718 + /** 719 + * @returns void Success 720 + * @throws ApiError 721 + */ 722 + public callWithNoContentResponse(): CancelablePromise<void> { 723 + return this.httpRequest.request({ 724 + method: 'GET', 725 + url: '/api/v{api-version}/no-content', 726 + }); 727 + } 728 + 729 + /** 730 + * @returns number Response is a simple number 731 + * @returns void Success 732 + * @throws ApiError 733 + */ 734 + public callWithResponseAndNoContentResponse(): CancelablePromise<number | void> { 735 + return this.httpRequest.request({ 736 + method: 'GET', 737 + url: '/api/v{api-version}/multiple-tags/response-and-no-content', 738 + }); 739 + } 740 + } 741 + 742 + export class ResponseService { 743 + constructor(public readonly httpRequest: BaseHttpRequest) {} 744 + 745 + /** 746 + * @returns number Response is a simple number 747 + * @returns void Success 748 + * @throws ApiError 749 + */ 750 + public callWithResponseAndNoContentResponse(): CancelablePromise<number | void> { 751 + return this.httpRequest.request({ 752 + method: 'GET', 753 + url: '/api/v{api-version}/multiple-tags/response-and-no-content', 754 + }); 755 + } 756 + 757 + /** 758 + * @returns ModelWithString 759 + * @throws ApiError 760 + */ 761 + public callWithResponse(): CancelablePromise<ModelWithString> { 762 + return this.httpRequest.request({ 763 + method: 'GET', 764 + url: '/api/v{api-version}/response', 765 + }); 766 + } 767 + 768 + /** 769 + * @returns ModelWithString Message for default response 770 + * @throws ApiError 771 + */ 772 + public callWithDuplicateResponses(): CancelablePromise<ModelWithString> { 773 + return this.httpRequest.request({ 774 + method: 'POST', 775 + url: '/api/v{api-version}/response', 776 + errors: { 777 + 500: `Message for 500 error`, 778 + 501: `Message for 501 error`, 779 + 502: `Message for 502 error`, 780 + }, 781 + }); 782 + } 783 + 784 + /** 785 + * @returns any Message for 200 response 786 + * @returns ModelWithString Message for default response 787 + * @returns ModelThatExtends Message for 201 response 788 + * @returns ModelThatExtendsExtends Message for 202 response 789 + * @throws ApiError 790 + */ 791 + public callWithResponses(): CancelablePromise< 792 + | { 793 + readonly '@namespace.string'?: string; 794 + readonly '@namespace.integer'?: number; 795 + readonly value?: Array<ModelWithString>; 796 + } 797 + | ModelWithString 798 + | ModelThatExtends 799 + | ModelThatExtendsExtends 800 + > { 801 + return this.httpRequest.request({ 802 + method: 'PUT', 803 + url: '/api/v{api-version}/response', 804 + errors: { 805 + 500: `Message for 500 error`, 806 + 501: `Message for 501 error`, 807 + 502: `Message for 502 error`, 808 + }, 809 + }); 810 + } 811 + } 812 + 813 + export class MultipleTags1Service { 814 + constructor(public readonly httpRequest: BaseHttpRequest) {} 815 + 816 + /** 817 + * @returns void Success 818 + * @throws ApiError 819 + */ 820 + public dummyA(): CancelablePromise<void> { 821 + return this.httpRequest.request({ 822 + method: 'GET', 823 + url: '/api/v{api-version}/multiple-tags/a', 824 + }); 825 + } 826 + 827 + /** 828 + * @returns void Success 829 + * @throws ApiError 830 + */ 831 + public dummyB(): CancelablePromise<void> { 832 + return this.httpRequest.request({ 833 + method: 'GET', 834 + url: '/api/v{api-version}/multiple-tags/b', 835 + }); 836 + } 837 + } 838 + 839 + export class MultipleTags2Service { 840 + constructor(public readonly httpRequest: BaseHttpRequest) {} 841 + 842 + /** 843 + * @returns void Success 844 + * @throws ApiError 845 + */ 846 + public dummyA(): CancelablePromise<void> { 847 + return this.httpRequest.request({ 848 + method: 'GET', 849 + url: '/api/v{api-version}/multiple-tags/a', 850 + }); 851 + } 852 + 853 + /** 854 + * @returns void Success 855 + * @throws ApiError 856 + */ 857 + public dummyB(): CancelablePromise<void> { 858 + return this.httpRequest.request({ 859 + method: 'GET', 860 + url: '/api/v{api-version}/multiple-tags/b', 861 + }); 862 + } 863 + } 864 + 865 + export class MultipleTags3Service { 866 + constructor(public readonly httpRequest: BaseHttpRequest) {} 867 + 868 + /** 869 + * @returns void Success 870 + * @throws ApiError 871 + */ 872 + public dummyB(): CancelablePromise<void> { 873 + return this.httpRequest.request({ 874 + method: 'GET', 875 + url: '/api/v{api-version}/multiple-tags/b', 876 + }); 877 + } 878 + } 879 + 880 + export type TDataCollectionFormat = { 881 + /** 882 + * This is an array parameter that is sent as csv format (comma-separated values) 883 + */ 884 + parameterArrayCsv: Array<string> | null; 885 + /** 886 + * This is an array parameter that is sent as multi format (multiple parameter instances) 887 + */ 888 + parameterArrayMulti: Array<string> | null; 889 + /** 890 + * This is an array parameter that is sent as pipes format (pipe-separated values) 891 + */ 892 + parameterArrayPipes: Array<string> | null; 893 + /** 894 + * This is an array parameter that is sent as ssv format (space-separated values) 895 + */ 896 + parameterArraySsv: Array<string> | null; 897 + /** 898 + * This is an array parameter that is sent as tsv format (tab-separated values) 899 + */ 900 + parameterArrayTsv: Array<string> | null; 901 + }; 902 + 903 + export class CollectionFormatService { 904 + constructor(public readonly httpRequest: BaseHttpRequest) {} 905 + 906 + /** 907 + * @throws ApiError 908 + */ 909 + public collectionFormat(data: TDataCollectionFormat): CancelablePromise<void> { 910 + const { parameterArrayCsv, parameterArrayMulti, parameterArrayPipes, parameterArraySsv, parameterArrayTsv } = 911 + data; 912 + return this.httpRequest.request({ 913 + method: 'GET', 914 + url: '/api/v{api-version}/collectionFormat', 915 + query: { 916 + parameterArrayCSV: parameterArrayCsv, 917 + parameterArraySSV: parameterArraySsv, 918 + parameterArrayTSV: parameterArrayTsv, 919 + parameterArrayPipes, 920 + parameterArrayMulti, 921 + }, 922 + }); 923 + } 924 + } 925 + 926 + export type TDataTypes = { 927 + /** 928 + * This is a number parameter 929 + */ 930 + id?: number; 931 + /** 932 + * This is an array parameter 933 + */ 934 + parameterArray: Array<string> | null; 935 + /** 936 + * This is a boolean parameter 937 + */ 938 + parameterBoolean?: boolean | null; 939 + /** 940 + * This is a dictionary parameter 941 + */ 942 + parameterDictionary: Record<string, unknown> | null; 943 + /** 944 + * This is an enum parameter 945 + */ 946 + parameterEnum: 'Success' | 'Warning' | 'Error' | null; 947 + /** 948 + * This is a number parameter 949 + */ 950 + parameterNumber?: number; 951 + /** 952 + * This is an object parameter 953 + */ 954 + parameterObject?: Record<string, unknown> | null; 955 + /** 956 + * This is a string parameter 957 + */ 958 + parameterString?: string | null; 959 + }; 960 + 961 + export class TypesService { 962 + constructor(public readonly httpRequest: BaseHttpRequest) {} 963 + 964 + /** 965 + * @returns number Response is a simple number 966 + * @returns string Response is a simple string 967 + * @returns boolean Response is a simple boolean 968 + * @returns unknown Response is a simple object 969 + * @throws ApiError 970 + */ 971 + public types(data: TDataTypes): CancelablePromise<number | string | boolean | Record<string, unknown>> { 972 + const { 973 + id, 974 + parameterArray, 975 + parameterBoolean = true, 976 + parameterDictionary, 977 + parameterEnum, 978 + parameterNumber = 123, 979 + parameterObject = null, 980 + parameterString = 'default', 981 + } = data; 982 + return this.httpRequest.request({ 983 + method: 'GET', 984 + url: '/api/v{api-version}/types', 985 + path: { 986 + id, 987 + }, 988 + query: { 989 + parameterNumber, 990 + parameterString, 991 + parameterBoolean, 992 + parameterObject, 993 + parameterArray, 994 + parameterDictionary, 995 + parameterEnum, 996 + }, 997 + }); 998 + } 999 + } 1000 + 1001 + export type TDataUploadFile = { 1002 + /** 1003 + * Supply a file reference for upload 1004 + */ 1005 + file: Blob | File; 1006 + }; 1007 + 1008 + export class UploadService { 1009 + constructor(public readonly httpRequest: BaseHttpRequest) {} 1010 + 1011 + /** 1012 + * @returns boolean 1013 + * @throws ApiError 1014 + */ 1015 + public uploadFile(data: TDataUploadFile): CancelablePromise<boolean> { 1016 + const { file } = data; 1017 + return this.httpRequest.request({ 1018 + method: 'POST', 1019 + url: '/api/v{api-version}/upload', 1020 + formData: { 1021 + file, 1022 + }, 1023 + }); 1024 + } 1025 + } 1026 + 1027 + export type TDataFileResponse = { 1028 + id: string; 1029 + }; 1030 + 1031 + export class FileResponseService { 1032 + constructor(public readonly httpRequest: BaseHttpRequest) {} 1033 + 1034 + /** 1035 + * @returns binary Success 1036 + * @throws ApiError 1037 + */ 1038 + public fileResponse(data: TDataFileResponse): CancelablePromise<Blob | File> { 1039 + const { id } = data; 1040 + return this.httpRequest.request({ 1041 + method: 'GET', 1042 + url: '/api/v{api-version}/file/{id}', 1043 + path: { 1044 + id, 1045 + }, 1046 + }); 1047 + } 1048 + } 1049 + 1050 + export type TDataComplexTypes = { 1051 + /** 1052 + * Parameter containing object 1053 + */ 1054 + parameterObject: { 1055 + first?: { 1056 + second?: { 1057 + third?: string; 1058 + }; 1059 + }; 1060 + }; 1061 + /** 1062 + * Parameter containing reference 1063 + */ 1064 + parameterReference: ModelWithString; 1065 + }; 1066 + export type TDataComplexParams = { 1067 + id: number; 1068 + requestBody?: { 1069 + readonly key: string | null; 1070 + name: string | null; 1071 + enabled?: boolean; 1072 + readonly type: 'Monkey' | 'Horse' | 'Bird'; 1073 + listOfModels?: Array<ModelWithString> | null; 1074 + listOfStrings?: Array<string> | null; 1075 + parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; 1076 + readonly user?: { 1077 + readonly id?: number; 1078 + readonly name?: string | null; 1079 + }; 1080 + }; 1081 + }; 1082 + 1083 + export class ComplexService { 1084 + constructor(public readonly httpRequest: BaseHttpRequest) {} 1085 + 1086 + /** 1087 + * @returns ModelWithString Successful response 1088 + * @throws ApiError 1089 + */ 1090 + public complexTypes(data: TDataComplexTypes): CancelablePromise<Array<ModelWithString>> { 1091 + const { parameterObject, parameterReference } = data; 1092 + return this.httpRequest.request({ 1093 + method: 'GET', 1094 + url: '/api/v{api-version}/complex', 1095 + query: { 1096 + parameterObject, 1097 + parameterReference, 1098 + }, 1099 + errors: { 1100 + 400: `400 server error`, 1101 + 500: `500 server error`, 1102 + }, 1103 + }); 1104 + } 1105 + 1106 + /** 1107 + * @returns ModelWithString Success 1108 + * @throws ApiError 1109 + */ 1110 + public complexParams(data: TDataComplexParams): CancelablePromise<ModelWithString> { 1111 + const { id, requestBody } = data; 1112 + return this.httpRequest.request({ 1113 + method: 'PUT', 1114 + url: '/api/v{api-version}/complex/{id}', 1115 + path: { 1116 + id, 1117 + }, 1118 + body: requestBody, 1119 + mediaType: 'application/json-patch+json', 1120 + }); 1121 + } 1122 + } 1123 + 1124 + export type TDataMultipartRequest = { 1125 + formData?: { 1126 + content?: Blob | File; 1127 + data?: ModelWithString | null; 1128 + }; 1129 + }; 1130 + 1131 + export class MultipartService { 1132 + constructor(public readonly httpRequest: BaseHttpRequest) {} 1133 + 1134 + /** 1135 + * @throws ApiError 1136 + */ 1137 + public multipartRequest(data: TDataMultipartRequest = {}): CancelablePromise<void> { 1138 + const { formData } = data; 1139 + return this.httpRequest.request({ 1140 + method: 'POST', 1141 + url: '/api/v{api-version}/multipart', 1142 + formData: formData, 1143 + mediaType: 'multipart/form-data', 1144 + }); 1145 + } 1146 + 1147 + /** 1148 + * @returns any OK 1149 + * @throws ApiError 1150 + */ 1151 + public multipartResponse(): CancelablePromise<{ 1152 + file?: Blob | File; 1153 + metadata?: { 1154 + foo?: string; 1155 + bar?: string; 1156 + }; 1157 + }> { 1158 + return this.httpRequest.request({ 1159 + method: 'GET', 1160 + url: '/api/v{api-version}/multipart', 1161 + }); 1162 + } 1163 + } 1164 + 1165 + export class HeaderService { 1166 + constructor(public readonly httpRequest: BaseHttpRequest) {} 1167 + 1168 + /** 1169 + * @returns string Successful response 1170 + * @throws ApiError 1171 + */ 1172 + public callWithResultFromHeader(): CancelablePromise<string> { 1173 + return this.httpRequest.request({ 1174 + method: 'POST', 1175 + url: '/api/v{api-version}/header', 1176 + responseHeader: 'operation-location', 1177 + errors: { 1178 + 400: `400 server error`, 1179 + 500: `500 server error`, 1180 + }, 1181 + }); 1182 + } 1183 + } 1184 + 1185 + export type TDataTestErrorCode = { 1186 + /** 1187 + * Status code to return 1188 + */ 1189 + status: number; 1190 + }; 1191 + 1192 + export class ErrorService { 1193 + constructor(public readonly httpRequest: BaseHttpRequest) {} 1194 + 1195 + /** 1196 + * @returns any Custom message: Successful response 1197 + * @throws ApiError 1198 + */ 1199 + public testErrorCode(data: TDataTestErrorCode): CancelablePromise<any> { 1200 + const { status } = data; 1201 + return this.httpRequest.request({ 1202 + method: 'POST', 1203 + url: '/api/v{api-version}/error', 1204 + query: { 1205 + status, 1206 + }, 1207 + errors: { 1208 + 500: `Custom message: Internal Server Error`, 1209 + 501: `Custom message: Not Implemented`, 1210 + 502: `Custom message: Bad Gateway`, 1211 + 503: `Custom message: Service Unavailable`, 1212 + }, 1213 + }); 1214 + } 1215 + } 1216 + 1217 + export type TDataNonAsciiæøåÆøÅöôêÊ字符串 = { 1218 + /** 1219 + * Dummy input param 1220 + */ 1221 + nonAsciiParamæøåÆøÅöôêÊ: number; 1222 + }; 1223 + 1224 + export class NonAsciiÆøåÆøÅöôêÊService { 1225 + constructor(public readonly httpRequest: BaseHttpRequest) {} 1226 + 1227 + /** 1228 + * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response 1229 + * @throws ApiError 1230 + */ 1231 + public nonAsciiæøåÆøÅöôêÊ字符串( 1232 + data: TDataNonAsciiæøåÆøÅöôêÊ字符串 1233 + ): CancelablePromise<Array<NonAsciiStringæøåÆØÅöôêÊ字符串>> { 1234 + const { nonAsciiParamæøåÆøÅöôêÊ } = data; 1235 + return this.httpRequest.request({ 1236 + method: 'POST', 1237 + url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 1238 + query: { 1239 + nonAsciiParamæøåÆØÅöôêÊ: nonAsciiParamæøåÆøÅöôêÊ, 1240 + }, 1241 + }); 1242 + } 1243 + }
-48
test/__snapshots__/v3_client/services/CollectionFormatService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 3 - 4 - export type TDataCollectionFormat = { 5 - /** 6 - * This is an array parameter that is sent as csv format (comma-separated values) 7 - */ 8 - parameterArrayCsv: Array<string> | null; 9 - /** 10 - * This is an array parameter that is sent as multi format (multiple parameter instances) 11 - */ 12 - parameterArrayMulti: Array<string> | null; 13 - /** 14 - * This is an array parameter that is sent as pipes format (pipe-separated values) 15 - */ 16 - parameterArrayPipes: Array<string> | null; 17 - /** 18 - * This is an array parameter that is sent as ssv format (space-separated values) 19 - */ 20 - parameterArraySsv: Array<string> | null; 21 - /** 22 - * This is an array parameter that is sent as tsv format (tab-separated values) 23 - */ 24 - parameterArrayTsv: Array<string> | null; 25 - }; 26 - 27 - export class CollectionFormatService { 28 - constructor(public readonly httpRequest: BaseHttpRequest) {} 29 - 30 - /** 31 - * @throws ApiError 32 - */ 33 - public collectionFormat(data: TDataCollectionFormat): CancelablePromise<void> { 34 - const { parameterArrayCsv, parameterArrayMulti, parameterArrayPipes, parameterArraySsv, parameterArrayTsv } = 35 - data; 36 - return this.httpRequest.request({ 37 - method: 'GET', 38 - url: '/api/v{api-version}/collectionFormat', 39 - query: { 40 - parameterArrayCSV: parameterArrayCsv, 41 - parameterArraySSV: parameterArraySsv, 42 - parameterArrayTSV: parameterArrayTsv, 43 - parameterArrayPipes, 44 - parameterArrayMulti, 45 - }, 46 - }); 47 - } 48 - }
-77
test/__snapshots__/v3_client/services/ComplexService.ts.snap
··· 1 - import type { ModelWithArray, ModelWithDictionary, ModelWithEnum, ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 4 - 5 - export type TDataComplexTypes = { 6 - /** 7 - * Parameter containing object 8 - */ 9 - parameterObject: { 10 - first?: { 11 - second?: { 12 - third?: string; 13 - }; 14 - }; 15 - }; 16 - /** 17 - * Parameter containing reference 18 - */ 19 - parameterReference: ModelWithString; 20 - }; 21 - export type TDataComplexParams = { 22 - id: number; 23 - requestBody?: { 24 - readonly key: string | null; 25 - name: string | null; 26 - enabled?: boolean; 27 - readonly type: 'Monkey' | 'Horse' | 'Bird'; 28 - listOfModels?: Array<ModelWithString> | null; 29 - listOfStrings?: Array<string> | null; 30 - parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; 31 - readonly user?: { 32 - readonly id?: number; 33 - readonly name?: string | null; 34 - }; 35 - }; 36 - }; 37 - 38 - export class ComplexService { 39 - constructor(public readonly httpRequest: BaseHttpRequest) {} 40 - 41 - /** 42 - * @returns ModelWithString Successful response 43 - * @throws ApiError 44 - */ 45 - public complexTypes(data: TDataComplexTypes): CancelablePromise<Array<ModelWithString>> { 46 - const { parameterObject, parameterReference } = data; 47 - return this.httpRequest.request({ 48 - method: 'GET', 49 - url: '/api/v{api-version}/complex', 50 - query: { 51 - parameterObject, 52 - parameterReference, 53 - }, 54 - errors: { 55 - 400: `400 server error`, 56 - 500: `500 server error`, 57 - }, 58 - }); 59 - } 60 - 61 - /** 62 - * @returns ModelWithString Success 63 - * @throws ApiError 64 - */ 65 - public complexParams(data: TDataComplexParams): CancelablePromise<ModelWithString> { 66 - const { id, requestBody } = data; 67 - return this.httpRequest.request({ 68 - method: 'PUT', 69 - url: '/api/v{api-version}/complex/{id}', 70 - path: { 71 - id, 72 - }, 73 - body: requestBody, 74 - mediaType: 'application/json-patch+json', 75 - }); 76 - } 77 - }
-37
test/__snapshots__/v3_client/services/DefaultService.ts.snap
··· 1 - import type { ModelWithArrayReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnly } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 4 - 5 - export type TDataPostServiceWithEmptyTag = { 6 - requestBody: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 7 - }; 8 - 9 - export class DefaultService { 10 - constructor(public readonly httpRequest: BaseHttpRequest) {} 11 - 12 - /** 13 - * @throws ApiError 14 - */ 15 - public serviceWithEmptyTag(): CancelablePromise<void> { 16 - return this.httpRequest.request({ 17 - method: 'GET', 18 - url: '/api/v{api-version}/no-tag', 19 - }); 20 - } 21 - 22 - /** 23 - * @returns ModelWithReadOnlyAndWriteOnly 24 - * @throws ApiError 25 - */ 26 - public postServiceWithEmptyTag( 27 - data: TDataPostServiceWithEmptyTag 28 - ): CancelablePromise<ModelWithReadOnlyAndWriteOnly> { 29 - const { requestBody } = data; 30 - return this.httpRequest.request({ 31 - method: 'POST', 32 - url: '/api/v{api-version}/no-tag', 33 - body: requestBody, 34 - mediaType: 'application/json', 35 - }); 36 - } 37 - }
-170
test/__snapshots__/v3_client/services/DefaultsService.ts.snap
··· 1 - import type { ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 4 - 5 - export type TDataCallWithDefaultParameters = { 6 - /** 7 - * This is a simple boolean with default value 8 - */ 9 - parameterBoolean?: boolean | null; 10 - /** 11 - * This is a simple enum with default value 12 - */ 13 - parameterEnum?: 'Success' | 'Warning' | 'Error'; 14 - /** 15 - * This is a simple model with default value 16 - */ 17 - parameterModel?: ModelWithString | null; 18 - /** 19 - * This is a simple number with default value 20 - */ 21 - parameterNumber?: number | null; 22 - /** 23 - * This is a simple string with default value 24 - */ 25 - parameterString?: string | null; 26 - }; 27 - export type TDataCallWithDefaultOptionalParameters = { 28 - /** 29 - * This is a simple boolean that is optional with default value 30 - */ 31 - parameterBoolean?: boolean; 32 - /** 33 - * This is a simple enum that is optional with default value 34 - */ 35 - parameterEnum?: 'Success' | 'Warning' | 'Error'; 36 - /** 37 - * This is a simple model that is optional with default value 38 - */ 39 - parameterModel?: ModelWithString; 40 - /** 41 - * This is a simple number that is optional with default value 42 - */ 43 - parameterNumber?: number; 44 - /** 45 - * This is a simple string that is optional with default value 46 - */ 47 - parameterString?: string; 48 - }; 49 - export type TDataCallToTestOrderOfParams = { 50 - /** 51 - * This is a optional string with default 52 - */ 53 - parameterOptionalStringWithDefault?: string; 54 - /** 55 - * This is a optional string with empty default 56 - */ 57 - parameterOptionalStringWithEmptyDefault?: string; 58 - /** 59 - * This is a optional string with no default 60 - */ 61 - parameterOptionalStringWithNoDefault?: string; 62 - /** 63 - * This is a string that can be null with default 64 - */ 65 - parameterStringNullableWithDefault?: string | null; 66 - /** 67 - * This is a string that can be null with no default 68 - */ 69 - parameterStringNullableWithNoDefault?: string | null; 70 - /** 71 - * This is a string with default 72 - */ 73 - parameterStringWithDefault?: string; 74 - /** 75 - * This is a string with empty default 76 - */ 77 - parameterStringWithEmptyDefault?: string; 78 - /** 79 - * This is a string with no default 80 - */ 81 - parameterStringWithNoDefault: string; 82 - }; 83 - 84 - export class DefaultsService { 85 - constructor(public readonly httpRequest: BaseHttpRequest) {} 86 - 87 - /** 88 - * @throws ApiError 89 - */ 90 - public callWithDefaultParameters(data: TDataCallWithDefaultParameters = {}): CancelablePromise<void> { 91 - const { 92 - parameterBoolean = true, 93 - parameterEnum = 'Success', 94 - parameterModel = { 95 - prop: 'Hello World!', 96 - }, 97 - parameterNumber = 123, 98 - parameterString = 'Hello World!', 99 - } = data; 100 - return this.httpRequest.request({ 101 - method: 'GET', 102 - url: '/api/v{api-version}/defaults', 103 - query: { 104 - parameterString, 105 - parameterNumber, 106 - parameterBoolean, 107 - parameterEnum, 108 - parameterModel, 109 - }, 110 - }); 111 - } 112 - 113 - /** 114 - * @throws ApiError 115 - */ 116 - public callWithDefaultOptionalParameters( 117 - data: TDataCallWithDefaultOptionalParameters = {} 118 - ): CancelablePromise<void> { 119 - const { 120 - parameterBoolean = true, 121 - parameterEnum = 'Success', 122 - parameterModel = { 123 - prop: 'Hello World!', 124 - }, 125 - parameterNumber = 123, 126 - parameterString = 'Hello World!', 127 - } = data; 128 - return this.httpRequest.request({ 129 - method: 'POST', 130 - url: '/api/v{api-version}/defaults', 131 - query: { 132 - parameterString, 133 - parameterNumber, 134 - parameterBoolean, 135 - parameterEnum, 136 - parameterModel, 137 - }, 138 - }); 139 - } 140 - 141 - /** 142 - * @throws ApiError 143 - */ 144 - public callToTestOrderOfParams(data: TDataCallToTestOrderOfParams): CancelablePromise<void> { 145 - const { 146 - parameterOptionalStringWithDefault = 'Hello World!', 147 - parameterOptionalStringWithEmptyDefault = '', 148 - parameterOptionalStringWithNoDefault, 149 - parameterStringNullableWithDefault = null, 150 - parameterStringNullableWithNoDefault, 151 - parameterStringWithDefault = 'Hello World!', 152 - parameterStringWithEmptyDefault = '', 153 - parameterStringWithNoDefault, 154 - } = data; 155 - return this.httpRequest.request({ 156 - method: 'PUT', 157 - url: '/api/v{api-version}/defaults', 158 - query: { 159 - parameterOptionalStringWithDefault, 160 - parameterOptionalStringWithEmptyDefault, 161 - parameterOptionalStringWithNoDefault, 162 - parameterStringWithDefault, 163 - parameterStringWithEmptyDefault, 164 - parameterStringWithNoDefault, 165 - parameterStringNullableWithNoDefault, 166 - parameterStringNullableWithDefault, 167 - }, 168 - }); 169 - } 170 - }
-29
test/__snapshots__/v3_client/services/DeprecatedService.ts.snap
··· 1 - import type { DeprecatedModel } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 4 - 5 - export type TDataDeprecatedCall = { 6 - /** 7 - * This parameter is deprecated 8 - */ 9 - parameter: DeprecatedModel | null; 10 - }; 11 - 12 - export class DeprecatedService { 13 - constructor(public readonly httpRequest: BaseHttpRequest) {} 14 - 15 - /** 16 - * @deprecated 17 - * @throws ApiError 18 - */ 19 - public deprecatedCall(data: TDataDeprecatedCall): CancelablePromise<void> { 20 - const { parameter } = data; 21 - return this.httpRequest.request({ 22 - method: 'POST', 23 - url: '/api/v{api-version}/parameters/deprecated', 24 - headers: { 25 - parameter, 26 - }, 27 - }); 28 - } 29 - }
-62
test/__snapshots__/v3_client/services/DescriptionsService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 3 - 4 - export type TDataCallWithDescriptions = { 5 - /** 6 - * Testing backticks in string: `backticks` and ```multiple backticks``` should work 7 - */ 8 - parameterWithBackticks?: unknown; 9 - /** 10 - * Testing multiline comments in string: First line 11 - * Second line 12 - * 13 - * Fourth line 14 - */ 15 - parameterWithBreaks?: unknown; 16 - /** 17 - * Testing expression placeholders in string: ${expression} should work 18 - */ 19 - parameterWithExpressionPlaceholders?: unknown; 20 - /** 21 - * Testing quotes in string: 'single quote''' and "double quotes""" should work 22 - */ 23 - parameterWithQuotes?: unknown; 24 - /** 25 - * Testing reserved characters in string: * inline * and ** inline ** should work 26 - */ 27 - parameterWithReservedCharacters?: unknown; 28 - /** 29 - * Testing slashes in string: \backwards\\\ and /forwards/// should work 30 - */ 31 - parameterWithSlashes?: unknown; 32 - }; 33 - 34 - export class DescriptionsService { 35 - constructor(public readonly httpRequest: BaseHttpRequest) {} 36 - 37 - /** 38 - * @throws ApiError 39 - */ 40 - public callWithDescriptions(data: TDataCallWithDescriptions = {}): CancelablePromise<void> { 41 - const { 42 - parameterWithBackticks, 43 - parameterWithBreaks, 44 - parameterWithExpressionPlaceholders, 45 - parameterWithQuotes, 46 - parameterWithReservedCharacters, 47 - parameterWithSlashes, 48 - } = data; 49 - return this.httpRequest.request({ 50 - method: 'POST', 51 - url: '/api/v{api-version}/descriptions/', 52 - query: { 53 - parameterWithBreaks, 54 - parameterWithBackticks, 55 - parameterWithSlashes, 56 - parameterWithExpressionPlaceholders, 57 - parameterWithQuotes, 58 - parameterWithReservedCharacters, 59 - }, 60 - }); 61 - } 62 - }
-46
test/__snapshots__/v3_client/services/DuplicateService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 3 - 4 - export class DuplicateService { 5 - constructor(public readonly httpRequest: BaseHttpRequest) {} 6 - 7 - /** 8 - * @throws ApiError 9 - */ 10 - public duplicateName(): CancelablePromise<void> { 11 - return this.httpRequest.request({ 12 - method: 'GET', 13 - url: '/api/v{api-version}/duplicate', 14 - }); 15 - } 16 - 17 - /** 18 - * @throws ApiError 19 - */ 20 - public duplicateName1(): CancelablePromise<void> { 21 - return this.httpRequest.request({ 22 - method: 'POST', 23 - url: '/api/v{api-version}/duplicate', 24 - }); 25 - } 26 - 27 - /** 28 - * @throws ApiError 29 - */ 30 - public duplicateName2(): CancelablePromise<void> { 31 - return this.httpRequest.request({ 32 - method: 'PUT', 33 - url: '/api/v{api-version}/duplicate', 34 - }); 35 - } 36 - 37 - /** 38 - * @throws ApiError 39 - */ 40 - public duplicateName3(): CancelablePromise<void> { 41 - return this.httpRequest.request({ 42 - method: 'DELETE', 43 - url: '/api/v{api-version}/duplicate', 44 - }); 45 - } 46 - }
-34
test/__snapshots__/v3_client/services/ErrorService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 3 - 4 - export type TDataTestErrorCode = { 5 - /** 6 - * Status code to return 7 - */ 8 - status: number; 9 - }; 10 - 11 - export class ErrorService { 12 - constructor(public readonly httpRequest: BaseHttpRequest) {} 13 - 14 - /** 15 - * @returns any Custom message: Successful response 16 - * @throws ApiError 17 - */ 18 - public testErrorCode(data: TDataTestErrorCode): CancelablePromise<any> { 19 - const { status } = data; 20 - return this.httpRequest.request({ 21 - method: 'POST', 22 - url: '/api/v{api-version}/error', 23 - query: { 24 - status, 25 - }, 26 - errors: { 27 - 500: `Custom message: Internal Server Error`, 28 - 501: `Custom message: Not Implemented`, 29 - 502: `Custom message: Bad Gateway`, 30 - 503: `Custom message: Service Unavailable`, 31 - }, 32 - }); 33 - } 34 - }
-25
test/__snapshots__/v3_client/services/FileResponseService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 3 - 4 - export type TDataFileResponse = { 5 - id: string; 6 - }; 7 - 8 - export class FileResponseService { 9 - constructor(public readonly httpRequest: BaseHttpRequest) {} 10 - 11 - /** 12 - * @returns binary Success 13 - * @throws ApiError 14 - */ 15 - public fileResponse(data: TDataFileResponse): CancelablePromise<Blob | File> { 16 - const { id } = data; 17 - return this.httpRequest.request({ 18 - method: 'GET', 19 - url: '/api/v{api-version}/file/{id}', 20 - path: { 21 - id, 22 - }, 23 - }); 24 - } 25 - }
-34
test/__snapshots__/v3_client/services/FormDataService.ts.snap
··· 1 - import type { ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 4 - 5 - export type TDataPostApiFormData = { 6 - /** 7 - * A reusable request body 8 - */ 9 - formData?: ModelWithString; 10 - /** 11 - * This is a reusable parameter 12 - */ 13 - parameter?: string; 14 - }; 15 - 16 - export class FormDataService { 17 - constructor(public readonly httpRequest: BaseHttpRequest) {} 18 - 19 - /** 20 - * @throws ApiError 21 - */ 22 - public postApiFormData(data: TDataPostApiFormData = {}): CancelablePromise<void> { 23 - const { formData, parameter } = data; 24 - return this.httpRequest.request({ 25 - method: 'POST', 26 - url: '/api/v{api-version}/formData/', 27 - query: { 28 - parameter, 29 - }, 30 - formData: formData, 31 - mediaType: 'multipart/form-data', 32 - }); 33 - } 34 - }
-22
test/__snapshots__/v3_client/services/HeaderService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 3 - 4 - export class HeaderService { 5 - constructor(public readonly httpRequest: BaseHttpRequest) {} 6 - 7 - /** 8 - * @returns string Successful response 9 - * @throws ApiError 10 - */ 11 - public callWithResultFromHeader(): CancelablePromise<string> { 12 - return this.httpRequest.request({ 13 - method: 'POST', 14 - url: '/api/v{api-version}/header', 15 - responseHeader: 'operation-location', 16 - errors: { 17 - 400: `400 server error`, 18 - 500: `500 server error`, 19 - }, 20 - }); 21 - } 22 - }
-44
test/__snapshots__/v3_client/services/MultipartService.ts.snap
··· 1 - import type { ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 4 - 5 - export type TDataMultipartRequest = { 6 - formData?: { 7 - content?: Blob | File; 8 - data?: ModelWithString | null; 9 - }; 10 - }; 11 - 12 - export class MultipartService { 13 - constructor(public readonly httpRequest: BaseHttpRequest) {} 14 - 15 - /** 16 - * @throws ApiError 17 - */ 18 - public multipartRequest(data: TDataMultipartRequest = {}): CancelablePromise<void> { 19 - const { formData } = data; 20 - return this.httpRequest.request({ 21 - method: 'POST', 22 - url: '/api/v{api-version}/multipart', 23 - formData: formData, 24 - mediaType: 'multipart/form-data', 25 - }); 26 - } 27 - 28 - /** 29 - * @returns any OK 30 - * @throws ApiError 31 - */ 32 - public multipartResponse(): CancelablePromise<{ 33 - file?: Blob | File; 34 - metadata?: { 35 - foo?: string; 36 - bar?: string; 37 - }; 38 - }> { 39 - return this.httpRequest.request({ 40 - method: 'GET', 41 - url: '/api/v{api-version}/multipart', 42 - }); 43 - } 44 - }
-28
test/__snapshots__/v3_client/services/MultipleTags1Service.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 3 - 4 - export class MultipleTags1Service { 5 - constructor(public readonly httpRequest: BaseHttpRequest) {} 6 - 7 - /** 8 - * @returns void Success 9 - * @throws ApiError 10 - */ 11 - public dummyA(): CancelablePromise<void> { 12 - return this.httpRequest.request({ 13 - method: 'GET', 14 - url: '/api/v{api-version}/multiple-tags/a', 15 - }); 16 - } 17 - 18 - /** 19 - * @returns void Success 20 - * @throws ApiError 21 - */ 22 - public dummyB(): CancelablePromise<void> { 23 - return this.httpRequest.request({ 24 - method: 'GET', 25 - url: '/api/v{api-version}/multiple-tags/b', 26 - }); 27 - } 28 - }
-28
test/__snapshots__/v3_client/services/MultipleTags2Service.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 3 - 4 - export class MultipleTags2Service { 5 - constructor(public readonly httpRequest: BaseHttpRequest) {} 6 - 7 - /** 8 - * @returns void Success 9 - * @throws ApiError 10 - */ 11 - public dummyA(): CancelablePromise<void> { 12 - return this.httpRequest.request({ 13 - method: 'GET', 14 - url: '/api/v{api-version}/multiple-tags/a', 15 - }); 16 - } 17 - 18 - /** 19 - * @returns void Success 20 - * @throws ApiError 21 - */ 22 - public dummyB(): CancelablePromise<void> { 23 - return this.httpRequest.request({ 24 - method: 'GET', 25 - url: '/api/v{api-version}/multiple-tags/b', 26 - }); 27 - } 28 - }
-17
test/__snapshots__/v3_client/services/MultipleTags3Service.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 3 - 4 - export class MultipleTags3Service { 5 - constructor(public readonly httpRequest: BaseHttpRequest) {} 6 - 7 - /** 8 - * @returns void Success 9 - * @throws ApiError 10 - */ 11 - public dummyB(): CancelablePromise<void> { 12 - return this.httpRequest.request({ 13 - method: 'GET', 14 - url: '/api/v{api-version}/multiple-tags/b', 15 - }); 16 - } 17 - }
-29
test/__snapshots__/v3_client/services/NoContentService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 3 - 4 - export class NoContentService { 5 - constructor(public readonly httpRequest: BaseHttpRequest) {} 6 - 7 - /** 8 - * @returns void Success 9 - * @throws ApiError 10 - */ 11 - public callWithNoContentResponse(): CancelablePromise<void> { 12 - return this.httpRequest.request({ 13 - method: 'GET', 14 - url: '/api/v{api-version}/no-content', 15 - }); 16 - } 17 - 18 - /** 19 - * @returns number Response is a simple number 20 - * @returns void Success 21 - * @throws ApiError 22 - */ 23 - public callWithResponseAndNoContentResponse(): CancelablePromise<number | void> { 24 - return this.httpRequest.request({ 25 - method: 'GET', 26 - url: '/api/v{api-version}/multiple-tags/response-and-no-content', 27 - }); 28 - } 29 - }
-31
test/__snapshots__/v3_client/services/NonAsciiÆøåÆøÅöôêÊService.ts.snap
··· 1 - import type { NonAsciiStringæøåÆØÅöôêÊ字符串 } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 4 - 5 - export type TDataNonAsciiæøåÆøÅöôêÊ字符串 = { 6 - /** 7 - * Dummy input param 8 - */ 9 - nonAsciiParamæøåÆøÅöôêÊ: number; 10 - }; 11 - 12 - export class NonAsciiÆøåÆøÅöôêÊService { 13 - constructor(public readonly httpRequest: BaseHttpRequest) {} 14 - 15 - /** 16 - * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response 17 - * @throws ApiError 18 - */ 19 - public nonAsciiæøåÆøÅöôêÊ字符串( 20 - data: TDataNonAsciiæøåÆøÅöôêÊ字符串 21 - ): CancelablePromise<Array<NonAsciiStringæøåÆØÅöôêÊ字符串>> { 22 - const { nonAsciiParamæøåÆøÅöôêÊ } = data; 23 - return this.httpRequest.request({ 24 - method: 'POST', 25 - url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 26 - query: { 27 - nonAsciiParamæøåÆØÅöôêÊ: nonAsciiParamæøåÆøÅöôêÊ, 28 - }, 29 - }); 30 - } 31 - }
-231
test/__snapshots__/v3_client/services/ParametersService.ts.snap
··· 1 - import type { ModelWithNestedArrayEnumsDataFoo, ModelWithOneOfEnum, ModelWithString, Pageable } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 4 - 5 - export type TDataDeleteFoo = { 6 - /** 7 - * bar in method 8 - */ 9 - bar: string; 10 - /** 11 - * foo in method 12 - */ 13 - foo: string; 14 - }; 15 - export type TDataCallWithParameters = { 16 - fooAllOfEnum: ModelWithNestedArrayEnumsDataFoo; 17 - fooRefEnum?: ModelWithNestedArrayEnumsDataFoo; 18 - /** 19 - * This is the parameter that goes into the cookie 20 - */ 21 - parameterCookie: string | null; 22 - /** 23 - * This is the parameter that goes into the form data 24 - */ 25 - parameterForm: string | null; 26 - /** 27 - * This is the parameter that goes into the header 28 - */ 29 - parameterHeader: string | null; 30 - /** 31 - * This is the parameter that goes into the path 32 - */ 33 - parameterPath: string | null; 34 - /** 35 - * This is the parameter that goes into the query params 36 - */ 37 - parameterQuery: string | null; 38 - /** 39 - * This is the parameter that goes into the body 40 - */ 41 - requestBody: ModelWithString | null; 42 - }; 43 - export type TDataCallWithWeirdParameterNames = { 44 - /** 45 - * This is the parameter with a reserved keyword 46 - */ 47 - _default?: string; 48 - /** 49 - * This is the parameter that goes into the cookie 50 - */ 51 - parameterCookie: string | null; 52 - /** 53 - * This is the parameter that goes into the request form data 54 - */ 55 - parameterForm: string | null; 56 - /** 57 - * This is the parameter that goes into the request header 58 - */ 59 - parameterHeader: string | null; 60 - /** 61 - * This is the parameter that goes into the path 62 - */ 63 - parameterPath1?: string; 64 - /** 65 - * This is the parameter that goes into the path 66 - */ 67 - parameterPath2?: string; 68 - /** 69 - * This is the parameter that goes into the path 70 - */ 71 - parameterPath3?: string; 72 - /** 73 - * This is the parameter that goes into the request query params 74 - */ 75 - parameterQuery: string | null; 76 - /** 77 - * This is the parameter that goes into the body 78 - */ 79 - requestBody: ModelWithString | null; 80 - }; 81 - export type TDataGetCallWithOptionalParam = { 82 - /** 83 - * This is an optional parameter 84 - */ 85 - parameter?: string; 86 - /** 87 - * This is a required parameter 88 - */ 89 - requestBody: ModelWithOneOfEnum; 90 - }; 91 - export type TDataPostCallWithOptionalParam = { 92 - /** 93 - * This is a required parameter 94 - */ 95 - parameter: Pageable; 96 - /** 97 - * This is an optional parameter 98 - */ 99 - requestBody?: ModelWithString; 100 - }; 101 - 102 - export class ParametersService { 103 - constructor(public readonly httpRequest: BaseHttpRequest) {} 104 - 105 - /** 106 - * @throws ApiError 107 - */ 108 - public deleteFoo(data: TDataDeleteFoo): CancelablePromise<void> { 109 - const { bar, foo } = data; 110 - return this.httpRequest.request({ 111 - method: 'DELETE', 112 - url: '/api/v{api-version}/foo/{foo}/bar/{bar}', 113 - path: { 114 - foo, 115 - bar, 116 - }, 117 - }); 118 - } 119 - 120 - /** 121 - * @throws ApiError 122 - */ 123 - public callWithParameters(data: TDataCallWithParameters): CancelablePromise<void> { 124 - const { 125 - fooAllOfEnum, 126 - fooRefEnum, 127 - parameterCookie, 128 - parameterForm, 129 - parameterHeader, 130 - parameterPath, 131 - parameterQuery, 132 - requestBody, 133 - } = data; 134 - return this.httpRequest.request({ 135 - method: 'POST', 136 - url: '/api/v{api-version}/parameters/{parameterPath}', 137 - path: { 138 - parameterPath, 139 - }, 140 - cookies: { 141 - parameterCookie, 142 - }, 143 - headers: { 144 - parameterHeader, 145 - }, 146 - query: { 147 - foo_ref_enum: fooRefEnum, 148 - foo_all_of_enum: fooAllOfEnum, 149 - parameterQuery, 150 - }, 151 - formData: { 152 - parameterForm, 153 - }, 154 - body: requestBody, 155 - mediaType: 'application/json', 156 - }); 157 - } 158 - 159 - /** 160 - * @throws ApiError 161 - */ 162 - public callWithWeirdParameterNames(data: TDataCallWithWeirdParameterNames): CancelablePromise<void> { 163 - const { 164 - _default, 165 - parameterCookie, 166 - parameterForm, 167 - parameterHeader, 168 - parameterPath1, 169 - parameterPath2, 170 - parameterPath3, 171 - parameterQuery, 172 - requestBody, 173 - } = data; 174 - return this.httpRequest.request({ 175 - method: 'POST', 176 - url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', 177 - path: { 178 - 'parameter.path.1': parameterPath1, 179 - 'parameter-path-2': parameterPath2, 180 - 'PARAMETER-PATH-3': parameterPath3, 181 - }, 182 - cookies: { 183 - 'PARAMETER-COOKIE': parameterCookie, 184 - }, 185 - headers: { 186 - 'parameter.header': parameterHeader, 187 - }, 188 - query: { 189 - default: _default, 190 - 'parameter-query': parameterQuery, 191 - }, 192 - formData: { 193 - parameter_form: parameterForm, 194 - }, 195 - body: requestBody, 196 - mediaType: 'application/json', 197 - }); 198 - } 199 - 200 - /** 201 - * @throws ApiError 202 - */ 203 - public getCallWithOptionalParam(data: TDataGetCallWithOptionalParam): CancelablePromise<void> { 204 - const { parameter, requestBody } = data; 205 - return this.httpRequest.request({ 206 - method: 'GET', 207 - url: '/api/v{api-version}/parameters/', 208 - query: { 209 - parameter, 210 - }, 211 - body: requestBody, 212 - mediaType: 'application/json', 213 - }); 214 - } 215 - 216 - /** 217 - * @throws ApiError 218 - */ 219 - public postCallWithOptionalParam(data: TDataPostCallWithOptionalParam): CancelablePromise<void> { 220 - const { parameter, requestBody } = data; 221 - return this.httpRequest.request({ 222 - method: 'POST', 223 - url: '/api/v{api-version}/parameters/', 224 - query: { 225 - parameter, 226 - }, 227 - body: requestBody, 228 - mediaType: 'application/json', 229 - }); 230 - } 231 - }
-34
test/__snapshots__/v3_client/services/RequestBodyService.ts.snap
··· 1 - import type { ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 4 - 5 - export type TDataPostApiRequestBody = { 6 - /** 7 - * A reusable request body 8 - */ 9 - foo?: ModelWithString; 10 - /** 11 - * This is a reusable parameter 12 - */ 13 - parameter?: string; 14 - }; 15 - 16 - export class RequestBodyService { 17 - constructor(public readonly httpRequest: BaseHttpRequest) {} 18 - 19 - /** 20 - * @throws ApiError 21 - */ 22 - public postApiRequestBody(data: TDataPostApiRequestBody = {}): CancelablePromise<void> { 23 - const { foo, parameter } = data; 24 - return this.httpRequest.request({ 25 - method: 'POST', 26 - url: '/api/v{api-version}/requestBody/', 27 - query: { 28 - parameter, 29 - }, 30 - body: foo, 31 - mediaType: 'application/json', 32 - }); 33 - } 34 - }
-74
test/__snapshots__/v3_client/services/ResponseService.ts.snap
··· 1 - import type { ModelThatExtends, ModelThatExtendsExtends, ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 4 - 5 - export class ResponseService { 6 - constructor(public readonly httpRequest: BaseHttpRequest) {} 7 - 8 - /** 9 - * @returns number Response is a simple number 10 - * @returns void Success 11 - * @throws ApiError 12 - */ 13 - public callWithResponseAndNoContentResponse(): CancelablePromise<number | void> { 14 - return this.httpRequest.request({ 15 - method: 'GET', 16 - url: '/api/v{api-version}/multiple-tags/response-and-no-content', 17 - }); 18 - } 19 - 20 - /** 21 - * @returns ModelWithString 22 - * @throws ApiError 23 - */ 24 - public callWithResponse(): CancelablePromise<ModelWithString> { 25 - return this.httpRequest.request({ 26 - method: 'GET', 27 - url: '/api/v{api-version}/response', 28 - }); 29 - } 30 - 31 - /** 32 - * @returns ModelWithString Message for default response 33 - * @throws ApiError 34 - */ 35 - public callWithDuplicateResponses(): CancelablePromise<ModelWithString> { 36 - return this.httpRequest.request({ 37 - method: 'POST', 38 - url: '/api/v{api-version}/response', 39 - errors: { 40 - 500: `Message for 500 error`, 41 - 501: `Message for 501 error`, 42 - 502: `Message for 502 error`, 43 - }, 44 - }); 45 - } 46 - 47 - /** 48 - * @returns any Message for 200 response 49 - * @returns ModelWithString Message for default response 50 - * @returns ModelThatExtends Message for 201 response 51 - * @returns ModelThatExtendsExtends Message for 202 response 52 - * @throws ApiError 53 - */ 54 - public callWithResponses(): CancelablePromise< 55 - | { 56 - readonly '@namespace.string'?: string; 57 - readonly '@namespace.integer'?: number; 58 - readonly value?: Array<ModelWithString>; 59 - } 60 - | ModelWithString 61 - | ModelThatExtends 62 - | ModelThatExtendsExtends 63 - > { 64 - return this.httpRequest.request({ 65 - method: 'PUT', 66 - url: '/api/v{api-version}/response', 67 - errors: { 68 - 500: `Message for 500 error`, 69 - 501: `Message for 501 error`, 70 - 502: `Message for 502 error`, 71 - }, 72 - }); 73 - } 74 - }
-76
test/__snapshots__/v3_client/services/SimpleService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 3 - 4 - export class SimpleService { 5 - constructor(public readonly httpRequest: BaseHttpRequest) {} 6 - 7 - /** 8 - * @throws ApiError 9 - */ 10 - public getCallWithoutParametersAndResponse(): CancelablePromise<void> { 11 - return this.httpRequest.request({ 12 - method: 'GET', 13 - url: '/api/v{api-version}/simple', 14 - }); 15 - } 16 - 17 - /** 18 - * @throws ApiError 19 - */ 20 - public putCallWithoutParametersAndResponse(): CancelablePromise<void> { 21 - return this.httpRequest.request({ 22 - method: 'PUT', 23 - url: '/api/v{api-version}/simple', 24 - }); 25 - } 26 - 27 - /** 28 - * @throws ApiError 29 - */ 30 - public postCallWithoutParametersAndResponse(): CancelablePromise<void> { 31 - return this.httpRequest.request({ 32 - method: 'POST', 33 - url: '/api/v{api-version}/simple', 34 - }); 35 - } 36 - 37 - /** 38 - * @throws ApiError 39 - */ 40 - public deleteCallWithoutParametersAndResponse(): CancelablePromise<void> { 41 - return this.httpRequest.request({ 42 - method: 'DELETE', 43 - url: '/api/v{api-version}/simple', 44 - }); 45 - } 46 - 47 - /** 48 - * @throws ApiError 49 - */ 50 - public optionsCallWithoutParametersAndResponse(): CancelablePromise<void> { 51 - return this.httpRequest.request({ 52 - method: 'OPTIONS', 53 - url: '/api/v{api-version}/simple', 54 - }); 55 - } 56 - 57 - /** 58 - * @throws ApiError 59 - */ 60 - public headCallWithoutParametersAndResponse(): CancelablePromise<void> { 61 - return this.httpRequest.request({ 62 - method: 'HEAD', 63 - url: '/api/v{api-version}/simple', 64 - }); 65 - } 66 - 67 - /** 68 - * @throws ApiError 69 - */ 70 - public patchCallWithoutParametersAndResponse(): CancelablePromise<void> { 71 - return this.httpRequest.request({ 72 - method: 'PATCH', 73 - url: '/api/v{api-version}/simple', 74 - }); 75 - } 76 - }
-77
test/__snapshots__/v3_client/services/TypesService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 3 - 4 - export type TDataTypes = { 5 - /** 6 - * This is a number parameter 7 - */ 8 - id?: number; 9 - /** 10 - * This is an array parameter 11 - */ 12 - parameterArray: Array<string> | null; 13 - /** 14 - * This is a boolean parameter 15 - */ 16 - parameterBoolean?: boolean | null; 17 - /** 18 - * This is a dictionary parameter 19 - */ 20 - parameterDictionary: Record<string, unknown> | null; 21 - /** 22 - * This is an enum parameter 23 - */ 24 - parameterEnum: 'Success' | 'Warning' | 'Error' | null; 25 - /** 26 - * This is a number parameter 27 - */ 28 - parameterNumber?: number; 29 - /** 30 - * This is an object parameter 31 - */ 32 - parameterObject?: Record<string, unknown> | null; 33 - /** 34 - * This is a string parameter 35 - */ 36 - parameterString?: string | null; 37 - }; 38 - 39 - export class TypesService { 40 - constructor(public readonly httpRequest: BaseHttpRequest) {} 41 - 42 - /** 43 - * @returns number Response is a simple number 44 - * @returns string Response is a simple string 45 - * @returns boolean Response is a simple boolean 46 - * @returns unknown Response is a simple object 47 - * @throws ApiError 48 - */ 49 - public types(data: TDataTypes): CancelablePromise<number | string | boolean | Record<string, unknown>> { 50 - const { 51 - id, 52 - parameterArray, 53 - parameterBoolean = true, 54 - parameterDictionary, 55 - parameterEnum, 56 - parameterNumber = 123, 57 - parameterObject = null, 58 - parameterString = 'default', 59 - } = data; 60 - return this.httpRequest.request({ 61 - method: 'GET', 62 - url: '/api/v{api-version}/types', 63 - path: { 64 - id, 65 - }, 66 - query: { 67 - parameterNumber, 68 - parameterString, 69 - parameterBoolean, 70 - parameterObject, 71 - parameterArray, 72 - parameterDictionary, 73 - parameterEnum, 74 - }, 75 - }); 76 - } 77 - }
-28
test/__snapshots__/v3_client/services/UploadService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import type { BaseHttpRequest } from '../core/BaseHttpRequest'; 3 - 4 - export type TDataUploadFile = { 5 - /** 6 - * Supply a file reference for upload 7 - */ 8 - file: Blob | File; 9 - }; 10 - 11 - export class UploadService { 12 - constructor(public readonly httpRequest: BaseHttpRequest) {} 13 - 14 - /** 15 - * @returns boolean 16 - * @throws ApiError 17 - */ 18 - public uploadFile(data: TDataUploadFile): CancelablePromise<boolean> { 19 - const { file } = data; 20 - return this.httpRequest.request({ 21 - method: 'POST', 22 - url: '/api/v{api-version}/upload', 23 - formData: { 24 - file, 25 - }, 26 - }); 27 - } 28 - }
-23
test/__snapshots__/v3_client/services/index.ts.snap
··· 1 - export { CollectionFormatService } from './CollectionFormatService'; 2 - export { ComplexService } from './ComplexService'; 3 - export { DefaultService } from './DefaultService'; 4 - export { DefaultsService } from './DefaultsService'; 5 - export { DeprecatedService } from './DeprecatedService'; 6 - export { DescriptionsService } from './DescriptionsService'; 7 - export { DuplicateService } from './DuplicateService'; 8 - export { ErrorService } from './ErrorService'; 9 - export { FileResponseService } from './FileResponseService'; 10 - export { FormDataService } from './FormDataService'; 11 - export { HeaderService } from './HeaderService'; 12 - export { MultipartService } from './MultipartService'; 13 - export { MultipleTags1Service } from './MultipleTags1Service'; 14 - export { MultipleTags2Service } from './MultipleTags2Service'; 15 - export { MultipleTags3Service } from './MultipleTags3Service'; 16 - export { NoContentService } from './NoContentService'; 17 - export { NonAsciiÆøåÆøÅöôêÊService } from './NonAsciiÆøåÆøÅöôêÊService'; 18 - export { ParametersService } from './ParametersService'; 19 - export { RequestBodyService } from './RequestBodyService'; 20 - export { ResponseService } from './ResponseService'; 21 - export { SimpleService } from './SimpleService'; 22 - export { TypesService } from './TypesService'; 23 - export { UploadService } from './UploadService';
+1198
test/__snapshots__/v3_enums_typescript/services.ts.snap
··· 1 + import type { CancelablePromise } from './core/CancelablePromise'; 2 + import { OpenAPI } from './core/OpenAPI'; 3 + import { request as __request } from './core/request'; 4 + 5 + import type { 6 + ModelWithArrayReadOnlyAndWriteOnly, 7 + ModelWithReadOnlyAndWriteOnly, 8 + ModelWithNestedArrayEnumsDataFoo, 9 + ModelWithOneOfEnum, 10 + ModelWithString, 11 + Pageable, 12 + DeprecatedModel, 13 + ModelThatExtends, 14 + ModelThatExtendsExtends, 15 + ModelWithArray, 16 + ModelWithDictionary, 17 + ModelWithEnum, 18 + NonAsciiStringæøåÆØÅöôêÊ字符串, 19 + } from './models'; 20 + 21 + export type TDataPostServiceWithEmptyTag = { 22 + requestBody: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 23 + }; 24 + 25 + export class DefaultService { 26 + /** 27 + * @throws ApiError 28 + */ 29 + public static serviceWithEmptyTag(): CancelablePromise<void> { 30 + return __request(OpenAPI, { 31 + method: 'GET', 32 + url: '/api/v{api-version}/no-tag', 33 + }); 34 + } 35 + 36 + /** 37 + * @returns ModelWithReadOnlyAndWriteOnly 38 + * @throws ApiError 39 + */ 40 + public static postServiceWithEmptyTag( 41 + data: TDataPostServiceWithEmptyTag 42 + ): CancelablePromise<ModelWithReadOnlyAndWriteOnly> { 43 + const { requestBody } = data; 44 + return __request(OpenAPI, { 45 + method: 'POST', 46 + url: '/api/v{api-version}/no-tag', 47 + body: requestBody, 48 + mediaType: 'application/json', 49 + }); 50 + } 51 + } 52 + 53 + export class SimpleService { 54 + /** 55 + * @throws ApiError 56 + */ 57 + public static getCallWithoutParametersAndResponse(): CancelablePromise<void> { 58 + return __request(OpenAPI, { 59 + method: 'GET', 60 + url: '/api/v{api-version}/simple', 61 + }); 62 + } 63 + 64 + /** 65 + * @throws ApiError 66 + */ 67 + public static putCallWithoutParametersAndResponse(): CancelablePromise<void> { 68 + return __request(OpenAPI, { 69 + method: 'PUT', 70 + url: '/api/v{api-version}/simple', 71 + }); 72 + } 73 + 74 + /** 75 + * @throws ApiError 76 + */ 77 + public static postCallWithoutParametersAndResponse(): CancelablePromise<void> { 78 + return __request(OpenAPI, { 79 + method: 'POST', 80 + url: '/api/v{api-version}/simple', 81 + }); 82 + } 83 + 84 + /** 85 + * @throws ApiError 86 + */ 87 + public static deleteCallWithoutParametersAndResponse(): CancelablePromise<void> { 88 + return __request(OpenAPI, { 89 + method: 'DELETE', 90 + url: '/api/v{api-version}/simple', 91 + }); 92 + } 93 + 94 + /** 95 + * @throws ApiError 96 + */ 97 + public static optionsCallWithoutParametersAndResponse(): CancelablePromise<void> { 98 + return __request(OpenAPI, { 99 + method: 'OPTIONS', 100 + url: '/api/v{api-version}/simple', 101 + }); 102 + } 103 + 104 + /** 105 + * @throws ApiError 106 + */ 107 + public static headCallWithoutParametersAndResponse(): CancelablePromise<void> { 108 + return __request(OpenAPI, { 109 + method: 'HEAD', 110 + url: '/api/v{api-version}/simple', 111 + }); 112 + } 113 + 114 + /** 115 + * @throws ApiError 116 + */ 117 + public static patchCallWithoutParametersAndResponse(): CancelablePromise<void> { 118 + return __request(OpenAPI, { 119 + method: 'PATCH', 120 + url: '/api/v{api-version}/simple', 121 + }); 122 + } 123 + } 124 + 125 + export type TDataDeleteFoo = { 126 + /** 127 + * bar in method 128 + */ 129 + bar: string; 130 + /** 131 + * foo in method 132 + */ 133 + foo: string; 134 + }; 135 + export type TDataCallWithParameters = { 136 + fooAllOfEnum: ModelWithNestedArrayEnumsDataFoo; 137 + fooRefEnum?: ModelWithNestedArrayEnumsDataFoo; 138 + /** 139 + * This is the parameter that goes into the cookie 140 + */ 141 + parameterCookie: string | null; 142 + /** 143 + * This is the parameter that goes into the form data 144 + */ 145 + parameterForm: string | null; 146 + /** 147 + * This is the parameter that goes into the header 148 + */ 149 + parameterHeader: string | null; 150 + /** 151 + * This is the parameter that goes into the path 152 + */ 153 + parameterPath: string | null; 154 + /** 155 + * This is the parameter that goes into the query params 156 + */ 157 + parameterQuery: string | null; 158 + /** 159 + * This is the parameter that goes into the body 160 + */ 161 + requestBody: ModelWithString | null; 162 + }; 163 + export type TDataCallWithWeirdParameterNames = { 164 + /** 165 + * This is the parameter with a reserved keyword 166 + */ 167 + _default?: string; 168 + /** 169 + * This is the parameter that goes into the cookie 170 + */ 171 + parameterCookie: string | null; 172 + /** 173 + * This is the parameter that goes into the request form data 174 + */ 175 + parameterForm: string | null; 176 + /** 177 + * This is the parameter that goes into the request header 178 + */ 179 + parameterHeader: string | null; 180 + /** 181 + * This is the parameter that goes into the path 182 + */ 183 + parameterPath1?: string; 184 + /** 185 + * This is the parameter that goes into the path 186 + */ 187 + parameterPath2?: string; 188 + /** 189 + * This is the parameter that goes into the path 190 + */ 191 + parameterPath3?: string; 192 + /** 193 + * This is the parameter that goes into the request query params 194 + */ 195 + parameterQuery: string | null; 196 + /** 197 + * This is the parameter that goes into the body 198 + */ 199 + requestBody: ModelWithString | null; 200 + }; 201 + export type TDataGetCallWithOptionalParam = { 202 + /** 203 + * This is an optional parameter 204 + */ 205 + parameter?: string; 206 + /** 207 + * This is a required parameter 208 + */ 209 + requestBody: ModelWithOneOfEnum; 210 + }; 211 + export type TDataPostCallWithOptionalParam = { 212 + /** 213 + * This is a required parameter 214 + */ 215 + parameter: Pageable; 216 + /** 217 + * This is an optional parameter 218 + */ 219 + requestBody?: ModelWithString; 220 + }; 221 + 222 + export class ParametersService { 223 + /** 224 + * @throws ApiError 225 + */ 226 + public static deleteFoo(data: TDataDeleteFoo): CancelablePromise<void> { 227 + const { bar, foo } = data; 228 + return __request(OpenAPI, { 229 + method: 'DELETE', 230 + url: '/api/v{api-version}/foo/{foo}/bar/{bar}', 231 + path: { 232 + foo, 233 + bar, 234 + }, 235 + }); 236 + } 237 + 238 + /** 239 + * @throws ApiError 240 + */ 241 + public static callWithParameters(data: TDataCallWithParameters): CancelablePromise<void> { 242 + const { 243 + fooAllOfEnum, 244 + fooRefEnum, 245 + parameterCookie, 246 + parameterForm, 247 + parameterHeader, 248 + parameterPath, 249 + parameterQuery, 250 + requestBody, 251 + } = data; 252 + return __request(OpenAPI, { 253 + method: 'POST', 254 + url: '/api/v{api-version}/parameters/{parameterPath}', 255 + path: { 256 + parameterPath, 257 + }, 258 + cookies: { 259 + parameterCookie, 260 + }, 261 + headers: { 262 + parameterHeader, 263 + }, 264 + query: { 265 + foo_ref_enum: fooRefEnum, 266 + foo_all_of_enum: fooAllOfEnum, 267 + parameterQuery, 268 + }, 269 + formData: { 270 + parameterForm, 271 + }, 272 + body: requestBody, 273 + mediaType: 'application/json', 274 + }); 275 + } 276 + 277 + /** 278 + * @throws ApiError 279 + */ 280 + public static callWithWeirdParameterNames(data: TDataCallWithWeirdParameterNames): CancelablePromise<void> { 281 + const { 282 + _default, 283 + parameterCookie, 284 + parameterForm, 285 + parameterHeader, 286 + parameterPath1, 287 + parameterPath2, 288 + parameterPath3, 289 + parameterQuery, 290 + requestBody, 291 + } = data; 292 + return __request(OpenAPI, { 293 + method: 'POST', 294 + url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', 295 + path: { 296 + 'parameter.path.1': parameterPath1, 297 + 'parameter-path-2': parameterPath2, 298 + 'PARAMETER-PATH-3': parameterPath3, 299 + }, 300 + cookies: { 301 + 'PARAMETER-COOKIE': parameterCookie, 302 + }, 303 + headers: { 304 + 'parameter.header': parameterHeader, 305 + }, 306 + query: { 307 + default: _default, 308 + 'parameter-query': parameterQuery, 309 + }, 310 + formData: { 311 + parameter_form: parameterForm, 312 + }, 313 + body: requestBody, 314 + mediaType: 'application/json', 315 + }); 316 + } 317 + 318 + /** 319 + * @throws ApiError 320 + */ 321 + public static getCallWithOptionalParam(data: TDataGetCallWithOptionalParam): CancelablePromise<void> { 322 + const { parameter, requestBody } = data; 323 + return __request(OpenAPI, { 324 + method: 'GET', 325 + url: '/api/v{api-version}/parameters/', 326 + query: { 327 + parameter, 328 + }, 329 + body: requestBody, 330 + mediaType: 'application/json', 331 + }); 332 + } 333 + 334 + /** 335 + * @throws ApiError 336 + */ 337 + public static postCallWithOptionalParam(data: TDataPostCallWithOptionalParam): CancelablePromise<void> { 338 + const { parameter, requestBody } = data; 339 + return __request(OpenAPI, { 340 + method: 'POST', 341 + url: '/api/v{api-version}/parameters/', 342 + query: { 343 + parameter, 344 + }, 345 + body: requestBody, 346 + mediaType: 'application/json', 347 + }); 348 + } 349 + } 350 + 351 + export type TDataCallWithDescriptions = { 352 + /** 353 + * Testing backticks in string: `backticks` and ```multiple backticks``` should work 354 + */ 355 + parameterWithBackticks?: unknown; 356 + /** 357 + * Testing multiline comments in string: First line 358 + * Second line 359 + * 360 + * Fourth line 361 + */ 362 + parameterWithBreaks?: unknown; 363 + /** 364 + * Testing expression placeholders in string: ${expression} should work 365 + */ 366 + parameterWithExpressionPlaceholders?: unknown; 367 + /** 368 + * Testing quotes in string: 'single quote''' and "double quotes""" should work 369 + */ 370 + parameterWithQuotes?: unknown; 371 + /** 372 + * Testing reserved characters in string: * inline * and ** inline ** should work 373 + */ 374 + parameterWithReservedCharacters?: unknown; 375 + /** 376 + * Testing slashes in string: \backwards\\\ and /forwards/// should work 377 + */ 378 + parameterWithSlashes?: unknown; 379 + }; 380 + 381 + export class DescriptionsService { 382 + /** 383 + * @throws ApiError 384 + */ 385 + public static callWithDescriptions(data: TDataCallWithDescriptions = {}): CancelablePromise<void> { 386 + const { 387 + parameterWithBackticks, 388 + parameterWithBreaks, 389 + parameterWithExpressionPlaceholders, 390 + parameterWithQuotes, 391 + parameterWithReservedCharacters, 392 + parameterWithSlashes, 393 + } = data; 394 + return __request(OpenAPI, { 395 + method: 'POST', 396 + url: '/api/v{api-version}/descriptions/', 397 + query: { 398 + parameterWithBreaks, 399 + parameterWithBackticks, 400 + parameterWithSlashes, 401 + parameterWithExpressionPlaceholders, 402 + parameterWithQuotes, 403 + parameterWithReservedCharacters, 404 + }, 405 + }); 406 + } 407 + } 408 + 409 + export type TDataDeprecatedCall = { 410 + /** 411 + * This parameter is deprecated 412 + */ 413 + parameter: DeprecatedModel | null; 414 + }; 415 + 416 + export class DeprecatedService { 417 + /** 418 + * @deprecated 419 + * @throws ApiError 420 + */ 421 + public static deprecatedCall(data: TDataDeprecatedCall): CancelablePromise<void> { 422 + const { parameter } = data; 423 + return __request(OpenAPI, { 424 + method: 'POST', 425 + url: '/api/v{api-version}/parameters/deprecated', 426 + headers: { 427 + parameter, 428 + }, 429 + }); 430 + } 431 + } 432 + 433 + export type TDataPostApiRequestBody = { 434 + /** 435 + * A reusable request body 436 + */ 437 + foo?: ModelWithString; 438 + /** 439 + * This is a reusable parameter 440 + */ 441 + parameter?: string; 442 + }; 443 + 444 + export class RequestBodyService { 445 + /** 446 + * @throws ApiError 447 + */ 448 + public static postApiRequestBody(data: TDataPostApiRequestBody = {}): CancelablePromise<void> { 449 + const { foo, parameter } = data; 450 + return __request(OpenAPI, { 451 + method: 'POST', 452 + url: '/api/v{api-version}/requestBody/', 453 + query: { 454 + parameter, 455 + }, 456 + body: foo, 457 + mediaType: 'application/json', 458 + }); 459 + } 460 + } 461 + 462 + export type TDataPostApiFormData = { 463 + /** 464 + * A reusable request body 465 + */ 466 + formData?: ModelWithString; 467 + /** 468 + * This is a reusable parameter 469 + */ 470 + parameter?: string; 471 + }; 472 + 473 + export class FormDataService { 474 + /** 475 + * @throws ApiError 476 + */ 477 + public static postApiFormData(data: TDataPostApiFormData = {}): CancelablePromise<void> { 478 + const { formData, parameter } = data; 479 + return __request(OpenAPI, { 480 + method: 'POST', 481 + url: '/api/v{api-version}/formData/', 482 + query: { 483 + parameter, 484 + }, 485 + formData: formData, 486 + mediaType: 'multipart/form-data', 487 + }); 488 + } 489 + } 490 + 491 + export type TDataCallWithDefaultParameters = { 492 + /** 493 + * This is a simple boolean with default value 494 + */ 495 + parameterBoolean?: boolean | null; 496 + /** 497 + * This is a simple enum with default value 498 + */ 499 + parameterEnum?: 'Success' | 'Warning' | 'Error'; 500 + /** 501 + * This is a simple model with default value 502 + */ 503 + parameterModel?: ModelWithString | null; 504 + /** 505 + * This is a simple number with default value 506 + */ 507 + parameterNumber?: number | null; 508 + /** 509 + * This is a simple string with default value 510 + */ 511 + parameterString?: string | null; 512 + }; 513 + export type TDataCallWithDefaultOptionalParameters = { 514 + /** 515 + * This is a simple boolean that is optional with default value 516 + */ 517 + parameterBoolean?: boolean; 518 + /** 519 + * This is a simple enum that is optional with default value 520 + */ 521 + parameterEnum?: 'Success' | 'Warning' | 'Error'; 522 + /** 523 + * This is a simple model that is optional with default value 524 + */ 525 + parameterModel?: ModelWithString; 526 + /** 527 + * This is a simple number that is optional with default value 528 + */ 529 + parameterNumber?: number; 530 + /** 531 + * This is a simple string that is optional with default value 532 + */ 533 + parameterString?: string; 534 + }; 535 + export type TDataCallToTestOrderOfParams = { 536 + /** 537 + * This is a optional string with default 538 + */ 539 + parameterOptionalStringWithDefault?: string; 540 + /** 541 + * This is a optional string with empty default 542 + */ 543 + parameterOptionalStringWithEmptyDefault?: string; 544 + /** 545 + * This is a optional string with no default 546 + */ 547 + parameterOptionalStringWithNoDefault?: string; 548 + /** 549 + * This is a string that can be null with default 550 + */ 551 + parameterStringNullableWithDefault?: string | null; 552 + /** 553 + * This is a string that can be null with no default 554 + */ 555 + parameterStringNullableWithNoDefault?: string | null; 556 + /** 557 + * This is a string with default 558 + */ 559 + parameterStringWithDefault?: string; 560 + /** 561 + * This is a string with empty default 562 + */ 563 + parameterStringWithEmptyDefault?: string; 564 + /** 565 + * This is a string with no default 566 + */ 567 + parameterStringWithNoDefault: string; 568 + }; 569 + 570 + export class DefaultsService { 571 + /** 572 + * @throws ApiError 573 + */ 574 + public static callWithDefaultParameters(data: TDataCallWithDefaultParameters = {}): CancelablePromise<void> { 575 + const { 576 + parameterBoolean = true, 577 + parameterEnum = 'Success', 578 + parameterModel = { 579 + prop: 'Hello World!', 580 + }, 581 + parameterNumber = 123, 582 + parameterString = 'Hello World!', 583 + } = data; 584 + return __request(OpenAPI, { 585 + method: 'GET', 586 + url: '/api/v{api-version}/defaults', 587 + query: { 588 + parameterString, 589 + parameterNumber, 590 + parameterBoolean, 591 + parameterEnum, 592 + parameterModel, 593 + }, 594 + }); 595 + } 596 + 597 + /** 598 + * @throws ApiError 599 + */ 600 + public static callWithDefaultOptionalParameters( 601 + data: TDataCallWithDefaultOptionalParameters = {} 602 + ): CancelablePromise<void> { 603 + const { 604 + parameterBoolean = true, 605 + parameterEnum = 'Success', 606 + parameterModel = { 607 + prop: 'Hello World!', 608 + }, 609 + parameterNumber = 123, 610 + parameterString = 'Hello World!', 611 + } = data; 612 + return __request(OpenAPI, { 613 + method: 'POST', 614 + url: '/api/v{api-version}/defaults', 615 + query: { 616 + parameterString, 617 + parameterNumber, 618 + parameterBoolean, 619 + parameterEnum, 620 + parameterModel, 621 + }, 622 + }); 623 + } 624 + 625 + /** 626 + * @throws ApiError 627 + */ 628 + public static callToTestOrderOfParams(data: TDataCallToTestOrderOfParams): CancelablePromise<void> { 629 + const { 630 + parameterOptionalStringWithDefault = 'Hello World!', 631 + parameterOptionalStringWithEmptyDefault = '', 632 + parameterOptionalStringWithNoDefault, 633 + parameterStringNullableWithDefault = null, 634 + parameterStringNullableWithNoDefault, 635 + parameterStringWithDefault = 'Hello World!', 636 + parameterStringWithEmptyDefault = '', 637 + parameterStringWithNoDefault, 638 + } = data; 639 + return __request(OpenAPI, { 640 + method: 'PUT', 641 + url: '/api/v{api-version}/defaults', 642 + query: { 643 + parameterOptionalStringWithDefault, 644 + parameterOptionalStringWithEmptyDefault, 645 + parameterOptionalStringWithNoDefault, 646 + parameterStringWithDefault, 647 + parameterStringWithEmptyDefault, 648 + parameterStringWithNoDefault, 649 + parameterStringNullableWithNoDefault, 650 + parameterStringNullableWithDefault, 651 + }, 652 + }); 653 + } 654 + } 655 + 656 + export class DuplicateService { 657 + /** 658 + * @throws ApiError 659 + */ 660 + public static duplicateName(): CancelablePromise<void> { 661 + return __request(OpenAPI, { 662 + method: 'GET', 663 + url: '/api/v{api-version}/duplicate', 664 + }); 665 + } 666 + 667 + /** 668 + * @throws ApiError 669 + */ 670 + public static duplicateName1(): CancelablePromise<void> { 671 + return __request(OpenAPI, { 672 + method: 'POST', 673 + url: '/api/v{api-version}/duplicate', 674 + }); 675 + } 676 + 677 + /** 678 + * @throws ApiError 679 + */ 680 + public static duplicateName2(): CancelablePromise<void> { 681 + return __request(OpenAPI, { 682 + method: 'PUT', 683 + url: '/api/v{api-version}/duplicate', 684 + }); 685 + } 686 + 687 + /** 688 + * @throws ApiError 689 + */ 690 + public static duplicateName3(): CancelablePromise<void> { 691 + return __request(OpenAPI, { 692 + method: 'DELETE', 693 + url: '/api/v{api-version}/duplicate', 694 + }); 695 + } 696 + } 697 + 698 + export class NoContentService { 699 + /** 700 + * @returns void Success 701 + * @throws ApiError 702 + */ 703 + public static callWithNoContentResponse(): CancelablePromise<void> { 704 + return __request(OpenAPI, { 705 + method: 'GET', 706 + url: '/api/v{api-version}/no-content', 707 + }); 708 + } 709 + 710 + /** 711 + * @returns number Response is a simple number 712 + * @returns void Success 713 + * @throws ApiError 714 + */ 715 + public static callWithResponseAndNoContentResponse(): CancelablePromise<number | void> { 716 + return __request(OpenAPI, { 717 + method: 'GET', 718 + url: '/api/v{api-version}/multiple-tags/response-and-no-content', 719 + }); 720 + } 721 + } 722 + 723 + export class ResponseService { 724 + /** 725 + * @returns number Response is a simple number 726 + * @returns void Success 727 + * @throws ApiError 728 + */ 729 + public static callWithResponseAndNoContentResponse(): CancelablePromise<number | void> { 730 + return __request(OpenAPI, { 731 + method: 'GET', 732 + url: '/api/v{api-version}/multiple-tags/response-and-no-content', 733 + }); 734 + } 735 + 736 + /** 737 + * @returns ModelWithString 738 + * @throws ApiError 739 + */ 740 + public static callWithResponse(): CancelablePromise<ModelWithString> { 741 + return __request(OpenAPI, { 742 + method: 'GET', 743 + url: '/api/v{api-version}/response', 744 + }); 745 + } 746 + 747 + /** 748 + * @returns ModelWithString Message for default response 749 + * @throws ApiError 750 + */ 751 + public static callWithDuplicateResponses(): CancelablePromise<ModelWithString> { 752 + return __request(OpenAPI, { 753 + method: 'POST', 754 + url: '/api/v{api-version}/response', 755 + errors: { 756 + 500: `Message for 500 error`, 757 + 501: `Message for 501 error`, 758 + 502: `Message for 502 error`, 759 + }, 760 + }); 761 + } 762 + 763 + /** 764 + * @returns any Message for 200 response 765 + * @returns ModelWithString Message for default response 766 + * @returns ModelThatExtends Message for 201 response 767 + * @returns ModelThatExtendsExtends Message for 202 response 768 + * @throws ApiError 769 + */ 770 + public static callWithResponses(): CancelablePromise< 771 + | { 772 + readonly '@namespace.string'?: string; 773 + readonly '@namespace.integer'?: number; 774 + readonly value?: Array<ModelWithString>; 775 + } 776 + | ModelWithString 777 + | ModelThatExtends 778 + | ModelThatExtendsExtends 779 + > { 780 + return __request(OpenAPI, { 781 + method: 'PUT', 782 + url: '/api/v{api-version}/response', 783 + errors: { 784 + 500: `Message for 500 error`, 785 + 501: `Message for 501 error`, 786 + 502: `Message for 502 error`, 787 + }, 788 + }); 789 + } 790 + } 791 + 792 + export class MultipleTags1Service { 793 + /** 794 + * @returns void Success 795 + * @throws ApiError 796 + */ 797 + public static dummyA(): CancelablePromise<void> { 798 + return __request(OpenAPI, { 799 + method: 'GET', 800 + url: '/api/v{api-version}/multiple-tags/a', 801 + }); 802 + } 803 + 804 + /** 805 + * @returns void Success 806 + * @throws ApiError 807 + */ 808 + public static dummyB(): CancelablePromise<void> { 809 + return __request(OpenAPI, { 810 + method: 'GET', 811 + url: '/api/v{api-version}/multiple-tags/b', 812 + }); 813 + } 814 + } 815 + 816 + export class MultipleTags2Service { 817 + /** 818 + * @returns void Success 819 + * @throws ApiError 820 + */ 821 + public static dummyA(): CancelablePromise<void> { 822 + return __request(OpenAPI, { 823 + method: 'GET', 824 + url: '/api/v{api-version}/multiple-tags/a', 825 + }); 826 + } 827 + 828 + /** 829 + * @returns void Success 830 + * @throws ApiError 831 + */ 832 + public static dummyB(): CancelablePromise<void> { 833 + return __request(OpenAPI, { 834 + method: 'GET', 835 + url: '/api/v{api-version}/multiple-tags/b', 836 + }); 837 + } 838 + } 839 + 840 + export class MultipleTags3Service { 841 + /** 842 + * @returns void Success 843 + * @throws ApiError 844 + */ 845 + public static dummyB(): CancelablePromise<void> { 846 + return __request(OpenAPI, { 847 + method: 'GET', 848 + url: '/api/v{api-version}/multiple-tags/b', 849 + }); 850 + } 851 + } 852 + 853 + export type TDataCollectionFormat = { 854 + /** 855 + * This is an array parameter that is sent as csv format (comma-separated values) 856 + */ 857 + parameterArrayCsv: Array<string> | null; 858 + /** 859 + * This is an array parameter that is sent as multi format (multiple parameter instances) 860 + */ 861 + parameterArrayMulti: Array<string> | null; 862 + /** 863 + * This is an array parameter that is sent as pipes format (pipe-separated values) 864 + */ 865 + parameterArrayPipes: Array<string> | null; 866 + /** 867 + * This is an array parameter that is sent as ssv format (space-separated values) 868 + */ 869 + parameterArraySsv: Array<string> | null; 870 + /** 871 + * This is an array parameter that is sent as tsv format (tab-separated values) 872 + */ 873 + parameterArrayTsv: Array<string> | null; 874 + }; 875 + 876 + export class CollectionFormatService { 877 + /** 878 + * @throws ApiError 879 + */ 880 + public static collectionFormat(data: TDataCollectionFormat): CancelablePromise<void> { 881 + const { parameterArrayCsv, parameterArrayMulti, parameterArrayPipes, parameterArraySsv, parameterArrayTsv } = 882 + data; 883 + return __request(OpenAPI, { 884 + method: 'GET', 885 + url: '/api/v{api-version}/collectionFormat', 886 + query: { 887 + parameterArrayCSV: parameterArrayCsv, 888 + parameterArraySSV: parameterArraySsv, 889 + parameterArrayTSV: parameterArrayTsv, 890 + parameterArrayPipes, 891 + parameterArrayMulti, 892 + }, 893 + }); 894 + } 895 + } 896 + 897 + export type TDataTypes = { 898 + /** 899 + * This is a number parameter 900 + */ 901 + id?: number; 902 + /** 903 + * This is an array parameter 904 + */ 905 + parameterArray: Array<string> | null; 906 + /** 907 + * This is a boolean parameter 908 + */ 909 + parameterBoolean?: boolean | null; 910 + /** 911 + * This is a dictionary parameter 912 + */ 913 + parameterDictionary: Record<string, unknown> | null; 914 + /** 915 + * This is an enum parameter 916 + */ 917 + parameterEnum: 'Success' | 'Warning' | 'Error' | null; 918 + /** 919 + * This is a number parameter 920 + */ 921 + parameterNumber?: number; 922 + /** 923 + * This is an object parameter 924 + */ 925 + parameterObject?: Record<string, unknown> | null; 926 + /** 927 + * This is a string parameter 928 + */ 929 + parameterString?: string | null; 930 + }; 931 + 932 + export class TypesService { 933 + /** 934 + * @returns number Response is a simple number 935 + * @returns string Response is a simple string 936 + * @returns boolean Response is a simple boolean 937 + * @returns unknown Response is a simple object 938 + * @throws ApiError 939 + */ 940 + public static types(data: TDataTypes): CancelablePromise<number | string | boolean | Record<string, unknown>> { 941 + const { 942 + id, 943 + parameterArray, 944 + parameterBoolean = true, 945 + parameterDictionary, 946 + parameterEnum, 947 + parameterNumber = 123, 948 + parameterObject = null, 949 + parameterString = 'default', 950 + } = data; 951 + return __request(OpenAPI, { 952 + method: 'GET', 953 + url: '/api/v{api-version}/types', 954 + path: { 955 + id, 956 + }, 957 + query: { 958 + parameterNumber, 959 + parameterString, 960 + parameterBoolean, 961 + parameterObject, 962 + parameterArray, 963 + parameterDictionary, 964 + parameterEnum, 965 + }, 966 + }); 967 + } 968 + } 969 + 970 + export type TDataUploadFile = { 971 + /** 972 + * Supply a file reference for upload 973 + */ 974 + file: Blob | File; 975 + }; 976 + 977 + export class UploadService { 978 + /** 979 + * @returns boolean 980 + * @throws ApiError 981 + */ 982 + public static uploadFile(data: TDataUploadFile): CancelablePromise<boolean> { 983 + const { file } = data; 984 + return __request(OpenAPI, { 985 + method: 'POST', 986 + url: '/api/v{api-version}/upload', 987 + formData: { 988 + file, 989 + }, 990 + }); 991 + } 992 + } 993 + 994 + export type TDataFileResponse = { 995 + id: string; 996 + }; 997 + 998 + export class FileResponseService { 999 + /** 1000 + * @returns binary Success 1001 + * @throws ApiError 1002 + */ 1003 + public static fileResponse(data: TDataFileResponse): CancelablePromise<Blob | File> { 1004 + const { id } = data; 1005 + return __request(OpenAPI, { 1006 + method: 'GET', 1007 + url: '/api/v{api-version}/file/{id}', 1008 + path: { 1009 + id, 1010 + }, 1011 + }); 1012 + } 1013 + } 1014 + 1015 + export type TDataComplexTypes = { 1016 + /** 1017 + * Parameter containing object 1018 + */ 1019 + parameterObject: { 1020 + first?: { 1021 + second?: { 1022 + third?: string; 1023 + }; 1024 + }; 1025 + }; 1026 + /** 1027 + * Parameter containing reference 1028 + */ 1029 + parameterReference: ModelWithString; 1030 + }; 1031 + export type TDataComplexParams = { 1032 + id: number; 1033 + requestBody?: { 1034 + readonly key: string | null; 1035 + name: string | null; 1036 + enabled?: boolean; 1037 + readonly type: 'Monkey' | 'Horse' | 'Bird'; 1038 + listOfModels?: Array<ModelWithString> | null; 1039 + listOfStrings?: Array<string> | null; 1040 + parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; 1041 + readonly user?: { 1042 + readonly id?: number; 1043 + readonly name?: string | null; 1044 + }; 1045 + }; 1046 + }; 1047 + 1048 + export class ComplexService { 1049 + /** 1050 + * @returns ModelWithString Successful response 1051 + * @throws ApiError 1052 + */ 1053 + public static complexTypes(data: TDataComplexTypes): CancelablePromise<Array<ModelWithString>> { 1054 + const { parameterObject, parameterReference } = data; 1055 + return __request(OpenAPI, { 1056 + method: 'GET', 1057 + url: '/api/v{api-version}/complex', 1058 + query: { 1059 + parameterObject, 1060 + parameterReference, 1061 + }, 1062 + errors: { 1063 + 400: `400 server error`, 1064 + 500: `500 server error`, 1065 + }, 1066 + }); 1067 + } 1068 + 1069 + /** 1070 + * @returns ModelWithString Success 1071 + * @throws ApiError 1072 + */ 1073 + public static complexParams(data: TDataComplexParams): CancelablePromise<ModelWithString> { 1074 + const { id, requestBody } = data; 1075 + return __request(OpenAPI, { 1076 + method: 'PUT', 1077 + url: '/api/v{api-version}/complex/{id}', 1078 + path: { 1079 + id, 1080 + }, 1081 + body: requestBody, 1082 + mediaType: 'application/json-patch+json', 1083 + }); 1084 + } 1085 + } 1086 + 1087 + export type TDataMultipartRequest = { 1088 + formData?: { 1089 + content?: Blob | File; 1090 + data?: ModelWithString | null; 1091 + }; 1092 + }; 1093 + 1094 + export class MultipartService { 1095 + /** 1096 + * @throws ApiError 1097 + */ 1098 + public static multipartRequest(data: TDataMultipartRequest = {}): CancelablePromise<void> { 1099 + const { formData } = data; 1100 + return __request(OpenAPI, { 1101 + method: 'POST', 1102 + url: '/api/v{api-version}/multipart', 1103 + formData: formData, 1104 + mediaType: 'multipart/form-data', 1105 + }); 1106 + } 1107 + 1108 + /** 1109 + * @returns any OK 1110 + * @throws ApiError 1111 + */ 1112 + public static multipartResponse(): CancelablePromise<{ 1113 + file?: Blob | File; 1114 + metadata?: { 1115 + foo?: string; 1116 + bar?: string; 1117 + }; 1118 + }> { 1119 + return __request(OpenAPI, { 1120 + method: 'GET', 1121 + url: '/api/v{api-version}/multipart', 1122 + }); 1123 + } 1124 + } 1125 + 1126 + export class HeaderService { 1127 + /** 1128 + * @returns string Successful response 1129 + * @throws ApiError 1130 + */ 1131 + public static callWithResultFromHeader(): CancelablePromise<string> { 1132 + return __request(OpenAPI, { 1133 + method: 'POST', 1134 + url: '/api/v{api-version}/header', 1135 + responseHeader: 'operation-location', 1136 + errors: { 1137 + 400: `400 server error`, 1138 + 500: `500 server error`, 1139 + }, 1140 + }); 1141 + } 1142 + } 1143 + 1144 + export type TDataTestErrorCode = { 1145 + /** 1146 + * Status code to return 1147 + */ 1148 + status: number; 1149 + }; 1150 + 1151 + export class ErrorService { 1152 + /** 1153 + * @returns any Custom message: Successful response 1154 + * @throws ApiError 1155 + */ 1156 + public static testErrorCode(data: TDataTestErrorCode): CancelablePromise<any> { 1157 + const { status } = data; 1158 + return __request(OpenAPI, { 1159 + method: 'POST', 1160 + url: '/api/v{api-version}/error', 1161 + query: { 1162 + status, 1163 + }, 1164 + errors: { 1165 + 500: `Custom message: Internal Server Error`, 1166 + 501: `Custom message: Not Implemented`, 1167 + 502: `Custom message: Bad Gateway`, 1168 + 503: `Custom message: Service Unavailable`, 1169 + }, 1170 + }); 1171 + } 1172 + } 1173 + 1174 + export type TDataNonAsciiæøåÆøÅöôêÊ字符串 = { 1175 + /** 1176 + * Dummy input param 1177 + */ 1178 + nonAsciiParamæøåÆøÅöôêÊ: number; 1179 + }; 1180 + 1181 + export class NonAsciiÆøåÆøÅöôêÊService { 1182 + /** 1183 + * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response 1184 + * @throws ApiError 1185 + */ 1186 + public static nonAsciiæøåÆøÅöôêÊ字符串( 1187 + data: TDataNonAsciiæøåÆøÅöôêÊ字符串 1188 + ): CancelablePromise<Array<NonAsciiStringæøåÆØÅöôêÊ字符串>> { 1189 + const { nonAsciiParamæøåÆøÅöôêÊ } = data; 1190 + return __request(OpenAPI, { 1191 + method: 'POST', 1192 + url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 1193 + query: { 1194 + nonAsciiParamæøåÆØÅöôêÊ: nonAsciiParamæøåÆøÅöôêÊ, 1195 + }, 1196 + }); 1197 + } 1198 + }
-47
test/__snapshots__/v3_enums_typescript/services/CollectionFormatService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataCollectionFormat = { 6 - /** 7 - * This is an array parameter that is sent as csv format (comma-separated values) 8 - */ 9 - parameterArrayCsv: Array<string> | null; 10 - /** 11 - * This is an array parameter that is sent as multi format (multiple parameter instances) 12 - */ 13 - parameterArrayMulti: Array<string> | null; 14 - /** 15 - * This is an array parameter that is sent as pipes format (pipe-separated values) 16 - */ 17 - parameterArrayPipes: Array<string> | null; 18 - /** 19 - * This is an array parameter that is sent as ssv format (space-separated values) 20 - */ 21 - parameterArraySsv: Array<string> | null; 22 - /** 23 - * This is an array parameter that is sent as tsv format (tab-separated values) 24 - */ 25 - parameterArrayTsv: Array<string> | null; 26 - }; 27 - 28 - export class CollectionFormatService { 29 - /** 30 - * @throws ApiError 31 - */ 32 - public static collectionFormat(data: TDataCollectionFormat): CancelablePromise<void> { 33 - const { parameterArrayCsv, parameterArrayMulti, parameterArrayPipes, parameterArraySsv, parameterArrayTsv } = 34 - data; 35 - return __request(OpenAPI, { 36 - method: 'GET', 37 - url: '/api/v{api-version}/collectionFormat', 38 - query: { 39 - parameterArrayCSV: parameterArrayCsv, 40 - parameterArraySSV: parameterArraySsv, 41 - parameterArrayTSV: parameterArrayTsv, 42 - parameterArrayPipes, 43 - parameterArrayMulti, 44 - }, 45 - }); 46 - } 47 - }
-76
test/__snapshots__/v3_enums_typescript/services/ComplexService.ts.snap
··· 1 - import type { ModelWithArray, ModelWithDictionary, ModelWithEnum, ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataComplexTypes = { 7 - /** 8 - * Parameter containing object 9 - */ 10 - parameterObject: { 11 - first?: { 12 - second?: { 13 - third?: string; 14 - }; 15 - }; 16 - }; 17 - /** 18 - * Parameter containing reference 19 - */ 20 - parameterReference: ModelWithString; 21 - }; 22 - export type TDataComplexParams = { 23 - id: number; 24 - requestBody?: { 25 - readonly key: string | null; 26 - name: string | null; 27 - enabled?: boolean; 28 - readonly type: 'Monkey' | 'Horse' | 'Bird'; 29 - listOfModels?: Array<ModelWithString> | null; 30 - listOfStrings?: Array<string> | null; 31 - parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; 32 - readonly user?: { 33 - readonly id?: number; 34 - readonly name?: string | null; 35 - }; 36 - }; 37 - }; 38 - 39 - export class ComplexService { 40 - /** 41 - * @returns ModelWithString Successful response 42 - * @throws ApiError 43 - */ 44 - public static complexTypes(data: TDataComplexTypes): CancelablePromise<Array<ModelWithString>> { 45 - const { parameterObject, parameterReference } = data; 46 - return __request(OpenAPI, { 47 - method: 'GET', 48 - url: '/api/v{api-version}/complex', 49 - query: { 50 - parameterObject, 51 - parameterReference, 52 - }, 53 - errors: { 54 - 400: `400 server error`, 55 - 500: `500 server error`, 56 - }, 57 - }); 58 - } 59 - 60 - /** 61 - * @returns ModelWithString Success 62 - * @throws ApiError 63 - */ 64 - public static complexParams(data: TDataComplexParams): CancelablePromise<ModelWithString> { 65 - const { id, requestBody } = data; 66 - return __request(OpenAPI, { 67 - method: 'PUT', 68 - url: '/api/v{api-version}/complex/{id}', 69 - path: { 70 - id, 71 - }, 72 - body: requestBody, 73 - mediaType: 'application/json-patch+json', 74 - }); 75 - } 76 - }
-36
test/__snapshots__/v3_enums_typescript/services/DefaultService.ts.snap
··· 1 - import type { ModelWithArrayReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnly } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataPostServiceWithEmptyTag = { 7 - requestBody: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 8 - }; 9 - 10 - export class DefaultService { 11 - /** 12 - * @throws ApiError 13 - */ 14 - public static serviceWithEmptyTag(): CancelablePromise<void> { 15 - return __request(OpenAPI, { 16 - method: 'GET', 17 - url: '/api/v{api-version}/no-tag', 18 - }); 19 - } 20 - 21 - /** 22 - * @returns ModelWithReadOnlyAndWriteOnly 23 - * @throws ApiError 24 - */ 25 - public static postServiceWithEmptyTag( 26 - data: TDataPostServiceWithEmptyTag 27 - ): CancelablePromise<ModelWithReadOnlyAndWriteOnly> { 28 - const { requestBody } = data; 29 - return __request(OpenAPI, { 30 - method: 'POST', 31 - url: '/api/v{api-version}/no-tag', 32 - body: requestBody, 33 - mediaType: 'application/json', 34 - }); 35 - } 36 - }
-169
test/__snapshots__/v3_enums_typescript/services/DefaultsService.ts.snap
··· 1 - import type { ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataCallWithDefaultParameters = { 7 - /** 8 - * This is a simple boolean with default value 9 - */ 10 - parameterBoolean?: boolean | null; 11 - /** 12 - * This is a simple enum with default value 13 - */ 14 - parameterEnum?: 'Success' | 'Warning' | 'Error'; 15 - /** 16 - * This is a simple model with default value 17 - */ 18 - parameterModel?: ModelWithString | null; 19 - /** 20 - * This is a simple number with default value 21 - */ 22 - parameterNumber?: number | null; 23 - /** 24 - * This is a simple string with default value 25 - */ 26 - parameterString?: string | null; 27 - }; 28 - export type TDataCallWithDefaultOptionalParameters = { 29 - /** 30 - * This is a simple boolean that is optional with default value 31 - */ 32 - parameterBoolean?: boolean; 33 - /** 34 - * This is a simple enum that is optional with default value 35 - */ 36 - parameterEnum?: 'Success' | 'Warning' | 'Error'; 37 - /** 38 - * This is a simple model that is optional with default value 39 - */ 40 - parameterModel?: ModelWithString; 41 - /** 42 - * This is a simple number that is optional with default value 43 - */ 44 - parameterNumber?: number; 45 - /** 46 - * This is a simple string that is optional with default value 47 - */ 48 - parameterString?: string; 49 - }; 50 - export type TDataCallToTestOrderOfParams = { 51 - /** 52 - * This is a optional string with default 53 - */ 54 - parameterOptionalStringWithDefault?: string; 55 - /** 56 - * This is a optional string with empty default 57 - */ 58 - parameterOptionalStringWithEmptyDefault?: string; 59 - /** 60 - * This is a optional string with no default 61 - */ 62 - parameterOptionalStringWithNoDefault?: string; 63 - /** 64 - * This is a string that can be null with default 65 - */ 66 - parameterStringNullableWithDefault?: string | null; 67 - /** 68 - * This is a string that can be null with no default 69 - */ 70 - parameterStringNullableWithNoDefault?: string | null; 71 - /** 72 - * This is a string with default 73 - */ 74 - parameterStringWithDefault?: string; 75 - /** 76 - * This is a string with empty default 77 - */ 78 - parameterStringWithEmptyDefault?: string; 79 - /** 80 - * This is a string with no default 81 - */ 82 - parameterStringWithNoDefault: string; 83 - }; 84 - 85 - export class DefaultsService { 86 - /** 87 - * @throws ApiError 88 - */ 89 - public static callWithDefaultParameters(data: TDataCallWithDefaultParameters = {}): CancelablePromise<void> { 90 - const { 91 - parameterBoolean = true, 92 - parameterEnum = 'Success', 93 - parameterModel = { 94 - prop: 'Hello World!', 95 - }, 96 - parameterNumber = 123, 97 - parameterString = 'Hello World!', 98 - } = data; 99 - return __request(OpenAPI, { 100 - method: 'GET', 101 - url: '/api/v{api-version}/defaults', 102 - query: { 103 - parameterString, 104 - parameterNumber, 105 - parameterBoolean, 106 - parameterEnum, 107 - parameterModel, 108 - }, 109 - }); 110 - } 111 - 112 - /** 113 - * @throws ApiError 114 - */ 115 - public static callWithDefaultOptionalParameters( 116 - data: TDataCallWithDefaultOptionalParameters = {} 117 - ): CancelablePromise<void> { 118 - const { 119 - parameterBoolean = true, 120 - parameterEnum = 'Success', 121 - parameterModel = { 122 - prop: 'Hello World!', 123 - }, 124 - parameterNumber = 123, 125 - parameterString = 'Hello World!', 126 - } = data; 127 - return __request(OpenAPI, { 128 - method: 'POST', 129 - url: '/api/v{api-version}/defaults', 130 - query: { 131 - parameterString, 132 - parameterNumber, 133 - parameterBoolean, 134 - parameterEnum, 135 - parameterModel, 136 - }, 137 - }); 138 - } 139 - 140 - /** 141 - * @throws ApiError 142 - */ 143 - public static callToTestOrderOfParams(data: TDataCallToTestOrderOfParams): CancelablePromise<void> { 144 - const { 145 - parameterOptionalStringWithDefault = 'Hello World!', 146 - parameterOptionalStringWithEmptyDefault = '', 147 - parameterOptionalStringWithNoDefault, 148 - parameterStringNullableWithDefault = null, 149 - parameterStringNullableWithNoDefault, 150 - parameterStringWithDefault = 'Hello World!', 151 - parameterStringWithEmptyDefault = '', 152 - parameterStringWithNoDefault, 153 - } = data; 154 - return __request(OpenAPI, { 155 - method: 'PUT', 156 - url: '/api/v{api-version}/defaults', 157 - query: { 158 - parameterOptionalStringWithDefault, 159 - parameterOptionalStringWithEmptyDefault, 160 - parameterOptionalStringWithNoDefault, 161 - parameterStringWithDefault, 162 - parameterStringWithEmptyDefault, 163 - parameterStringWithNoDefault, 164 - parameterStringNullableWithNoDefault, 165 - parameterStringNullableWithDefault, 166 - }, 167 - }); 168 - } 169 - }
-28
test/__snapshots__/v3_enums_typescript/services/DeprecatedService.ts.snap
··· 1 - import type { DeprecatedModel } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataDeprecatedCall = { 7 - /** 8 - * This parameter is deprecated 9 - */ 10 - parameter: DeprecatedModel | null; 11 - }; 12 - 13 - export class DeprecatedService { 14 - /** 15 - * @deprecated 16 - * @throws ApiError 17 - */ 18 - public static deprecatedCall(data: TDataDeprecatedCall): CancelablePromise<void> { 19 - const { parameter } = data; 20 - return __request(OpenAPI, { 21 - method: 'POST', 22 - url: '/api/v{api-version}/parameters/deprecated', 23 - headers: { 24 - parameter, 25 - }, 26 - }); 27 - } 28 - }
-61
test/__snapshots__/v3_enums_typescript/services/DescriptionsService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataCallWithDescriptions = { 6 - /** 7 - * Testing backticks in string: `backticks` and ```multiple backticks``` should work 8 - */ 9 - parameterWithBackticks?: unknown; 10 - /** 11 - * Testing multiline comments in string: First line 12 - * Second line 13 - * 14 - * Fourth line 15 - */ 16 - parameterWithBreaks?: unknown; 17 - /** 18 - * Testing expression placeholders in string: ${expression} should work 19 - */ 20 - parameterWithExpressionPlaceholders?: unknown; 21 - /** 22 - * Testing quotes in string: 'single quote''' and "double quotes""" should work 23 - */ 24 - parameterWithQuotes?: unknown; 25 - /** 26 - * Testing reserved characters in string: * inline * and ** inline ** should work 27 - */ 28 - parameterWithReservedCharacters?: unknown; 29 - /** 30 - * Testing slashes in string: \backwards\\\ and /forwards/// should work 31 - */ 32 - parameterWithSlashes?: unknown; 33 - }; 34 - 35 - export class DescriptionsService { 36 - /** 37 - * @throws ApiError 38 - */ 39 - public static callWithDescriptions(data: TDataCallWithDescriptions = {}): CancelablePromise<void> { 40 - const { 41 - parameterWithBackticks, 42 - parameterWithBreaks, 43 - parameterWithExpressionPlaceholders, 44 - parameterWithQuotes, 45 - parameterWithReservedCharacters, 46 - parameterWithSlashes, 47 - } = data; 48 - return __request(OpenAPI, { 49 - method: 'POST', 50 - url: '/api/v{api-version}/descriptions/', 51 - query: { 52 - parameterWithBreaks, 53 - parameterWithBackticks, 54 - parameterWithSlashes, 55 - parameterWithExpressionPlaceholders, 56 - parameterWithQuotes, 57 - parameterWithReservedCharacters, 58 - }, 59 - }); 60 - } 61 - }
-45
test/__snapshots__/v3_enums_typescript/services/DuplicateService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class DuplicateService { 6 - /** 7 - * @throws ApiError 8 - */ 9 - public static duplicateName(): CancelablePromise<void> { 10 - return __request(OpenAPI, { 11 - method: 'GET', 12 - url: '/api/v{api-version}/duplicate', 13 - }); 14 - } 15 - 16 - /** 17 - * @throws ApiError 18 - */ 19 - public static duplicateName1(): CancelablePromise<void> { 20 - return __request(OpenAPI, { 21 - method: 'POST', 22 - url: '/api/v{api-version}/duplicate', 23 - }); 24 - } 25 - 26 - /** 27 - * @throws ApiError 28 - */ 29 - public static duplicateName2(): CancelablePromise<void> { 30 - return __request(OpenAPI, { 31 - method: 'PUT', 32 - url: '/api/v{api-version}/duplicate', 33 - }); 34 - } 35 - 36 - /** 37 - * @throws ApiError 38 - */ 39 - public static duplicateName3(): CancelablePromise<void> { 40 - return __request(OpenAPI, { 41 - method: 'DELETE', 42 - url: '/api/v{api-version}/duplicate', 43 - }); 44 - } 45 - }
-33
test/__snapshots__/v3_enums_typescript/services/ErrorService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataTestErrorCode = { 6 - /** 7 - * Status code to return 8 - */ 9 - status: number; 10 - }; 11 - 12 - export class ErrorService { 13 - /** 14 - * @returns any Custom message: Successful response 15 - * @throws ApiError 16 - */ 17 - public static testErrorCode(data: TDataTestErrorCode): CancelablePromise<any> { 18 - const { status } = data; 19 - return __request(OpenAPI, { 20 - method: 'POST', 21 - url: '/api/v{api-version}/error', 22 - query: { 23 - status, 24 - }, 25 - errors: { 26 - 500: `Custom message: Internal Server Error`, 27 - 501: `Custom message: Not Implemented`, 28 - 502: `Custom message: Bad Gateway`, 29 - 503: `Custom message: Service Unavailable`, 30 - }, 31 - }); 32 - } 33 - }
-24
test/__snapshots__/v3_enums_typescript/services/FileResponseService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataFileResponse = { 6 - id: string; 7 - }; 8 - 9 - export class FileResponseService { 10 - /** 11 - * @returns binary Success 12 - * @throws ApiError 13 - */ 14 - public static fileResponse(data: TDataFileResponse): CancelablePromise<Blob | File> { 15 - const { id } = data; 16 - return __request(OpenAPI, { 17 - method: 'GET', 18 - url: '/api/v{api-version}/file/{id}', 19 - path: { 20 - id, 21 - }, 22 - }); 23 - } 24 - }
-33
test/__snapshots__/v3_enums_typescript/services/FormDataService.ts.snap
··· 1 - import type { ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataPostApiFormData = { 7 - /** 8 - * A reusable request body 9 - */ 10 - formData?: ModelWithString; 11 - /** 12 - * This is a reusable parameter 13 - */ 14 - parameter?: string; 15 - }; 16 - 17 - export class FormDataService { 18 - /** 19 - * @throws ApiError 20 - */ 21 - public static postApiFormData(data: TDataPostApiFormData = {}): CancelablePromise<void> { 22 - const { formData, parameter } = data; 23 - return __request(OpenAPI, { 24 - method: 'POST', 25 - url: '/api/v{api-version}/formData/', 26 - query: { 27 - parameter, 28 - }, 29 - formData: formData, 30 - mediaType: 'multipart/form-data', 31 - }); 32 - } 33 - }
-21
test/__snapshots__/v3_enums_typescript/services/HeaderService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class HeaderService { 6 - /** 7 - * @returns string Successful response 8 - * @throws ApiError 9 - */ 10 - public static callWithResultFromHeader(): CancelablePromise<string> { 11 - return __request(OpenAPI, { 12 - method: 'POST', 13 - url: '/api/v{api-version}/header', 14 - responseHeader: 'operation-location', 15 - errors: { 16 - 400: `400 server error`, 17 - 500: `500 server error`, 18 - }, 19 - }); 20 - } 21 - }
-43
test/__snapshots__/v3_enums_typescript/services/MultipartService.ts.snap
··· 1 - import type { ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataMultipartRequest = { 7 - formData?: { 8 - content?: Blob | File; 9 - data?: ModelWithString | null; 10 - }; 11 - }; 12 - 13 - export class MultipartService { 14 - /** 15 - * @throws ApiError 16 - */ 17 - public static multipartRequest(data: TDataMultipartRequest = {}): CancelablePromise<void> { 18 - const { formData } = data; 19 - return __request(OpenAPI, { 20 - method: 'POST', 21 - url: '/api/v{api-version}/multipart', 22 - formData: formData, 23 - mediaType: 'multipart/form-data', 24 - }); 25 - } 26 - 27 - /** 28 - * @returns any OK 29 - * @throws ApiError 30 - */ 31 - public static multipartResponse(): CancelablePromise<{ 32 - file?: Blob | File; 33 - metadata?: { 34 - foo?: string; 35 - bar?: string; 36 - }; 37 - }> { 38 - return __request(OpenAPI, { 39 - method: 'GET', 40 - url: '/api/v{api-version}/multipart', 41 - }); 42 - } 43 - }
-27
test/__snapshots__/v3_enums_typescript/services/MultipleTags1Service.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class MultipleTags1Service { 6 - /** 7 - * @returns void Success 8 - * @throws ApiError 9 - */ 10 - public static dummyA(): CancelablePromise<void> { 11 - return __request(OpenAPI, { 12 - method: 'GET', 13 - url: '/api/v{api-version}/multiple-tags/a', 14 - }); 15 - } 16 - 17 - /** 18 - * @returns void Success 19 - * @throws ApiError 20 - */ 21 - public static dummyB(): CancelablePromise<void> { 22 - return __request(OpenAPI, { 23 - method: 'GET', 24 - url: '/api/v{api-version}/multiple-tags/b', 25 - }); 26 - } 27 - }
-27
test/__snapshots__/v3_enums_typescript/services/MultipleTags2Service.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class MultipleTags2Service { 6 - /** 7 - * @returns void Success 8 - * @throws ApiError 9 - */ 10 - public static dummyA(): CancelablePromise<void> { 11 - return __request(OpenAPI, { 12 - method: 'GET', 13 - url: '/api/v{api-version}/multiple-tags/a', 14 - }); 15 - } 16 - 17 - /** 18 - * @returns void Success 19 - * @throws ApiError 20 - */ 21 - public static dummyB(): CancelablePromise<void> { 22 - return __request(OpenAPI, { 23 - method: 'GET', 24 - url: '/api/v{api-version}/multiple-tags/b', 25 - }); 26 - } 27 - }
-16
test/__snapshots__/v3_enums_typescript/services/MultipleTags3Service.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class MultipleTags3Service { 6 - /** 7 - * @returns void Success 8 - * @throws ApiError 9 - */ 10 - public static dummyB(): CancelablePromise<void> { 11 - return __request(OpenAPI, { 12 - method: 'GET', 13 - url: '/api/v{api-version}/multiple-tags/b', 14 - }); 15 - } 16 - }
-28
test/__snapshots__/v3_enums_typescript/services/NoContentService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class NoContentService { 6 - /** 7 - * @returns void Success 8 - * @throws ApiError 9 - */ 10 - public static callWithNoContentResponse(): CancelablePromise<void> { 11 - return __request(OpenAPI, { 12 - method: 'GET', 13 - url: '/api/v{api-version}/no-content', 14 - }); 15 - } 16 - 17 - /** 18 - * @returns number Response is a simple number 19 - * @returns void Success 20 - * @throws ApiError 21 - */ 22 - public static callWithResponseAndNoContentResponse(): CancelablePromise<number | void> { 23 - return __request(OpenAPI, { 24 - method: 'GET', 25 - url: '/api/v{api-version}/multiple-tags/response-and-no-content', 26 - }); 27 - } 28 - }
-30
test/__snapshots__/v3_enums_typescript/services/NonAsciiÆøåÆøÅöôêÊService.ts.snap
··· 1 - import type { NonAsciiStringæøåÆØÅöôêÊ字符串 } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataNonAsciiæøåÆøÅöôêÊ字符串 = { 7 - /** 8 - * Dummy input param 9 - */ 10 - nonAsciiParamæøåÆøÅöôêÊ: number; 11 - }; 12 - 13 - export class NonAsciiÆøåÆøÅöôêÊService { 14 - /** 15 - * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response 16 - * @throws ApiError 17 - */ 18 - public static nonAsciiæøåÆøÅöôêÊ字符串( 19 - data: TDataNonAsciiæøåÆøÅöôêÊ字符串 20 - ): CancelablePromise<Array<NonAsciiStringæøåÆØÅöôêÊ字符串>> { 21 - const { nonAsciiParamæøåÆøÅöôêÊ } = data; 22 - return __request(OpenAPI, { 23 - method: 'POST', 24 - url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 25 - query: { 26 - nonAsciiParamæøåÆØÅöôêÊ: nonAsciiParamæøåÆøÅöôêÊ, 27 - }, 28 - }); 29 - } 30 - }
-230
test/__snapshots__/v3_enums_typescript/services/ParametersService.ts.snap
··· 1 - import type { ModelWithNestedArrayEnumsDataFoo, ModelWithOneOfEnum, ModelWithString, Pageable } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataDeleteFoo = { 7 - /** 8 - * bar in method 9 - */ 10 - bar: string; 11 - /** 12 - * foo in method 13 - */ 14 - foo: string; 15 - }; 16 - export type TDataCallWithParameters = { 17 - fooAllOfEnum: ModelWithNestedArrayEnumsDataFoo; 18 - fooRefEnum?: ModelWithNestedArrayEnumsDataFoo; 19 - /** 20 - * This is the parameter that goes into the cookie 21 - */ 22 - parameterCookie: string | null; 23 - /** 24 - * This is the parameter that goes into the form data 25 - */ 26 - parameterForm: string | null; 27 - /** 28 - * This is the parameter that goes into the header 29 - */ 30 - parameterHeader: string | null; 31 - /** 32 - * This is the parameter that goes into the path 33 - */ 34 - parameterPath: string | null; 35 - /** 36 - * This is the parameter that goes into the query params 37 - */ 38 - parameterQuery: string | null; 39 - /** 40 - * This is the parameter that goes into the body 41 - */ 42 - requestBody: ModelWithString | null; 43 - }; 44 - export type TDataCallWithWeirdParameterNames = { 45 - /** 46 - * This is the parameter with a reserved keyword 47 - */ 48 - _default?: string; 49 - /** 50 - * This is the parameter that goes into the cookie 51 - */ 52 - parameterCookie: string | null; 53 - /** 54 - * This is the parameter that goes into the request form data 55 - */ 56 - parameterForm: string | null; 57 - /** 58 - * This is the parameter that goes into the request header 59 - */ 60 - parameterHeader: string | null; 61 - /** 62 - * This is the parameter that goes into the path 63 - */ 64 - parameterPath1?: string; 65 - /** 66 - * This is the parameter that goes into the path 67 - */ 68 - parameterPath2?: string; 69 - /** 70 - * This is the parameter that goes into the path 71 - */ 72 - parameterPath3?: string; 73 - /** 74 - * This is the parameter that goes into the request query params 75 - */ 76 - parameterQuery: string | null; 77 - /** 78 - * This is the parameter that goes into the body 79 - */ 80 - requestBody: ModelWithString | null; 81 - }; 82 - export type TDataGetCallWithOptionalParam = { 83 - /** 84 - * This is an optional parameter 85 - */ 86 - parameter?: string; 87 - /** 88 - * This is a required parameter 89 - */ 90 - requestBody: ModelWithOneOfEnum; 91 - }; 92 - export type TDataPostCallWithOptionalParam = { 93 - /** 94 - * This is a required parameter 95 - */ 96 - parameter: Pageable; 97 - /** 98 - * This is an optional parameter 99 - */ 100 - requestBody?: ModelWithString; 101 - }; 102 - 103 - export class ParametersService { 104 - /** 105 - * @throws ApiError 106 - */ 107 - public static deleteFoo(data: TDataDeleteFoo): CancelablePromise<void> { 108 - const { bar, foo } = data; 109 - return __request(OpenAPI, { 110 - method: 'DELETE', 111 - url: '/api/v{api-version}/foo/{foo}/bar/{bar}', 112 - path: { 113 - foo, 114 - bar, 115 - }, 116 - }); 117 - } 118 - 119 - /** 120 - * @throws ApiError 121 - */ 122 - public static callWithParameters(data: TDataCallWithParameters): CancelablePromise<void> { 123 - const { 124 - fooAllOfEnum, 125 - fooRefEnum, 126 - parameterCookie, 127 - parameterForm, 128 - parameterHeader, 129 - parameterPath, 130 - parameterQuery, 131 - requestBody, 132 - } = data; 133 - return __request(OpenAPI, { 134 - method: 'POST', 135 - url: '/api/v{api-version}/parameters/{parameterPath}', 136 - path: { 137 - parameterPath, 138 - }, 139 - cookies: { 140 - parameterCookie, 141 - }, 142 - headers: { 143 - parameterHeader, 144 - }, 145 - query: { 146 - foo_ref_enum: fooRefEnum, 147 - foo_all_of_enum: fooAllOfEnum, 148 - parameterQuery, 149 - }, 150 - formData: { 151 - parameterForm, 152 - }, 153 - body: requestBody, 154 - mediaType: 'application/json', 155 - }); 156 - } 157 - 158 - /** 159 - * @throws ApiError 160 - */ 161 - public static callWithWeirdParameterNames(data: TDataCallWithWeirdParameterNames): CancelablePromise<void> { 162 - const { 163 - _default, 164 - parameterCookie, 165 - parameterForm, 166 - parameterHeader, 167 - parameterPath1, 168 - parameterPath2, 169 - parameterPath3, 170 - parameterQuery, 171 - requestBody, 172 - } = data; 173 - return __request(OpenAPI, { 174 - method: 'POST', 175 - url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', 176 - path: { 177 - 'parameter.path.1': parameterPath1, 178 - 'parameter-path-2': parameterPath2, 179 - 'PARAMETER-PATH-3': parameterPath3, 180 - }, 181 - cookies: { 182 - 'PARAMETER-COOKIE': parameterCookie, 183 - }, 184 - headers: { 185 - 'parameter.header': parameterHeader, 186 - }, 187 - query: { 188 - default: _default, 189 - 'parameter-query': parameterQuery, 190 - }, 191 - formData: { 192 - parameter_form: parameterForm, 193 - }, 194 - body: requestBody, 195 - mediaType: 'application/json', 196 - }); 197 - } 198 - 199 - /** 200 - * @throws ApiError 201 - */ 202 - public static getCallWithOptionalParam(data: TDataGetCallWithOptionalParam): CancelablePromise<void> { 203 - const { parameter, requestBody } = data; 204 - return __request(OpenAPI, { 205 - method: 'GET', 206 - url: '/api/v{api-version}/parameters/', 207 - query: { 208 - parameter, 209 - }, 210 - body: requestBody, 211 - mediaType: 'application/json', 212 - }); 213 - } 214 - 215 - /** 216 - * @throws ApiError 217 - */ 218 - public static postCallWithOptionalParam(data: TDataPostCallWithOptionalParam): CancelablePromise<void> { 219 - const { parameter, requestBody } = data; 220 - return __request(OpenAPI, { 221 - method: 'POST', 222 - url: '/api/v{api-version}/parameters/', 223 - query: { 224 - parameter, 225 - }, 226 - body: requestBody, 227 - mediaType: 'application/json', 228 - }); 229 - } 230 - }
-33
test/__snapshots__/v3_enums_typescript/services/RequestBodyService.ts.snap
··· 1 - import type { ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataPostApiRequestBody = { 7 - /** 8 - * A reusable request body 9 - */ 10 - foo?: ModelWithString; 11 - /** 12 - * This is a reusable parameter 13 - */ 14 - parameter?: string; 15 - }; 16 - 17 - export class RequestBodyService { 18 - /** 19 - * @throws ApiError 20 - */ 21 - public static postApiRequestBody(data: TDataPostApiRequestBody = {}): CancelablePromise<void> { 22 - const { foo, parameter } = data; 23 - return __request(OpenAPI, { 24 - method: 'POST', 25 - url: '/api/v{api-version}/requestBody/', 26 - query: { 27 - parameter, 28 - }, 29 - body: foo, 30 - mediaType: 'application/json', 31 - }); 32 - } 33 - }
-73
test/__snapshots__/v3_enums_typescript/services/ResponseService.ts.snap
··· 1 - import type { ModelThatExtends, ModelThatExtendsExtends, ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export class ResponseService { 7 - /** 8 - * @returns number Response is a simple number 9 - * @returns void Success 10 - * @throws ApiError 11 - */ 12 - public static callWithResponseAndNoContentResponse(): CancelablePromise<number | void> { 13 - return __request(OpenAPI, { 14 - method: 'GET', 15 - url: '/api/v{api-version}/multiple-tags/response-and-no-content', 16 - }); 17 - } 18 - 19 - /** 20 - * @returns ModelWithString 21 - * @throws ApiError 22 - */ 23 - public static callWithResponse(): CancelablePromise<ModelWithString> { 24 - return __request(OpenAPI, { 25 - method: 'GET', 26 - url: '/api/v{api-version}/response', 27 - }); 28 - } 29 - 30 - /** 31 - * @returns ModelWithString Message for default response 32 - * @throws ApiError 33 - */ 34 - public static callWithDuplicateResponses(): CancelablePromise<ModelWithString> { 35 - return __request(OpenAPI, { 36 - method: 'POST', 37 - url: '/api/v{api-version}/response', 38 - errors: { 39 - 500: `Message for 500 error`, 40 - 501: `Message for 501 error`, 41 - 502: `Message for 502 error`, 42 - }, 43 - }); 44 - } 45 - 46 - /** 47 - * @returns any Message for 200 response 48 - * @returns ModelWithString Message for default response 49 - * @returns ModelThatExtends Message for 201 response 50 - * @returns ModelThatExtendsExtends Message for 202 response 51 - * @throws ApiError 52 - */ 53 - public static callWithResponses(): CancelablePromise< 54 - | { 55 - readonly '@namespace.string'?: string; 56 - readonly '@namespace.integer'?: number; 57 - readonly value?: Array<ModelWithString>; 58 - } 59 - | ModelWithString 60 - | ModelThatExtends 61 - | ModelThatExtendsExtends 62 - > { 63 - return __request(OpenAPI, { 64 - method: 'PUT', 65 - url: '/api/v{api-version}/response', 66 - errors: { 67 - 500: `Message for 500 error`, 68 - 501: `Message for 501 error`, 69 - 502: `Message for 502 error`, 70 - }, 71 - }); 72 - } 73 - }
-75
test/__snapshots__/v3_enums_typescript/services/SimpleService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class SimpleService { 6 - /** 7 - * @throws ApiError 8 - */ 9 - public static getCallWithoutParametersAndResponse(): CancelablePromise<void> { 10 - return __request(OpenAPI, { 11 - method: 'GET', 12 - url: '/api/v{api-version}/simple', 13 - }); 14 - } 15 - 16 - /** 17 - * @throws ApiError 18 - */ 19 - public static putCallWithoutParametersAndResponse(): CancelablePromise<void> { 20 - return __request(OpenAPI, { 21 - method: 'PUT', 22 - url: '/api/v{api-version}/simple', 23 - }); 24 - } 25 - 26 - /** 27 - * @throws ApiError 28 - */ 29 - public static postCallWithoutParametersAndResponse(): CancelablePromise<void> { 30 - return __request(OpenAPI, { 31 - method: 'POST', 32 - url: '/api/v{api-version}/simple', 33 - }); 34 - } 35 - 36 - /** 37 - * @throws ApiError 38 - */ 39 - public static deleteCallWithoutParametersAndResponse(): CancelablePromise<void> { 40 - return __request(OpenAPI, { 41 - method: 'DELETE', 42 - url: '/api/v{api-version}/simple', 43 - }); 44 - } 45 - 46 - /** 47 - * @throws ApiError 48 - */ 49 - public static optionsCallWithoutParametersAndResponse(): CancelablePromise<void> { 50 - return __request(OpenAPI, { 51 - method: 'OPTIONS', 52 - url: '/api/v{api-version}/simple', 53 - }); 54 - } 55 - 56 - /** 57 - * @throws ApiError 58 - */ 59 - public static headCallWithoutParametersAndResponse(): CancelablePromise<void> { 60 - return __request(OpenAPI, { 61 - method: 'HEAD', 62 - url: '/api/v{api-version}/simple', 63 - }); 64 - } 65 - 66 - /** 67 - * @throws ApiError 68 - */ 69 - public static patchCallWithoutParametersAndResponse(): CancelablePromise<void> { 70 - return __request(OpenAPI, { 71 - method: 'PATCH', 72 - url: '/api/v{api-version}/simple', 73 - }); 74 - } 75 - }
-76
test/__snapshots__/v3_enums_typescript/services/TypesService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataTypes = { 6 - /** 7 - * This is a number parameter 8 - */ 9 - id?: number; 10 - /** 11 - * This is an array parameter 12 - */ 13 - parameterArray: Array<string> | null; 14 - /** 15 - * This is a boolean parameter 16 - */ 17 - parameterBoolean?: boolean | null; 18 - /** 19 - * This is a dictionary parameter 20 - */ 21 - parameterDictionary: Record<string, unknown> | null; 22 - /** 23 - * This is an enum parameter 24 - */ 25 - parameterEnum: 'Success' | 'Warning' | 'Error' | null; 26 - /** 27 - * This is a number parameter 28 - */ 29 - parameterNumber?: number; 30 - /** 31 - * This is an object parameter 32 - */ 33 - parameterObject?: Record<string, unknown> | null; 34 - /** 35 - * This is a string parameter 36 - */ 37 - parameterString?: string | null; 38 - }; 39 - 40 - export class TypesService { 41 - /** 42 - * @returns number Response is a simple number 43 - * @returns string Response is a simple string 44 - * @returns boolean Response is a simple boolean 45 - * @returns unknown Response is a simple object 46 - * @throws ApiError 47 - */ 48 - public static types(data: TDataTypes): CancelablePromise<number | string | boolean | Record<string, unknown>> { 49 - const { 50 - id, 51 - parameterArray, 52 - parameterBoolean = true, 53 - parameterDictionary, 54 - parameterEnum, 55 - parameterNumber = 123, 56 - parameterObject = null, 57 - parameterString = 'default', 58 - } = data; 59 - return __request(OpenAPI, { 60 - method: 'GET', 61 - url: '/api/v{api-version}/types', 62 - path: { 63 - id, 64 - }, 65 - query: { 66 - parameterNumber, 67 - parameterString, 68 - parameterBoolean, 69 - parameterObject, 70 - parameterArray, 71 - parameterDictionary, 72 - parameterEnum, 73 - }, 74 - }); 75 - } 76 - }
-27
test/__snapshots__/v3_enums_typescript/services/UploadService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataUploadFile = { 6 - /** 7 - * Supply a file reference for upload 8 - */ 9 - file: Blob | File; 10 - }; 11 - 12 - export class UploadService { 13 - /** 14 - * @returns boolean 15 - * @throws ApiError 16 - */ 17 - public static uploadFile(data: TDataUploadFile): CancelablePromise<boolean> { 18 - const { file } = data; 19 - return __request(OpenAPI, { 20 - method: 'POST', 21 - url: '/api/v{api-version}/upload', 22 - formData: { 23 - file, 24 - }, 25 - }); 26 - } 27 - }
-23
test/__snapshots__/v3_enums_typescript/services/index.ts.snap
··· 1 - export { CollectionFormatService } from './CollectionFormatService'; 2 - export { ComplexService } from './ComplexService'; 3 - export { DefaultService } from './DefaultService'; 4 - export { DefaultsService } from './DefaultsService'; 5 - export { DeprecatedService } from './DeprecatedService'; 6 - export { DescriptionsService } from './DescriptionsService'; 7 - export { DuplicateService } from './DuplicateService'; 8 - export { ErrorService } from './ErrorService'; 9 - export { FileResponseService } from './FileResponseService'; 10 - export { FormDataService } from './FormDataService'; 11 - export { HeaderService } from './HeaderService'; 12 - export { MultipartService } from './MultipartService'; 13 - export { MultipleTags1Service } from './MultipleTags1Service'; 14 - export { MultipleTags2Service } from './MultipleTags2Service'; 15 - export { MultipleTags3Service } from './MultipleTags3Service'; 16 - export { NoContentService } from './NoContentService'; 17 - export { NonAsciiÆøåÆøÅöôêÊService } from './NonAsciiÆøåÆøÅöôêÊService'; 18 - export { ParametersService } from './ParametersService'; 19 - export { RequestBodyService } from './RequestBodyService'; 20 - export { ResponseService } from './ResponseService'; 21 - export { SimpleService } from './SimpleService'; 22 - export { TypesService } from './TypesService'; 23 - export { UploadService } from './UploadService';
+1155
test/__snapshots__/v3_experimental/services.ts.snap
··· 1 + import type { CancelablePromise } from './core/CancelablePromise'; 2 + import { OpenAPI } from './core/OpenAPI'; 3 + import { request as __request } from './core/request'; 4 + 5 + import type { 6 + ModelWithArrayReadOnlyAndWriteOnly, 7 + ModelWithReadOnlyAndWriteOnly, 8 + ModelWithNestedArrayEnumsDataFoo, 9 + ModelWithOneOfEnum, 10 + ModelWithString, 11 + Pageable, 12 + DeprecatedModel, 13 + ModelThatExtends, 14 + ModelThatExtendsExtends, 15 + ModelWithArray, 16 + ModelWithDictionary, 17 + ModelWithEnum, 18 + NonAsciiStringæøåÆØÅöôêÊ字符串, 19 + } from './models'; 20 + 21 + export type TDataPostServiceWithEmptyTag = { 22 + requestBody: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 23 + 24 + query?: {}; 25 + }; 26 + 27 + export class DefaultService { 28 + /** 29 + * @throws ApiError 30 + */ 31 + public static serviceWithEmptyTag(): CancelablePromise<void> { 32 + return __request(OpenAPI, { 33 + method: 'GET', 34 + url: '/api/v{api-version}/no-tag', 35 + }); 36 + } 37 + 38 + /** 39 + * @returns ModelWithReadOnlyAndWriteOnly 40 + * @throws ApiError 41 + */ 42 + public static postServiceWithEmptyTag( 43 + data: TDataPostServiceWithEmptyTag 44 + ): CancelablePromise<ModelWithReadOnlyAndWriteOnly> { 45 + const { query, requestBody } = data; 46 + return __request(OpenAPI, { 47 + method: 'POST', 48 + url: '/api/v{api-version}/no-tag', 49 + body: requestBody, 50 + mediaType: 'application/json', 51 + }); 52 + } 53 + } 54 + 55 + export class SimpleService { 56 + /** 57 + * @throws ApiError 58 + */ 59 + public static getCallWithoutParametersAndResponse(): CancelablePromise<void> { 60 + return __request(OpenAPI, { 61 + method: 'GET', 62 + url: '/api/v{api-version}/simple', 63 + }); 64 + } 65 + 66 + /** 67 + * @throws ApiError 68 + */ 69 + public static putCallWithoutParametersAndResponse(): CancelablePromise<void> { 70 + return __request(OpenAPI, { 71 + method: 'PUT', 72 + url: '/api/v{api-version}/simple', 73 + }); 74 + } 75 + 76 + /** 77 + * @throws ApiError 78 + */ 79 + public static postCallWithoutParametersAndResponse(): CancelablePromise<void> { 80 + return __request(OpenAPI, { 81 + method: 'POST', 82 + url: '/api/v{api-version}/simple', 83 + }); 84 + } 85 + 86 + /** 87 + * @throws ApiError 88 + */ 89 + public static deleteCallWithoutParametersAndResponse(): CancelablePromise<void> { 90 + return __request(OpenAPI, { 91 + method: 'DELETE', 92 + url: '/api/v{api-version}/simple', 93 + }); 94 + } 95 + 96 + /** 97 + * @throws ApiError 98 + */ 99 + public static optionsCallWithoutParametersAndResponse(): CancelablePromise<void> { 100 + return __request(OpenAPI, { 101 + method: 'OPTIONS', 102 + url: '/api/v{api-version}/simple', 103 + }); 104 + } 105 + 106 + /** 107 + * @throws ApiError 108 + */ 109 + public static headCallWithoutParametersAndResponse(): CancelablePromise<void> { 110 + return __request(OpenAPI, { 111 + method: 'HEAD', 112 + url: '/api/v{api-version}/simple', 113 + }); 114 + } 115 + 116 + /** 117 + * @throws ApiError 118 + */ 119 + public static patchCallWithoutParametersAndResponse(): CancelablePromise<void> { 120 + return __request(OpenAPI, { 121 + method: 'PATCH', 122 + url: '/api/v{api-version}/simple', 123 + }); 124 + } 125 + } 126 + 127 + export type TDataDeleteFoo = { 128 + /** 129 + * bar in method 130 + */ 131 + bar: string; 132 + /** 133 + * foo in method 134 + */ 135 + foo: string; 136 + 137 + query?: {}; 138 + }; 139 + export type TDataCallWithParameters = { 140 + /** 141 + * This is the parameter that goes into the cookie 142 + */ 143 + parameterCookie: string | null; 144 + /** 145 + * This is the parameter that goes into the form data 146 + */ 147 + parameterForm: string | null; 148 + /** 149 + * This is the parameter that goes into the header 150 + */ 151 + parameterHeader: string | null; 152 + /** 153 + * This is the parameter that goes into the path 154 + */ 155 + parameterPath: string | null; 156 + /** 157 + * This is the parameter that goes into the body 158 + */ 159 + requestBody: ModelWithString | null; 160 + 161 + query: { 162 + fooAllOfEnum: ModelWithNestedArrayEnumsDataFoo; 163 + fooRefEnum?: ModelWithNestedArrayEnumsDataFoo; 164 + /** 165 + * This is the parameter that goes into the query params 166 + */ 167 + parameterQuery: string | null; 168 + }; 169 + }; 170 + export type TDataCallWithWeirdParameterNames = { 171 + /** 172 + * This is the parameter that goes into the cookie 173 + */ 174 + parameterCookie: string | null; 175 + /** 176 + * This is the parameter that goes into the request form data 177 + */ 178 + parameterForm: string | null; 179 + /** 180 + * This is the parameter that goes into the request header 181 + */ 182 + parameterHeader: string | null; 183 + /** 184 + * This is the parameter that goes into the path 185 + */ 186 + parameterPath1?: string; 187 + /** 188 + * This is the parameter that goes into the path 189 + */ 190 + parameterPath2?: string; 191 + /** 192 + * This is the parameter that goes into the path 193 + */ 194 + parameterPath3?: string; 195 + /** 196 + * This is the parameter that goes into the body 197 + */ 198 + requestBody: ModelWithString | null; 199 + 200 + query: { 201 + /** 202 + * This is the parameter with a reserved keyword 203 + */ 204 + _default?: string; 205 + /** 206 + * This is the parameter that goes into the request query params 207 + */ 208 + parameterQuery: string | null; 209 + }; 210 + }; 211 + export type TDataGetCallWithOptionalParam = { 212 + /** 213 + * This is a required parameter 214 + */ 215 + requestBody: ModelWithOneOfEnum; 216 + 217 + query?: { 218 + /** 219 + * This is an optional parameter 220 + */ 221 + parameter?: string; 222 + }; 223 + }; 224 + export type TDataPostCallWithOptionalParam = { 225 + /** 226 + * This is an optional parameter 227 + */ 228 + requestBody?: ModelWithString; 229 + 230 + query: { 231 + /** 232 + * This is a required parameter 233 + */ 234 + parameter: Pageable; 235 + }; 236 + }; 237 + 238 + export class ParametersService { 239 + /** 240 + * @throws ApiError 241 + */ 242 + public static deleteFoo(data: TDataDeleteFoo): CancelablePromise<void> { 243 + const { query, bar, foo } = data; 244 + return __request(OpenAPI, { 245 + method: 'DELETE', 246 + url: '/api/v{api-version}/foo/{foo}/bar/{bar}', 247 + path: {}, 248 + }); 249 + } 250 + 251 + /** 252 + * @throws ApiError 253 + */ 254 + public static callWithParameters(data: TDataCallWithParameters): CancelablePromise<void> { 255 + const { query, parameterCookie, parameterForm, parameterHeader, parameterPath, requestBody } = data; 256 + return __request(OpenAPI, { 257 + method: 'POST', 258 + url: '/api/v{api-version}/parameters/{parameterPath}', 259 + path: {}, 260 + cookies: {}, 261 + headers: {}, 262 + query: { 263 + ...query, 264 + }, 265 + formData: {}, 266 + body: requestBody, 267 + mediaType: 'application/json', 268 + }); 269 + } 270 + 271 + /** 272 + * @throws ApiError 273 + */ 274 + public static callWithWeirdParameterNames(data: TDataCallWithWeirdParameterNames): CancelablePromise<void> { 275 + const { 276 + query, 277 + parameterCookie, 278 + parameterForm, 279 + parameterHeader, 280 + parameterPath1, 281 + parameterPath2, 282 + parameterPath3, 283 + requestBody, 284 + } = data; 285 + return __request(OpenAPI, { 286 + method: 'POST', 287 + url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', 288 + path: {}, 289 + cookies: {}, 290 + headers: {}, 291 + query: { 292 + ...query, 293 + }, 294 + formData: {}, 295 + body: requestBody, 296 + mediaType: 'application/json', 297 + }); 298 + } 299 + 300 + /** 301 + * @throws ApiError 302 + */ 303 + public static getCallWithOptionalParam(data: TDataGetCallWithOptionalParam): CancelablePromise<void> { 304 + const { query, requestBody } = data; 305 + return __request(OpenAPI, { 306 + method: 'GET', 307 + url: '/api/v{api-version}/parameters/', 308 + query: { 309 + ...query, 310 + }, 311 + body: requestBody, 312 + mediaType: 'application/json', 313 + }); 314 + } 315 + 316 + /** 317 + * @throws ApiError 318 + */ 319 + public static postCallWithOptionalParam(data: TDataPostCallWithOptionalParam): CancelablePromise<void> { 320 + const { query, requestBody } = data; 321 + return __request(OpenAPI, { 322 + method: 'POST', 323 + url: '/api/v{api-version}/parameters/', 324 + query: { 325 + ...query, 326 + }, 327 + body: requestBody, 328 + mediaType: 'application/json', 329 + }); 330 + } 331 + } 332 + 333 + export type TDataCallWithDescriptions = { 334 + query?: { 335 + /** 336 + * Testing backticks in string: `backticks` and ```multiple backticks``` should work 337 + */ 338 + parameterWithBackticks?: unknown; 339 + /** 340 + * Testing multiline comments in string: First line 341 + * Second line 342 + * 343 + * Fourth line 344 + */ 345 + parameterWithBreaks?: unknown; 346 + /** 347 + * Testing expression placeholders in string: ${expression} should work 348 + */ 349 + parameterWithExpressionPlaceholders?: unknown; 350 + /** 351 + * Testing quotes in string: 'single quote''' and "double quotes""" should work 352 + */ 353 + parameterWithQuotes?: unknown; 354 + /** 355 + * Testing reserved characters in string: * inline * and ** inline ** should work 356 + */ 357 + parameterWithReservedCharacters?: unknown; 358 + /** 359 + * Testing slashes in string: \backwards\\\ and /forwards/// should work 360 + */ 361 + parameterWithSlashes?: unknown; 362 + }; 363 + }; 364 + 365 + export class DescriptionsService { 366 + /** 367 + * @throws ApiError 368 + */ 369 + public static callWithDescriptions(data: TDataCallWithDescriptions = {}): CancelablePromise<void> { 370 + const { query } = data; 371 + return __request(OpenAPI, { 372 + method: 'POST', 373 + url: '/api/v{api-version}/descriptions/', 374 + query: { 375 + ...query, 376 + }, 377 + }); 378 + } 379 + } 380 + 381 + export type TDataDeprecatedCall = { 382 + /** 383 + * This parameter is deprecated 384 + */ 385 + parameter: DeprecatedModel | null; 386 + 387 + query?: {}; 388 + }; 389 + 390 + export class DeprecatedService { 391 + /** 392 + * @deprecated 393 + * @throws ApiError 394 + */ 395 + public static deprecatedCall(data: TDataDeprecatedCall): CancelablePromise<void> { 396 + const { query, parameter } = data; 397 + return __request(OpenAPI, { 398 + method: 'POST', 399 + url: '/api/v{api-version}/parameters/deprecated', 400 + headers: {}, 401 + }); 402 + } 403 + } 404 + 405 + export type TDataPostApiRequestBody = { 406 + /** 407 + * A reusable request body 408 + */ 409 + foo?: ModelWithString; 410 + 411 + query?: { 412 + /** 413 + * This is a reusable parameter 414 + */ 415 + parameter?: string; 416 + }; 417 + }; 418 + 419 + export class RequestBodyService { 420 + /** 421 + * @throws ApiError 422 + */ 423 + public static postApiRequestBody(data: TDataPostApiRequestBody = {}): CancelablePromise<void> { 424 + const { query, foo } = data; 425 + return __request(OpenAPI, { 426 + method: 'POST', 427 + url: '/api/v{api-version}/requestBody/', 428 + query: { 429 + ...query, 430 + }, 431 + body: foo, 432 + mediaType: 'application/json', 433 + }); 434 + } 435 + } 436 + 437 + export type TDataPostApiFormData = { 438 + /** 439 + * A reusable request body 440 + */ 441 + formData?: ModelWithString; 442 + 443 + query?: { 444 + /** 445 + * This is a reusable parameter 446 + */ 447 + parameter?: string; 448 + }; 449 + }; 450 + 451 + export class FormDataService { 452 + /** 453 + * @throws ApiError 454 + */ 455 + public static postApiFormData(data: TDataPostApiFormData = {}): CancelablePromise<void> { 456 + const { query, formData } = data; 457 + return __request(OpenAPI, { 458 + method: 'POST', 459 + url: '/api/v{api-version}/formData/', 460 + query: { 461 + ...query, 462 + }, 463 + formData: formData, 464 + mediaType: 'multipart/form-data', 465 + }); 466 + } 467 + } 468 + 469 + export type TDataCallWithDefaultParameters = { 470 + query?: { 471 + /** 472 + * This is a simple boolean with default value 473 + */ 474 + parameterBoolean?: boolean | null; 475 + /** 476 + * This is a simple enum with default value 477 + */ 478 + parameterEnum?: 'Success' | 'Warning' | 'Error'; 479 + /** 480 + * This is a simple model with default value 481 + */ 482 + parameterModel?: ModelWithString | null; 483 + /** 484 + * This is a simple number with default value 485 + */ 486 + parameterNumber?: number | null; 487 + /** 488 + * This is a simple string with default value 489 + */ 490 + parameterString?: string | null; 491 + }; 492 + }; 493 + export type TDataCallWithDefaultOptionalParameters = { 494 + query?: { 495 + /** 496 + * This is a simple boolean that is optional with default value 497 + */ 498 + parameterBoolean?: boolean; 499 + /** 500 + * This is a simple enum that is optional with default value 501 + */ 502 + parameterEnum?: 'Success' | 'Warning' | 'Error'; 503 + /** 504 + * This is a simple model that is optional with default value 505 + */ 506 + parameterModel?: ModelWithString; 507 + /** 508 + * This is a simple number that is optional with default value 509 + */ 510 + parameterNumber?: number; 511 + /** 512 + * This is a simple string that is optional with default value 513 + */ 514 + parameterString?: string; 515 + }; 516 + }; 517 + export type TDataCallToTestOrderOfParams = { 518 + query: { 519 + /** 520 + * This is a optional string with default 521 + */ 522 + parameterOptionalStringWithDefault?: string; 523 + /** 524 + * This is a optional string with empty default 525 + */ 526 + parameterOptionalStringWithEmptyDefault?: string; 527 + /** 528 + * This is a optional string with no default 529 + */ 530 + parameterOptionalStringWithNoDefault?: string; 531 + /** 532 + * This is a string that can be null with default 533 + */ 534 + parameterStringNullableWithDefault?: string | null; 535 + /** 536 + * This is a string that can be null with no default 537 + */ 538 + parameterStringNullableWithNoDefault?: string | null; 539 + /** 540 + * This is a string with default 541 + */ 542 + parameterStringWithDefault?: string; 543 + /** 544 + * This is a string with empty default 545 + */ 546 + parameterStringWithEmptyDefault?: string; 547 + /** 548 + * This is a string with no default 549 + */ 550 + parameterStringWithNoDefault: string; 551 + }; 552 + }; 553 + 554 + export class DefaultsService { 555 + /** 556 + * @throws ApiError 557 + */ 558 + public static callWithDefaultParameters(data: TDataCallWithDefaultParameters = {}): CancelablePromise<void> { 559 + const { query } = data; 560 + return __request(OpenAPI, { 561 + method: 'GET', 562 + url: '/api/v{api-version}/defaults', 563 + query: { 564 + parameterBoolean: true, 565 + parameterEnum: 'Success', 566 + parameterModel: { 567 + prop: 'Hello World!', 568 + }, 569 + parameterNumber: 123, 570 + parameterString: 'Hello World!', 571 + ...query, 572 + }, 573 + }); 574 + } 575 + 576 + /** 577 + * @throws ApiError 578 + */ 579 + public static callWithDefaultOptionalParameters( 580 + data: TDataCallWithDefaultOptionalParameters = {} 581 + ): CancelablePromise<void> { 582 + const { query } = data; 583 + return __request(OpenAPI, { 584 + method: 'POST', 585 + url: '/api/v{api-version}/defaults', 586 + query: { 587 + parameterBoolean: true, 588 + parameterEnum: 'Success', 589 + parameterModel: { 590 + prop: 'Hello World!', 591 + }, 592 + parameterNumber: 123, 593 + parameterString: 'Hello World!', 594 + ...query, 595 + }, 596 + }); 597 + } 598 + 599 + /** 600 + * @throws ApiError 601 + */ 602 + public static callToTestOrderOfParams(data: TDataCallToTestOrderOfParams): CancelablePromise<void> { 603 + const { query } = data; 604 + return __request(OpenAPI, { 605 + method: 'PUT', 606 + url: '/api/v{api-version}/defaults', 607 + query: { 608 + parameterOptionalStringWithDefault: 'Hello World!', 609 + parameterOptionalStringWithEmptyDefault: '', 610 + parameterStringNullableWithDefault: null, 611 + parameterStringWithDefault: 'Hello World!', 612 + parameterStringWithEmptyDefault: '', 613 + ...query, 614 + }, 615 + }); 616 + } 617 + } 618 + 619 + export class DuplicateService { 620 + /** 621 + * @throws ApiError 622 + */ 623 + public static duplicateName(): CancelablePromise<void> { 624 + return __request(OpenAPI, { 625 + method: 'GET', 626 + url: '/api/v{api-version}/duplicate', 627 + }); 628 + } 629 + 630 + /** 631 + * @throws ApiError 632 + */ 633 + public static duplicateName1(): CancelablePromise<void> { 634 + return __request(OpenAPI, { 635 + method: 'POST', 636 + url: '/api/v{api-version}/duplicate', 637 + }); 638 + } 639 + 640 + /** 641 + * @throws ApiError 642 + */ 643 + public static duplicateName2(): CancelablePromise<void> { 644 + return __request(OpenAPI, { 645 + method: 'PUT', 646 + url: '/api/v{api-version}/duplicate', 647 + }); 648 + } 649 + 650 + /** 651 + * @throws ApiError 652 + */ 653 + public static duplicateName3(): CancelablePromise<void> { 654 + return __request(OpenAPI, { 655 + method: 'DELETE', 656 + url: '/api/v{api-version}/duplicate', 657 + }); 658 + } 659 + } 660 + 661 + export class NoContentService { 662 + /** 663 + * @returns void Success 664 + * @throws ApiError 665 + */ 666 + public static callWithNoContentResponse(): CancelablePromise<void> { 667 + return __request(OpenAPI, { 668 + method: 'GET', 669 + url: '/api/v{api-version}/no-content', 670 + }); 671 + } 672 + 673 + /** 674 + * @returns number Response is a simple number 675 + * @returns void Success 676 + * @throws ApiError 677 + */ 678 + public static callWithResponseAndNoContentResponse(): CancelablePromise<number | void> { 679 + return __request(OpenAPI, { 680 + method: 'GET', 681 + url: '/api/v{api-version}/multiple-tags/response-and-no-content', 682 + }); 683 + } 684 + } 685 + 686 + export class ResponseService { 687 + /** 688 + * @returns number Response is a simple number 689 + * @returns void Success 690 + * @throws ApiError 691 + */ 692 + public static callWithResponseAndNoContentResponse(): CancelablePromise<number | void> { 693 + return __request(OpenAPI, { 694 + method: 'GET', 695 + url: '/api/v{api-version}/multiple-tags/response-and-no-content', 696 + }); 697 + } 698 + 699 + /** 700 + * @returns ModelWithString 701 + * @throws ApiError 702 + */ 703 + public static callWithResponse(): CancelablePromise<ModelWithString> { 704 + return __request(OpenAPI, { 705 + method: 'GET', 706 + url: '/api/v{api-version}/response', 707 + }); 708 + } 709 + 710 + /** 711 + * @returns ModelWithString Message for default response 712 + * @throws ApiError 713 + */ 714 + public static callWithDuplicateResponses(): CancelablePromise<ModelWithString> { 715 + return __request(OpenAPI, { 716 + method: 'POST', 717 + url: '/api/v{api-version}/response', 718 + errors: { 719 + 500: `Message for 500 error`, 720 + 501: `Message for 501 error`, 721 + 502: `Message for 502 error`, 722 + }, 723 + }); 724 + } 725 + 726 + /** 727 + * @returns any Message for 200 response 728 + * @returns ModelWithString Message for default response 729 + * @returns ModelThatExtends Message for 201 response 730 + * @returns ModelThatExtendsExtends Message for 202 response 731 + * @throws ApiError 732 + */ 733 + public static callWithResponses(): CancelablePromise< 734 + | { 735 + readonly '@namespace.string'?: string; 736 + readonly '@namespace.integer'?: number; 737 + readonly value?: Array<ModelWithString>; 738 + } 739 + | ModelWithString 740 + | ModelThatExtends 741 + | ModelThatExtendsExtends 742 + > { 743 + return __request(OpenAPI, { 744 + method: 'PUT', 745 + url: '/api/v{api-version}/response', 746 + errors: { 747 + 500: `Message for 500 error`, 748 + 501: `Message for 501 error`, 749 + 502: `Message for 502 error`, 750 + }, 751 + }); 752 + } 753 + } 754 + 755 + export class MultipleTags1Service { 756 + /** 757 + * @returns void Success 758 + * @throws ApiError 759 + */ 760 + public static dummyA(): CancelablePromise<void> { 761 + return __request(OpenAPI, { 762 + method: 'GET', 763 + url: '/api/v{api-version}/multiple-tags/a', 764 + }); 765 + } 766 + 767 + /** 768 + * @returns void Success 769 + * @throws ApiError 770 + */ 771 + public static dummyB(): CancelablePromise<void> { 772 + return __request(OpenAPI, { 773 + method: 'GET', 774 + url: '/api/v{api-version}/multiple-tags/b', 775 + }); 776 + } 777 + } 778 + 779 + export class MultipleTags2Service { 780 + /** 781 + * @returns void Success 782 + * @throws ApiError 783 + */ 784 + public static dummyA(): CancelablePromise<void> { 785 + return __request(OpenAPI, { 786 + method: 'GET', 787 + url: '/api/v{api-version}/multiple-tags/a', 788 + }); 789 + } 790 + 791 + /** 792 + * @returns void Success 793 + * @throws ApiError 794 + */ 795 + public static dummyB(): CancelablePromise<void> { 796 + return __request(OpenAPI, { 797 + method: 'GET', 798 + url: '/api/v{api-version}/multiple-tags/b', 799 + }); 800 + } 801 + } 802 + 803 + export class MultipleTags3Service { 804 + /** 805 + * @returns void Success 806 + * @throws ApiError 807 + */ 808 + public static dummyB(): CancelablePromise<void> { 809 + return __request(OpenAPI, { 810 + method: 'GET', 811 + url: '/api/v{api-version}/multiple-tags/b', 812 + }); 813 + } 814 + } 815 + 816 + export type TDataCollectionFormat = { 817 + query: { 818 + /** 819 + * This is an array parameter that is sent as csv format (comma-separated values) 820 + */ 821 + parameterArrayCsv: Array<string> | null; 822 + /** 823 + * This is an array parameter that is sent as multi format (multiple parameter instances) 824 + */ 825 + parameterArrayMulti: Array<string> | null; 826 + /** 827 + * This is an array parameter that is sent as pipes format (pipe-separated values) 828 + */ 829 + parameterArrayPipes: Array<string> | null; 830 + /** 831 + * This is an array parameter that is sent as ssv format (space-separated values) 832 + */ 833 + parameterArraySsv: Array<string> | null; 834 + /** 835 + * This is an array parameter that is sent as tsv format (tab-separated values) 836 + */ 837 + parameterArrayTsv: Array<string> | null; 838 + }; 839 + }; 840 + 841 + export class CollectionFormatService { 842 + /** 843 + * @throws ApiError 844 + */ 845 + public static collectionFormat(data: TDataCollectionFormat): CancelablePromise<void> { 846 + const { query } = data; 847 + return __request(OpenAPI, { 848 + method: 'GET', 849 + url: '/api/v{api-version}/collectionFormat', 850 + query: { 851 + ...query, 852 + }, 853 + }); 854 + } 855 + } 856 + 857 + export type TDataTypes = { 858 + /** 859 + * This is a number parameter 860 + */ 861 + id?: number; 862 + 863 + query: { 864 + /** 865 + * This is an array parameter 866 + */ 867 + parameterArray: Array<string> | null; 868 + /** 869 + * This is a boolean parameter 870 + */ 871 + parameterBoolean?: boolean | null; 872 + /** 873 + * This is a dictionary parameter 874 + */ 875 + parameterDictionary: Record<string, unknown> | null; 876 + /** 877 + * This is an enum parameter 878 + */ 879 + parameterEnum: 'Success' | 'Warning' | 'Error' | null; 880 + /** 881 + * This is a number parameter 882 + */ 883 + parameterNumber?: number; 884 + /** 885 + * This is an object parameter 886 + */ 887 + parameterObject?: Record<string, unknown> | null; 888 + /** 889 + * This is a string parameter 890 + */ 891 + parameterString?: string | null; 892 + }; 893 + }; 894 + 895 + export class TypesService { 896 + /** 897 + * @returns number Response is a simple number 898 + * @returns string Response is a simple string 899 + * @returns boolean Response is a simple boolean 900 + * @returns unknown Response is a simple object 901 + * @throws ApiError 902 + */ 903 + public static types(data: TDataTypes): CancelablePromise<number | string | boolean | Record<string, unknown>> { 904 + const { query, id } = data; 905 + return __request(OpenAPI, { 906 + method: 'GET', 907 + url: '/api/v{api-version}/types', 908 + path: {}, 909 + query: { 910 + parameterBoolean: true, 911 + parameterNumber: 123, 912 + parameterObject: null, 913 + parameterString: 'default', 914 + ...query, 915 + }, 916 + }); 917 + } 918 + } 919 + 920 + export type TDataUploadFile = { 921 + /** 922 + * Supply a file reference for upload 923 + */ 924 + file: Blob | File; 925 + 926 + query?: {}; 927 + }; 928 + 929 + export class UploadService { 930 + /** 931 + * @returns boolean 932 + * @throws ApiError 933 + */ 934 + public static uploadFile(data: TDataUploadFile): CancelablePromise<boolean> { 935 + const { query, file } = data; 936 + return __request(OpenAPI, { 937 + method: 'POST', 938 + url: '/api/v{api-version}/upload', 939 + formData: {}, 940 + }); 941 + } 942 + } 943 + 944 + export type TDataFileResponse = { 945 + id: string; 946 + 947 + query?: {}; 948 + }; 949 + 950 + export class FileResponseService { 951 + /** 952 + * @returns binary Success 953 + * @throws ApiError 954 + */ 955 + public static fileResponse(data: TDataFileResponse): CancelablePromise<Blob | File> { 956 + const { query, id } = data; 957 + return __request(OpenAPI, { 958 + method: 'GET', 959 + url: '/api/v{api-version}/file/{id}', 960 + path: {}, 961 + }); 962 + } 963 + } 964 + 965 + export type TDataComplexTypes = { 966 + query: { 967 + /** 968 + * Parameter containing object 969 + */ 970 + parameterObject: { 971 + first?: { 972 + second?: { 973 + third?: string; 974 + }; 975 + }; 976 + }; 977 + /** 978 + * Parameter containing reference 979 + */ 980 + parameterReference: ModelWithString; 981 + }; 982 + }; 983 + export type TDataComplexParams = { 984 + id: number; 985 + requestBody?: { 986 + readonly key: string | null; 987 + name: string | null; 988 + enabled?: boolean; 989 + readonly type: 'Monkey' | 'Horse' | 'Bird'; 990 + listOfModels?: Array<ModelWithString> | null; 991 + listOfStrings?: Array<string> | null; 992 + parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; 993 + readonly user?: { 994 + readonly id?: number; 995 + readonly name?: string | null; 996 + }; 997 + }; 998 + 999 + query?: {}; 1000 + }; 1001 + 1002 + export class ComplexService { 1003 + /** 1004 + * @returns ModelWithString Successful response 1005 + * @throws ApiError 1006 + */ 1007 + public static complexTypes(data: TDataComplexTypes): CancelablePromise<Array<ModelWithString>> { 1008 + const { query } = data; 1009 + return __request(OpenAPI, { 1010 + method: 'GET', 1011 + url: '/api/v{api-version}/complex', 1012 + query: { 1013 + ...query, 1014 + }, 1015 + errors: { 1016 + 400: `400 server error`, 1017 + 500: `500 server error`, 1018 + }, 1019 + }); 1020 + } 1021 + 1022 + /** 1023 + * @returns ModelWithString Success 1024 + * @throws ApiError 1025 + */ 1026 + public static complexParams(data: TDataComplexParams): CancelablePromise<ModelWithString> { 1027 + const { query, id, requestBody } = data; 1028 + return __request(OpenAPI, { 1029 + method: 'PUT', 1030 + url: '/api/v{api-version}/complex/{id}', 1031 + path: {}, 1032 + body: requestBody, 1033 + mediaType: 'application/json-patch+json', 1034 + }); 1035 + } 1036 + } 1037 + 1038 + export type TDataMultipartRequest = { 1039 + formData?: { 1040 + content?: Blob | File; 1041 + data?: ModelWithString | null; 1042 + }; 1043 + 1044 + query?: {}; 1045 + }; 1046 + 1047 + export class MultipartService { 1048 + /** 1049 + * @throws ApiError 1050 + */ 1051 + public static multipartRequest(data: TDataMultipartRequest = {}): CancelablePromise<void> { 1052 + const { query, formData } = data; 1053 + return __request(OpenAPI, { 1054 + method: 'POST', 1055 + url: '/api/v{api-version}/multipart', 1056 + formData: formData, 1057 + mediaType: 'multipart/form-data', 1058 + }); 1059 + } 1060 + 1061 + /** 1062 + * @returns any OK 1063 + * @throws ApiError 1064 + */ 1065 + public static multipartResponse(): CancelablePromise<{ 1066 + file?: Blob | File; 1067 + metadata?: { 1068 + foo?: string; 1069 + bar?: string; 1070 + }; 1071 + }> { 1072 + return __request(OpenAPI, { 1073 + method: 'GET', 1074 + url: '/api/v{api-version}/multipart', 1075 + }); 1076 + } 1077 + } 1078 + 1079 + export class HeaderService { 1080 + /** 1081 + * @returns string Successful response 1082 + * @throws ApiError 1083 + */ 1084 + public static callWithResultFromHeader(): CancelablePromise<string> { 1085 + return __request(OpenAPI, { 1086 + method: 'POST', 1087 + url: '/api/v{api-version}/header', 1088 + responseHeader: 'operation-location', 1089 + errors: { 1090 + 400: `400 server error`, 1091 + 500: `500 server error`, 1092 + }, 1093 + }); 1094 + } 1095 + } 1096 + 1097 + export type TDataTestErrorCode = { 1098 + query: { 1099 + /** 1100 + * Status code to return 1101 + */ 1102 + status: number; 1103 + }; 1104 + }; 1105 + 1106 + export class ErrorService { 1107 + /** 1108 + * @returns any Custom message: Successful response 1109 + * @throws ApiError 1110 + */ 1111 + public static testErrorCode(data: TDataTestErrorCode): CancelablePromise<any> { 1112 + const { query } = data; 1113 + return __request(OpenAPI, { 1114 + method: 'POST', 1115 + url: '/api/v{api-version}/error', 1116 + query: { 1117 + ...query, 1118 + }, 1119 + errors: { 1120 + 500: `Custom message: Internal Server Error`, 1121 + 501: `Custom message: Not Implemented`, 1122 + 502: `Custom message: Bad Gateway`, 1123 + 503: `Custom message: Service Unavailable`, 1124 + }, 1125 + }); 1126 + } 1127 + } 1128 + 1129 + export type TDataNonAsciiæøåÆøÅöôêÊ字符串 = { 1130 + query: { 1131 + /** 1132 + * Dummy input param 1133 + */ 1134 + nonAsciiParamæøåÆøÅöôêÊ: number; 1135 + }; 1136 + }; 1137 + 1138 + export class NonAsciiÆøåÆøÅöôêÊService { 1139 + /** 1140 + * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response 1141 + * @throws ApiError 1142 + */ 1143 + public static nonAsciiæøåÆøÅöôêÊ字符串( 1144 + data: TDataNonAsciiæøåÆøÅöôêÊ字符串 1145 + ): CancelablePromise<Array<NonAsciiStringæøåÆØÅöôêÊ字符串>> { 1146 + const { query } = data; 1147 + return __request(OpenAPI, { 1148 + method: 'POST', 1149 + url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 1150 + query: { 1151 + ...query, 1152 + }, 1153 + }); 1154 + } 1155 + }
-44
test/__snapshots__/v3_experimental/services/CollectionFormatService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataCollectionFormat = { 6 - query: { 7 - /** 8 - * This is an array parameter that is sent as csv format (comma-separated values) 9 - */ 10 - parameterArrayCsv: Array<string> | null; 11 - /** 12 - * This is an array parameter that is sent as multi format (multiple parameter instances) 13 - */ 14 - parameterArrayMulti: Array<string> | null; 15 - /** 16 - * This is an array parameter that is sent as pipes format (pipe-separated values) 17 - */ 18 - parameterArrayPipes: Array<string> | null; 19 - /** 20 - * This is an array parameter that is sent as ssv format (space-separated values) 21 - */ 22 - parameterArraySsv: Array<string> | null; 23 - /** 24 - * This is an array parameter that is sent as tsv format (tab-separated values) 25 - */ 26 - parameterArrayTsv: Array<string> | null; 27 - }; 28 - }; 29 - 30 - export class CollectionFormatService { 31 - /** 32 - * @throws ApiError 33 - */ 34 - public static collectionFormat(data: TDataCollectionFormat): CancelablePromise<void> { 35 - const { query } = data; 36 - return __request(OpenAPI, { 37 - method: 'GET', 38 - url: '/api/v{api-version}/collectionFormat', 39 - query: { 40 - ...query, 41 - }, 42 - }); 43 - } 44 - }
-77
test/__snapshots__/v3_experimental/services/ComplexService.ts.snap
··· 1 - import type { ModelWithArray, ModelWithDictionary, ModelWithEnum, ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataComplexTypes = { 7 - query: { 8 - /** 9 - * Parameter containing object 10 - */ 11 - parameterObject: { 12 - first?: { 13 - second?: { 14 - third?: string; 15 - }; 16 - }; 17 - }; 18 - /** 19 - * Parameter containing reference 20 - */ 21 - parameterReference: ModelWithString; 22 - }; 23 - }; 24 - export type TDataComplexParams = { 25 - id: number; 26 - requestBody?: { 27 - readonly key: string | null; 28 - name: string | null; 29 - enabled?: boolean; 30 - readonly type: 'Monkey' | 'Horse' | 'Bird'; 31 - listOfModels?: Array<ModelWithString> | null; 32 - listOfStrings?: Array<string> | null; 33 - parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; 34 - readonly user?: { 35 - readonly id?: number; 36 - readonly name?: string | null; 37 - }; 38 - }; 39 - 40 - query?: {}; 41 - }; 42 - 43 - export class ComplexService { 44 - /** 45 - * @returns ModelWithString Successful response 46 - * @throws ApiError 47 - */ 48 - public static complexTypes(data: TDataComplexTypes): CancelablePromise<Array<ModelWithString>> { 49 - const { query } = data; 50 - return __request(OpenAPI, { 51 - method: 'GET', 52 - url: '/api/v{api-version}/complex', 53 - query: { 54 - ...query, 55 - }, 56 - errors: { 57 - 400: `400 server error`, 58 - 500: `500 server error`, 59 - }, 60 - }); 61 - } 62 - 63 - /** 64 - * @returns ModelWithString Success 65 - * @throws ApiError 66 - */ 67 - public static complexParams(data: TDataComplexParams): CancelablePromise<ModelWithString> { 68 - const { query, id, requestBody } = data; 69 - return __request(OpenAPI, { 70 - method: 'PUT', 71 - url: '/api/v{api-version}/complex/{id}', 72 - path: {}, 73 - body: requestBody, 74 - mediaType: 'application/json-patch+json', 75 - }); 76 - } 77 - }
-38
test/__snapshots__/v3_experimental/services/DefaultService.ts.snap
··· 1 - import type { ModelWithArrayReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnly } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataPostServiceWithEmptyTag = { 7 - requestBody: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; 8 - 9 - query?: {}; 10 - }; 11 - 12 - export class DefaultService { 13 - /** 14 - * @throws ApiError 15 - */ 16 - public static serviceWithEmptyTag(): CancelablePromise<void> { 17 - return __request(OpenAPI, { 18 - method: 'GET', 19 - url: '/api/v{api-version}/no-tag', 20 - }); 21 - } 22 - 23 - /** 24 - * @returns ModelWithReadOnlyAndWriteOnly 25 - * @throws ApiError 26 - */ 27 - public static postServiceWithEmptyTag( 28 - data: TDataPostServiceWithEmptyTag 29 - ): CancelablePromise<ModelWithReadOnlyAndWriteOnly> { 30 - const { query, requestBody } = data; 31 - return __request(OpenAPI, { 32 - method: 'POST', 33 - url: '/api/v{api-version}/no-tag', 34 - body: requestBody, 35 - mediaType: 'application/json', 36 - }); 37 - } 38 - }
-154
test/__snapshots__/v3_experimental/services/DefaultsService.ts.snap
··· 1 - import type { ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataCallWithDefaultParameters = { 7 - query?: { 8 - /** 9 - * This is a simple boolean with default value 10 - */ 11 - parameterBoolean?: boolean | null; 12 - /** 13 - * This is a simple enum with default value 14 - */ 15 - parameterEnum?: 'Success' | 'Warning' | 'Error'; 16 - /** 17 - * This is a simple model with default value 18 - */ 19 - parameterModel?: ModelWithString | null; 20 - /** 21 - * This is a simple number with default value 22 - */ 23 - parameterNumber?: number | null; 24 - /** 25 - * This is a simple string with default value 26 - */ 27 - parameterString?: string | null; 28 - }; 29 - }; 30 - export type TDataCallWithDefaultOptionalParameters = { 31 - query?: { 32 - /** 33 - * This is a simple boolean that is optional with default value 34 - */ 35 - parameterBoolean?: boolean; 36 - /** 37 - * This is a simple enum that is optional with default value 38 - */ 39 - parameterEnum?: 'Success' | 'Warning' | 'Error'; 40 - /** 41 - * This is a simple model that is optional with default value 42 - */ 43 - parameterModel?: ModelWithString; 44 - /** 45 - * This is a simple number that is optional with default value 46 - */ 47 - parameterNumber?: number; 48 - /** 49 - * This is a simple string that is optional with default value 50 - */ 51 - parameterString?: string; 52 - }; 53 - }; 54 - export type TDataCallToTestOrderOfParams = { 55 - query: { 56 - /** 57 - * This is a optional string with default 58 - */ 59 - parameterOptionalStringWithDefault?: string; 60 - /** 61 - * This is a optional string with empty default 62 - */ 63 - parameterOptionalStringWithEmptyDefault?: string; 64 - /** 65 - * This is a optional string with no default 66 - */ 67 - parameterOptionalStringWithNoDefault?: string; 68 - /** 69 - * This is a string that can be null with default 70 - */ 71 - parameterStringNullableWithDefault?: string | null; 72 - /** 73 - * This is a string that can be null with no default 74 - */ 75 - parameterStringNullableWithNoDefault?: string | null; 76 - /** 77 - * This is a string with default 78 - */ 79 - parameterStringWithDefault?: string; 80 - /** 81 - * This is a string with empty default 82 - */ 83 - parameterStringWithEmptyDefault?: string; 84 - /** 85 - * This is a string with no default 86 - */ 87 - parameterStringWithNoDefault: string; 88 - }; 89 - }; 90 - 91 - export class DefaultsService { 92 - /** 93 - * @throws ApiError 94 - */ 95 - public static callWithDefaultParameters(data: TDataCallWithDefaultParameters = {}): CancelablePromise<void> { 96 - const { query } = data; 97 - return __request(OpenAPI, { 98 - method: 'GET', 99 - url: '/api/v{api-version}/defaults', 100 - query: { 101 - parameterBoolean: true, 102 - parameterEnum: 'Success', 103 - parameterModel: { 104 - prop: 'Hello World!', 105 - }, 106 - parameterNumber: 123, 107 - parameterString: 'Hello World!', 108 - ...query, 109 - }, 110 - }); 111 - } 112 - 113 - /** 114 - * @throws ApiError 115 - */ 116 - public static callWithDefaultOptionalParameters( 117 - data: TDataCallWithDefaultOptionalParameters = {} 118 - ): CancelablePromise<void> { 119 - const { query } = data; 120 - return __request(OpenAPI, { 121 - method: 'POST', 122 - url: '/api/v{api-version}/defaults', 123 - query: { 124 - parameterBoolean: true, 125 - parameterEnum: 'Success', 126 - parameterModel: { 127 - prop: 'Hello World!', 128 - }, 129 - parameterNumber: 123, 130 - parameterString: 'Hello World!', 131 - ...query, 132 - }, 133 - }); 134 - } 135 - 136 - /** 137 - * @throws ApiError 138 - */ 139 - public static callToTestOrderOfParams(data: TDataCallToTestOrderOfParams): CancelablePromise<void> { 140 - const { query } = data; 141 - return __request(OpenAPI, { 142 - method: 'PUT', 143 - url: '/api/v{api-version}/defaults', 144 - query: { 145 - parameterOptionalStringWithDefault: 'Hello World!', 146 - parameterOptionalStringWithEmptyDefault: '', 147 - parameterStringNullableWithDefault: null, 148 - parameterStringWithDefault: 'Hello World!', 149 - parameterStringWithEmptyDefault: '', 150 - ...query, 151 - }, 152 - }); 153 - } 154 - }
-28
test/__snapshots__/v3_experimental/services/DeprecatedService.ts.snap
··· 1 - import type { DeprecatedModel } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataDeprecatedCall = { 7 - /** 8 - * This parameter is deprecated 9 - */ 10 - parameter: DeprecatedModel | null; 11 - 12 - query?: {}; 13 - }; 14 - 15 - export class DeprecatedService { 16 - /** 17 - * @deprecated 18 - * @throws ApiError 19 - */ 20 - public static deprecatedCall(data: TDataDeprecatedCall): CancelablePromise<void> { 21 - const { query, parameter } = data; 22 - return __request(OpenAPI, { 23 - method: 'POST', 24 - url: '/api/v{api-version}/parameters/deprecated', 25 - headers: {}, 26 - }); 27 - } 28 - }
-51
test/__snapshots__/v3_experimental/services/DescriptionsService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataCallWithDescriptions = { 6 - query?: { 7 - /** 8 - * Testing backticks in string: `backticks` and ```multiple backticks``` should work 9 - */ 10 - parameterWithBackticks?: unknown; 11 - /** 12 - * Testing multiline comments in string: First line 13 - * Second line 14 - * 15 - * Fourth line 16 - */ 17 - parameterWithBreaks?: unknown; 18 - /** 19 - * Testing expression placeholders in string: ${expression} should work 20 - */ 21 - parameterWithExpressionPlaceholders?: unknown; 22 - /** 23 - * Testing quotes in string: 'single quote''' and "double quotes""" should work 24 - */ 25 - parameterWithQuotes?: unknown; 26 - /** 27 - * Testing reserved characters in string: * inline * and ** inline ** should work 28 - */ 29 - parameterWithReservedCharacters?: unknown; 30 - /** 31 - * Testing slashes in string: \backwards\\\ and /forwards/// should work 32 - */ 33 - parameterWithSlashes?: unknown; 34 - }; 35 - }; 36 - 37 - export class DescriptionsService { 38 - /** 39 - * @throws ApiError 40 - */ 41 - public static callWithDescriptions(data: TDataCallWithDescriptions = {}): CancelablePromise<void> { 42 - const { query } = data; 43 - return __request(OpenAPI, { 44 - method: 'POST', 45 - url: '/api/v{api-version}/descriptions/', 46 - query: { 47 - ...query, 48 - }, 49 - }); 50 - } 51 - }
-45
test/__snapshots__/v3_experimental/services/DuplicateService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class DuplicateService { 6 - /** 7 - * @throws ApiError 8 - */ 9 - public static duplicateName(): CancelablePromise<void> { 10 - return __request(OpenAPI, { 11 - method: 'GET', 12 - url: '/api/v{api-version}/duplicate', 13 - }); 14 - } 15 - 16 - /** 17 - * @throws ApiError 18 - */ 19 - public static duplicateName1(): CancelablePromise<void> { 20 - return __request(OpenAPI, { 21 - method: 'POST', 22 - url: '/api/v{api-version}/duplicate', 23 - }); 24 - } 25 - 26 - /** 27 - * @throws ApiError 28 - */ 29 - public static duplicateName2(): CancelablePromise<void> { 30 - return __request(OpenAPI, { 31 - method: 'PUT', 32 - url: '/api/v{api-version}/duplicate', 33 - }); 34 - } 35 - 36 - /** 37 - * @throws ApiError 38 - */ 39 - public static duplicateName3(): CancelablePromise<void> { 40 - return __request(OpenAPI, { 41 - method: 'DELETE', 42 - url: '/api/v{api-version}/duplicate', 43 - }); 44 - } 45 - }
-35
test/__snapshots__/v3_experimental/services/ErrorService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataTestErrorCode = { 6 - query: { 7 - /** 8 - * Status code to return 9 - */ 10 - status: number; 11 - }; 12 - }; 13 - 14 - export class ErrorService { 15 - /** 16 - * @returns any Custom message: Successful response 17 - * @throws ApiError 18 - */ 19 - public static testErrorCode(data: TDataTestErrorCode): CancelablePromise<any> { 20 - const { query } = data; 21 - return __request(OpenAPI, { 22 - method: 'POST', 23 - url: '/api/v{api-version}/error', 24 - query: { 25 - ...query, 26 - }, 27 - errors: { 28 - 500: `Custom message: Internal Server Error`, 29 - 501: `Custom message: Not Implemented`, 30 - 502: `Custom message: Bad Gateway`, 31 - 503: `Custom message: Service Unavailable`, 32 - }, 33 - }); 34 - } 35 - }
-24
test/__snapshots__/v3_experimental/services/FileResponseService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataFileResponse = { 6 - id: string; 7 - 8 - query?: {}; 9 - }; 10 - 11 - export class FileResponseService { 12 - /** 13 - * @returns binary Success 14 - * @throws ApiError 15 - */ 16 - public static fileResponse(data: TDataFileResponse): CancelablePromise<Blob | File> { 17 - const { query, id } = data; 18 - return __request(OpenAPI, { 19 - method: 'GET', 20 - url: '/api/v{api-version}/file/{id}', 21 - path: {}, 22 - }); 23 - } 24 - }
-36
test/__snapshots__/v3_experimental/services/FormDataService.ts.snap
··· 1 - import type { ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataPostApiFormData = { 7 - /** 8 - * A reusable request body 9 - */ 10 - formData?: ModelWithString; 11 - 12 - query?: { 13 - /** 14 - * This is a reusable parameter 15 - */ 16 - parameter?: string; 17 - }; 18 - }; 19 - 20 - export class FormDataService { 21 - /** 22 - * @throws ApiError 23 - */ 24 - public static postApiFormData(data: TDataPostApiFormData = {}): CancelablePromise<void> { 25 - const { query, formData } = data; 26 - return __request(OpenAPI, { 27 - method: 'POST', 28 - url: '/api/v{api-version}/formData/', 29 - query: { 30 - ...query, 31 - }, 32 - formData: formData, 33 - mediaType: 'multipart/form-data', 34 - }); 35 - } 36 - }
-21
test/__snapshots__/v3_experimental/services/HeaderService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class HeaderService { 6 - /** 7 - * @returns string Successful response 8 - * @throws ApiError 9 - */ 10 - public static callWithResultFromHeader(): CancelablePromise<string> { 11 - return __request(OpenAPI, { 12 - method: 'POST', 13 - url: '/api/v{api-version}/header', 14 - responseHeader: 'operation-location', 15 - errors: { 16 - 400: `400 server error`, 17 - 500: `500 server error`, 18 - }, 19 - }); 20 - } 21 - }
-45
test/__snapshots__/v3_experimental/services/MultipartService.ts.snap
··· 1 - import type { ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataMultipartRequest = { 7 - formData?: { 8 - content?: Blob | File; 9 - data?: ModelWithString | null; 10 - }; 11 - 12 - query?: {}; 13 - }; 14 - 15 - export class MultipartService { 16 - /** 17 - * @throws ApiError 18 - */ 19 - public static multipartRequest(data: TDataMultipartRequest = {}): CancelablePromise<void> { 20 - const { query, formData } = data; 21 - return __request(OpenAPI, { 22 - method: 'POST', 23 - url: '/api/v{api-version}/multipart', 24 - formData: formData, 25 - mediaType: 'multipart/form-data', 26 - }); 27 - } 28 - 29 - /** 30 - * @returns any OK 31 - * @throws ApiError 32 - */ 33 - public static multipartResponse(): CancelablePromise<{ 34 - file?: Blob | File; 35 - metadata?: { 36 - foo?: string; 37 - bar?: string; 38 - }; 39 - }> { 40 - return __request(OpenAPI, { 41 - method: 'GET', 42 - url: '/api/v{api-version}/multipart', 43 - }); 44 - } 45 - }
-27
test/__snapshots__/v3_experimental/services/MultipleTags1Service.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class MultipleTags1Service { 6 - /** 7 - * @returns void Success 8 - * @throws ApiError 9 - */ 10 - public static dummyA(): CancelablePromise<void> { 11 - return __request(OpenAPI, { 12 - method: 'GET', 13 - url: '/api/v{api-version}/multiple-tags/a', 14 - }); 15 - } 16 - 17 - /** 18 - * @returns void Success 19 - * @throws ApiError 20 - */ 21 - public static dummyB(): CancelablePromise<void> { 22 - return __request(OpenAPI, { 23 - method: 'GET', 24 - url: '/api/v{api-version}/multiple-tags/b', 25 - }); 26 - } 27 - }
-27
test/__snapshots__/v3_experimental/services/MultipleTags2Service.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class MultipleTags2Service { 6 - /** 7 - * @returns void Success 8 - * @throws ApiError 9 - */ 10 - public static dummyA(): CancelablePromise<void> { 11 - return __request(OpenAPI, { 12 - method: 'GET', 13 - url: '/api/v{api-version}/multiple-tags/a', 14 - }); 15 - } 16 - 17 - /** 18 - * @returns void Success 19 - * @throws ApiError 20 - */ 21 - public static dummyB(): CancelablePromise<void> { 22 - return __request(OpenAPI, { 23 - method: 'GET', 24 - url: '/api/v{api-version}/multiple-tags/b', 25 - }); 26 - } 27 - }
-16
test/__snapshots__/v3_experimental/services/MultipleTags3Service.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class MultipleTags3Service { 6 - /** 7 - * @returns void Success 8 - * @throws ApiError 9 - */ 10 - public static dummyB(): CancelablePromise<void> { 11 - return __request(OpenAPI, { 12 - method: 'GET', 13 - url: '/api/v{api-version}/multiple-tags/b', 14 - }); 15 - } 16 - }
-28
test/__snapshots__/v3_experimental/services/NoContentService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class NoContentService { 6 - /** 7 - * @returns void Success 8 - * @throws ApiError 9 - */ 10 - public static callWithNoContentResponse(): CancelablePromise<void> { 11 - return __request(OpenAPI, { 12 - method: 'GET', 13 - url: '/api/v{api-version}/no-content', 14 - }); 15 - } 16 - 17 - /** 18 - * @returns number Response is a simple number 19 - * @returns void Success 20 - * @throws ApiError 21 - */ 22 - public static callWithResponseAndNoContentResponse(): CancelablePromise<number | void> { 23 - return __request(OpenAPI, { 24 - method: 'GET', 25 - url: '/api/v{api-version}/multiple-tags/response-and-no-content', 26 - }); 27 - } 28 - }
-32
test/__snapshots__/v3_experimental/services/NonAsciiÆøåÆøÅöôêÊService.ts.snap
··· 1 - import type { NonAsciiStringæøåÆØÅöôêÊ字符串 } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataNonAsciiæøåÆøÅöôêÊ字符串 = { 7 - query: { 8 - /** 9 - * Dummy input param 10 - */ 11 - nonAsciiParamæøåÆøÅöôêÊ: number; 12 - }; 13 - }; 14 - 15 - export class NonAsciiÆøåÆøÅöôêÊService { 16 - /** 17 - * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response 18 - * @throws ApiError 19 - */ 20 - public static nonAsciiæøåÆøÅöôêÊ字符串( 21 - data: TDataNonAsciiæøåÆøÅöôêÊ字符串 22 - ): CancelablePromise<Array<NonAsciiStringæøåÆØÅöôêÊ字符串>> { 23 - const { query } = data; 24 - return __request(OpenAPI, { 25 - method: 'POST', 26 - url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', 27 - query: { 28 - ...query, 29 - }, 30 - }); 31 - } 32 - }
-210
test/__snapshots__/v3_experimental/services/ParametersService.ts.snap
··· 1 - import type { ModelWithNestedArrayEnumsDataFoo, ModelWithOneOfEnum, ModelWithString, Pageable } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataDeleteFoo = { 7 - /** 8 - * bar in method 9 - */ 10 - bar: string; 11 - /** 12 - * foo in method 13 - */ 14 - foo: string; 15 - 16 - query?: {}; 17 - }; 18 - export type TDataCallWithParameters = { 19 - /** 20 - * This is the parameter that goes into the cookie 21 - */ 22 - parameterCookie: string | null; 23 - /** 24 - * This is the parameter that goes into the form data 25 - */ 26 - parameterForm: string | null; 27 - /** 28 - * This is the parameter that goes into the header 29 - */ 30 - parameterHeader: string | null; 31 - /** 32 - * This is the parameter that goes into the path 33 - */ 34 - parameterPath: string | null; 35 - /** 36 - * This is the parameter that goes into the body 37 - */ 38 - requestBody: ModelWithString | null; 39 - 40 - query: { 41 - fooAllOfEnum: ModelWithNestedArrayEnumsDataFoo; 42 - fooRefEnum?: ModelWithNestedArrayEnumsDataFoo; 43 - /** 44 - * This is the parameter that goes into the query params 45 - */ 46 - parameterQuery: string | null; 47 - }; 48 - }; 49 - export type TDataCallWithWeirdParameterNames = { 50 - /** 51 - * This is the parameter that goes into the cookie 52 - */ 53 - parameterCookie: string | null; 54 - /** 55 - * This is the parameter that goes into the request form data 56 - */ 57 - parameterForm: string | null; 58 - /** 59 - * This is the parameter that goes into the request header 60 - */ 61 - parameterHeader: string | null; 62 - /** 63 - * This is the parameter that goes into the path 64 - */ 65 - parameterPath1?: string; 66 - /** 67 - * This is the parameter that goes into the path 68 - */ 69 - parameterPath2?: string; 70 - /** 71 - * This is the parameter that goes into the path 72 - */ 73 - parameterPath3?: string; 74 - /** 75 - * This is the parameter that goes into the body 76 - */ 77 - requestBody: ModelWithString | null; 78 - 79 - query: { 80 - /** 81 - * This is the parameter with a reserved keyword 82 - */ 83 - _default?: string; 84 - /** 85 - * This is the parameter that goes into the request query params 86 - */ 87 - parameterQuery: string | null; 88 - }; 89 - }; 90 - export type TDataGetCallWithOptionalParam = { 91 - /** 92 - * This is a required parameter 93 - */ 94 - requestBody: ModelWithOneOfEnum; 95 - 96 - query?: { 97 - /** 98 - * This is an optional parameter 99 - */ 100 - parameter?: string; 101 - }; 102 - }; 103 - export type TDataPostCallWithOptionalParam = { 104 - /** 105 - * This is an optional parameter 106 - */ 107 - requestBody?: ModelWithString; 108 - 109 - query: { 110 - /** 111 - * This is a required parameter 112 - */ 113 - parameter: Pageable; 114 - }; 115 - }; 116 - 117 - export class ParametersService { 118 - /** 119 - * @throws ApiError 120 - */ 121 - public static deleteFoo(data: TDataDeleteFoo): CancelablePromise<void> { 122 - const { query, bar, foo } = data; 123 - return __request(OpenAPI, { 124 - method: 'DELETE', 125 - url: '/api/v{api-version}/foo/{foo}/bar/{bar}', 126 - path: {}, 127 - }); 128 - } 129 - 130 - /** 131 - * @throws ApiError 132 - */ 133 - public static callWithParameters(data: TDataCallWithParameters): CancelablePromise<void> { 134 - const { query, parameterCookie, parameterForm, parameterHeader, parameterPath, requestBody } = data; 135 - return __request(OpenAPI, { 136 - method: 'POST', 137 - url: '/api/v{api-version}/parameters/{parameterPath}', 138 - path: {}, 139 - cookies: {}, 140 - headers: {}, 141 - query: { 142 - ...query, 143 - }, 144 - formData: {}, 145 - body: requestBody, 146 - mediaType: 'application/json', 147 - }); 148 - } 149 - 150 - /** 151 - * @throws ApiError 152 - */ 153 - public static callWithWeirdParameterNames(data: TDataCallWithWeirdParameterNames): CancelablePromise<void> { 154 - const { 155 - query, 156 - parameterCookie, 157 - parameterForm, 158 - parameterHeader, 159 - parameterPath1, 160 - parameterPath2, 161 - parameterPath3, 162 - requestBody, 163 - } = data; 164 - return __request(OpenAPI, { 165 - method: 'POST', 166 - url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', 167 - path: {}, 168 - cookies: {}, 169 - headers: {}, 170 - query: { 171 - ...query, 172 - }, 173 - formData: {}, 174 - body: requestBody, 175 - mediaType: 'application/json', 176 - }); 177 - } 178 - 179 - /** 180 - * @throws ApiError 181 - */ 182 - public static getCallWithOptionalParam(data: TDataGetCallWithOptionalParam): CancelablePromise<void> { 183 - const { query, requestBody } = data; 184 - return __request(OpenAPI, { 185 - method: 'GET', 186 - url: '/api/v{api-version}/parameters/', 187 - query: { 188 - ...query, 189 - }, 190 - body: requestBody, 191 - mediaType: 'application/json', 192 - }); 193 - } 194 - 195 - /** 196 - * @throws ApiError 197 - */ 198 - public static postCallWithOptionalParam(data: TDataPostCallWithOptionalParam): CancelablePromise<void> { 199 - const { query, requestBody } = data; 200 - return __request(OpenAPI, { 201 - method: 'POST', 202 - url: '/api/v{api-version}/parameters/', 203 - query: { 204 - ...query, 205 - }, 206 - body: requestBody, 207 - mediaType: 'application/json', 208 - }); 209 - } 210 - }
-36
test/__snapshots__/v3_experimental/services/RequestBodyService.ts.snap
··· 1 - import type { ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export type TDataPostApiRequestBody = { 7 - /** 8 - * A reusable request body 9 - */ 10 - foo?: ModelWithString; 11 - 12 - query?: { 13 - /** 14 - * This is a reusable parameter 15 - */ 16 - parameter?: string; 17 - }; 18 - }; 19 - 20 - export class RequestBodyService { 21 - /** 22 - * @throws ApiError 23 - */ 24 - public static postApiRequestBody(data: TDataPostApiRequestBody = {}): CancelablePromise<void> { 25 - const { query, foo } = data; 26 - return __request(OpenAPI, { 27 - method: 'POST', 28 - url: '/api/v{api-version}/requestBody/', 29 - query: { 30 - ...query, 31 - }, 32 - body: foo, 33 - mediaType: 'application/json', 34 - }); 35 - } 36 - }
-73
test/__snapshots__/v3_experimental/services/ResponseService.ts.snap
··· 1 - import type { ModelThatExtends, ModelThatExtendsExtends, ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 5 - 6 - export class ResponseService { 7 - /** 8 - * @returns number Response is a simple number 9 - * @returns void Success 10 - * @throws ApiError 11 - */ 12 - public static callWithResponseAndNoContentResponse(): CancelablePromise<number | void> { 13 - return __request(OpenAPI, { 14 - method: 'GET', 15 - url: '/api/v{api-version}/multiple-tags/response-and-no-content', 16 - }); 17 - } 18 - 19 - /** 20 - * @returns ModelWithString 21 - * @throws ApiError 22 - */ 23 - public static callWithResponse(): CancelablePromise<ModelWithString> { 24 - return __request(OpenAPI, { 25 - method: 'GET', 26 - url: '/api/v{api-version}/response', 27 - }); 28 - } 29 - 30 - /** 31 - * @returns ModelWithString Message for default response 32 - * @throws ApiError 33 - */ 34 - public static callWithDuplicateResponses(): CancelablePromise<ModelWithString> { 35 - return __request(OpenAPI, { 36 - method: 'POST', 37 - url: '/api/v{api-version}/response', 38 - errors: { 39 - 500: `Message for 500 error`, 40 - 501: `Message for 501 error`, 41 - 502: `Message for 502 error`, 42 - }, 43 - }); 44 - } 45 - 46 - /** 47 - * @returns any Message for 200 response 48 - * @returns ModelWithString Message for default response 49 - * @returns ModelThatExtends Message for 201 response 50 - * @returns ModelThatExtendsExtends Message for 202 response 51 - * @throws ApiError 52 - */ 53 - public static callWithResponses(): CancelablePromise< 54 - | { 55 - readonly '@namespace.string'?: string; 56 - readonly '@namespace.integer'?: number; 57 - readonly value?: Array<ModelWithString>; 58 - } 59 - | ModelWithString 60 - | ModelThatExtends 61 - | ModelThatExtendsExtends 62 - > { 63 - return __request(OpenAPI, { 64 - method: 'PUT', 65 - url: '/api/v{api-version}/response', 66 - errors: { 67 - 500: `Message for 500 error`, 68 - 501: `Message for 501 error`, 69 - 502: `Message for 502 error`, 70 - }, 71 - }); 72 - } 73 - }
-75
test/__snapshots__/v3_experimental/services/SimpleService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export class SimpleService { 6 - /** 7 - * @throws ApiError 8 - */ 9 - public static getCallWithoutParametersAndResponse(): CancelablePromise<void> { 10 - return __request(OpenAPI, { 11 - method: 'GET', 12 - url: '/api/v{api-version}/simple', 13 - }); 14 - } 15 - 16 - /** 17 - * @throws ApiError 18 - */ 19 - public static putCallWithoutParametersAndResponse(): CancelablePromise<void> { 20 - return __request(OpenAPI, { 21 - method: 'PUT', 22 - url: '/api/v{api-version}/simple', 23 - }); 24 - } 25 - 26 - /** 27 - * @throws ApiError 28 - */ 29 - public static postCallWithoutParametersAndResponse(): CancelablePromise<void> { 30 - return __request(OpenAPI, { 31 - method: 'POST', 32 - url: '/api/v{api-version}/simple', 33 - }); 34 - } 35 - 36 - /** 37 - * @throws ApiError 38 - */ 39 - public static deleteCallWithoutParametersAndResponse(): CancelablePromise<void> { 40 - return __request(OpenAPI, { 41 - method: 'DELETE', 42 - url: '/api/v{api-version}/simple', 43 - }); 44 - } 45 - 46 - /** 47 - * @throws ApiError 48 - */ 49 - public static optionsCallWithoutParametersAndResponse(): CancelablePromise<void> { 50 - return __request(OpenAPI, { 51 - method: 'OPTIONS', 52 - url: '/api/v{api-version}/simple', 53 - }); 54 - } 55 - 56 - /** 57 - * @throws ApiError 58 - */ 59 - public static headCallWithoutParametersAndResponse(): CancelablePromise<void> { 60 - return __request(OpenAPI, { 61 - method: 'HEAD', 62 - url: '/api/v{api-version}/simple', 63 - }); 64 - } 65 - 66 - /** 67 - * @throws ApiError 68 - */ 69 - public static patchCallWithoutParametersAndResponse(): CancelablePromise<void> { 70 - return __request(OpenAPI, { 71 - method: 'PATCH', 72 - url: '/api/v{api-version}/simple', 73 - }); 74 - } 75 - }
-66
test/__snapshots__/v3_experimental/services/TypesService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataTypes = { 6 - /** 7 - * This is a number parameter 8 - */ 9 - id?: number; 10 - 11 - query: { 12 - /** 13 - * This is an array parameter 14 - */ 15 - parameterArray: Array<string> | null; 16 - /** 17 - * This is a boolean parameter 18 - */ 19 - parameterBoolean?: boolean | null; 20 - /** 21 - * This is a dictionary parameter 22 - */ 23 - parameterDictionary: Record<string, unknown> | null; 24 - /** 25 - * This is an enum parameter 26 - */ 27 - parameterEnum: 'Success' | 'Warning' | 'Error' | null; 28 - /** 29 - * This is a number parameter 30 - */ 31 - parameterNumber?: number; 32 - /** 33 - * This is an object parameter 34 - */ 35 - parameterObject?: Record<string, unknown> | null; 36 - /** 37 - * This is a string parameter 38 - */ 39 - parameterString?: string | null; 40 - }; 41 - }; 42 - 43 - export class TypesService { 44 - /** 45 - * @returns number Response is a simple number 46 - * @returns string Response is a simple string 47 - * @returns boolean Response is a simple boolean 48 - * @returns unknown Response is a simple object 49 - * @throws ApiError 50 - */ 51 - public static types(data: TDataTypes): CancelablePromise<number | string | boolean | Record<string, unknown>> { 52 - const { query, id } = data; 53 - return __request(OpenAPI, { 54 - method: 'GET', 55 - url: '/api/v{api-version}/types', 56 - path: {}, 57 - query: { 58 - parameterBoolean: true, 59 - parameterNumber: 123, 60 - parameterObject: null, 61 - parameterString: 'default', 62 - ...query, 63 - }, 64 - }); 65 - } 66 - }
-27
test/__snapshots__/v3_experimental/services/UploadService.ts.snap
··· 1 - import type { CancelablePromise } from '../core/CancelablePromise'; 2 - import { OpenAPI } from '../core/OpenAPI'; 3 - import { request as __request } from '../core/request'; 4 - 5 - export type TDataUploadFile = { 6 - /** 7 - * Supply a file reference for upload 8 - */ 9 - file: Blob | File; 10 - 11 - query?: {}; 12 - }; 13 - 14 - export class UploadService { 15 - /** 16 - * @returns boolean 17 - * @throws ApiError 18 - */ 19 - public static uploadFile(data: TDataUploadFile): CancelablePromise<boolean> { 20 - const { query, file } = data; 21 - return __request(OpenAPI, { 22 - method: 'POST', 23 - url: '/api/v{api-version}/upload', 24 - formData: {}, 25 - }); 26 - } 27 - }
-23
test/__snapshots__/v3_experimental/services/index.ts.snap
··· 1 - export { CollectionFormatService } from './CollectionFormatService'; 2 - export { ComplexService } from './ComplexService'; 3 - export { DefaultService } from './DefaultService'; 4 - export { DefaultsService } from './DefaultsService'; 5 - export { DeprecatedService } from './DeprecatedService'; 6 - export { DescriptionsService } from './DescriptionsService'; 7 - export { DuplicateService } from './DuplicateService'; 8 - export { ErrorService } from './ErrorService'; 9 - export { FileResponseService } from './FileResponseService'; 10 - export { FormDataService } from './FormDataService'; 11 - export { HeaderService } from './HeaderService'; 12 - export { MultipartService } from './MultipartService'; 13 - export { MultipleTags1Service } from './MultipleTags1Service'; 14 - export { MultipleTags2Service } from './MultipleTags2Service'; 15 - export { MultipleTags3Service } from './MultipleTags3Service'; 16 - export { NoContentService } from './NoContentService'; 17 - export { NonAsciiÆøåÆøÅöôêÊService } from './NonAsciiÆøåÆøÅöôêÊService'; 18 - export { ParametersService } from './ParametersService'; 19 - export { RequestBodyService } from './RequestBodyService'; 20 - export { ResponseService } from './ResponseService'; 21 - export { SimpleService } from './SimpleService'; 22 - export { TypesService } from './TypesService'; 23 - export { UploadService } from './UploadService';
+5 -4
test/__snapshots__/v3_options/services/DefaultsService.ts.snap test/__snapshots__/v3_options/services.ts.snap
··· 1 - import type { ModelWithString } from '../models'; 2 - import type { CancelablePromise } from '../core/CancelablePromise'; 3 - import { OpenAPI } from '../core/OpenAPI'; 4 - import { request as __request } from '../core/request'; 1 + import type { CancelablePromise } from './core/CancelablePromise'; 2 + import { OpenAPI } from './core/OpenAPI'; 3 + import { request as __request } from './core/request'; 4 + 5 + import type { ModelWithString } from './models'; 5 6 6 7 export type TDataCallWithDefaultParameters = { 7 8 /**
-1
test/__snapshots__/v3_options/services/index.ts.snap
··· 1 - export { DefaultsService } from './DefaultsService';
+17 -15
test/e2e/assets/main-angular-module.ts
··· 5 5 6 6 import { ApiModule } from './client/ApiModule'; 7 7 import { OpenAPI } from './client/core/OpenAPI'; 8 - import { CollectionFormatService } from './client/services/CollectionFormatService'; 9 - import { ComplexService } from './client/services/ComplexService'; 10 - import { DefaultService } from './client/services/DefaultService'; 11 - import { DefaultsService } from './client/services/DefaultsService'; 12 - import { DuplicateService } from './client/services/DuplicateService'; 13 - import { ErrorService } from './client/services/ErrorService'; 14 - import { HeaderService } from './client/services/HeaderService'; 15 - import { MultipleTags1Service } from './client/services/MultipleTags1Service'; 16 - import { MultipleTags2Service } from './client/services/MultipleTags2Service'; 17 - import { MultipleTags3Service } from './client/services/MultipleTags3Service'; 18 - import { NoContentService } from './client/services/NoContentService'; 19 - import { ParametersService } from './client/services/ParametersService'; 20 - import { ResponseService } from './client/services/ResponseService'; 21 - import { SimpleService } from './client/services/SimpleService'; 22 - import { TypesService } from './client/services/TypesService'; 8 + import { 9 + CollectionFormatService, 10 + ComplexService, 11 + DefaultService, 12 + DefaultsService, 13 + DuplicateService, 14 + ErrorService, 15 + HeaderService, 16 + MultipleTags1Service, 17 + MultipleTags2Service, 18 + MultipleTags3Service, 19 + NoContentService, 20 + ParametersService, 21 + ResponseService, 22 + SimpleService, 23 + TypesService, 24 + } from './client/services'; 23 25 24 26 @Component({ 25 27 selector: 'app-root',
+17 -15
test/e2e/assets/main-angular.ts
··· 4 4 import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 5 5 6 6 import { OpenAPI } from './client/core/OpenAPI'; 7 - import { CollectionFormatService } from './client/services/CollectionFormatService'; 8 - import { ComplexService } from './client/services/ComplexService'; 9 - import { DefaultService } from './client/services/DefaultService'; 10 - import { DefaultsService } from './client/services/DefaultsService'; 11 - import { DuplicateService } from './client/services/DuplicateService'; 12 - import { ErrorService } from './client/services/ErrorService'; 13 - import { HeaderService } from './client/services/HeaderService'; 14 - import { MultipleTags1Service } from './client/services/MultipleTags1Service'; 15 - import { MultipleTags2Service } from './client/services/MultipleTags2Service'; 16 - import { MultipleTags3Service } from './client/services/MultipleTags3Service'; 17 - import { NoContentService } from './client/services/NoContentService'; 18 - import { ParametersService } from './client/services/ParametersService'; 19 - import { ResponseService } from './client/services/ResponseService'; 20 - import { SimpleService } from './client/services/SimpleService'; 21 - import { TypesService } from './client/services/TypesService'; 7 + import { 8 + CollectionFormatService, 9 + ComplexService, 10 + DefaultService, 11 + DefaultsService, 12 + DuplicateService, 13 + ErrorService, 14 + HeaderService, 15 + MultipleTags1Service, 16 + MultipleTags2Service, 17 + MultipleTags3Service, 18 + NoContentService, 19 + ParametersService, 20 + ResponseService, 21 + SimpleService, 22 + TypesService, 23 + } from './client/services'; 22 24 23 25 @Component({ 24 26 selector: 'app-root',