···6666`openapi-ts` supports loading configuration from a file inside your project root directory. You just need to create a `openapi-ts.config.js` file
67676868```js
6969-/** @type {import('@nicolas-chaulet/openapi-typescript-codegen').Config} */
6969+/** @type {import('@nicolas-chaulet/openapi-typescript-codegen').UserConfig} */
7070export default {
7171 input: 'path/to/openapi.json',
7272 output: 'src/client',
···11-import type { Model } from '../client/interfaces/Model';
22-import type { Service } from '../client/interfaces/Service';
33-import { sortByName } from './sortByName';
11+import type { Model } from '../../client/interfaces/Model';
22+import type { Service } from '../../client/interfaces/Service';
33+import { sortByName } from '../sortByName';
4455describe('sortByName', () => {
66 it('should handle empty lists', () => {
···22import path from 'node:path';
3344import type { Client } from '../../client/interfaces/Client';
55-import type { Config } from '../../node';
55+import type { UserConfig } from '../../node';
66import { getHttpRequestName } from '../getHttpRequestName';
77-import type { Templates } from '../registerHandlebarTemplates';
77+import type { Templates } from '../handlebars';
88import { sortByName } from '../sortByName';
991010/**
···2020 client: Client,
2121 templates: Templates,
2222 outputPath: string,
2323- options: Pick<Required<Config>, 'client' | 'clientName' | 'enums' | 'postfixServices'>
2323+ options: Pick<Required<UserConfig>, 'client' | 'clientName' | 'enums' | 'postfixServices'>
2424): Promise<void> => {
2525 const templateResult = templates.client({
2626 $config: options,
+16-20
src/utils/write/client.ts
···22import path from 'node:path';
3344import type { Client } from '../../client/interfaces/Client';
55-import type { Config } from '../../node';
55+import type { Config } from '../../types/config';
66+import type { Templates } from '../handlebars';
67import { isSubDirectory } from '../isSubdirectory';
77-import type { Templates } from '../registerHandlebarTemplates';
88import { writeClientClass } from './class';
99import { writeClientCore } from './core';
1010import { writeClientIndex } from './index';
···1616 * Write our OpenAPI client, using the given templates at the given output
1717 * @param client Client containing models, schemas, and services
1818 * @param templates Templates wrapper with all loaded Handlebars templates
1919- * @param options Options passed to the `generate()` function
1919+ * @param options {@link Config} passed to the `generate()` function
2020 */
2121-export const writeClient = async (
2222- client: Client,
2323- templates: Templates,
2424- options: Omit<Required<Config>, 'base' | 'clientName' | 'request'> & Pick<Config, 'base' | 'clientName' | 'request'>
2525-): Promise<void> => {
2121+export const writeClient = async (client: Client, templates: Templates, options: Config): Promise<void> => {
2622 const outputPath = path.resolve(process.cwd(), options.output);
27232824 if (!isSubDirectory(process.cwd(), options.output)) {
···5147 await writeClientCore(client, templates, outputPathCore, options);
5248 }
53495454- if (options.exportServices) {
5555- const outputPathServices = path.resolve(outputPath, 'services');
5656- await rmSync(outputPathServices, {
5757- force: true,
5858- recursive: true,
5959- });
6060- await mkdirSync(outputPathServices, {
6161- recursive: true,
6262- });
6363- await writeClientServices(client, templates, outputPathServices, options);
6464- }
6565-6650 if (options.exportSchemas) {
6751 const outputPathSchemas = path.resolve(outputPath, 'schemas');
6852 await rmSync(outputPathSchemas, {
···8569 recursive: true,
8670 });
8771 await writeClientModels(client, templates, outputPathModels, options);
7272+ }
7373+7474+ if (options.exportServices) {
7575+ const outputPathServices = path.resolve(outputPath, 'services');
7676+ await rmSync(outputPathServices, {
7777+ force: true,
7878+ recursive: true,
7979+ });
8080+ await mkdirSync(outputPathServices, {
8181+ recursive: true,
8282+ });
8383+ await writeClientServices(client, templates, outputPathServices, options);
8884 }
89859086 if (options.clientName) {
+3-3
src/utils/write/core.ts
···22import path from 'node:path';
3344import type { Client } from '../../client/interfaces/Client';
55-import type { Config } from '../../node';
55+import type { UserConfig } from '../../node';
66import { getHttpRequestName } from '../getHttpRequestName';
77-import type { Templates } from '../registerHandlebarTemplates';
77+import type { Templates } from '../handlebars';
8899/**
1010 * Generate OpenAPI core files, this includes the basic boilerplate code to handle requests.
···1717 client: Client,
1818 templates: Templates,
1919 outputPath: string,
2020- options: Pick<Required<Config>, 'client' | 'serviceResponse'> & Omit<Config, 'client' | 'serviceResponse'>
2020+ options: Pick<Required<UserConfig>, 'client' | 'serviceResponse'> & Omit<UserConfig, 'client' | 'serviceResponse'>
2121): Promise<void> => {
2222 const context = {
2323 httpRequest: getHttpRequestName(options.client),
+4-4
src/utils/write/index.ts
···22import path from 'node:path';
3344import type { Client } from '../../client/interfaces/Client';
55-import type { Config } from '../../node';
66-import { Templates } from '../registerHandlebarTemplates';
55+import type { UserConfig } from '../../node';
66+import { Templates } from '../handlebars';
77import { sortByName } from '../sortByName';
8899/**
···2020 templates: Templates,
2121 outputPath: string,
2222 options: Pick<
2323- Required<Config>,
2323+ Required<UserConfig>,
2424 | 'enums'
2525 | 'exportCore'
2626 | 'exportServices'
···2929 | 'postfixServices'
3030 | 'postfixModels'
3131 > &
3232- Pick<Config, 'clientName'>
3232+ Pick<UserConfig, 'clientName'>
3333): Promise<void> => {
3434 const templateResult = templates.index({
3535 $config: options,
+3-3
src/utils/write/models.ts
···22import path from 'node:path';
3344import type { Client } from '../../client/interfaces/Client';
55-import type { Config } from '../../node';
66-import type { Templates } from '../registerHandlebarTemplates';
55+import type { UserConfig } from '../../node';
66+import type { Templates } from '../handlebars';
7788/**
99 * Generate Models using the Handlebar template and write to disk.
···1616 client: Client,
1717 templates: Templates,
1818 outputPath: string,
1919- options: Pick<Required<Config>, 'client' | 'enums' | 'useDateType'>
1919+ options: Pick<Required<UserConfig>, 'client' | 'enums' | 'useDateType'>
2020): Promise<void> => {
2121 for (const model of client.models) {
2222 const file = path.resolve(outputPath, `${model.name}.ts`);
+3-3
src/utils/write/schemas.ts
···22import path from 'node:path';
3344import type { Client } from '../../client/interfaces/Client';
55-import type { Config } from '../../node';
66-import type { Templates } from '../registerHandlebarTemplates';
55+import type { UserConfig } from '../../node';
66+import type { Templates } from '../handlebars';
7788/**
99 * Generate Schemas using the Handlebar template and write to disk.
···1616 client: Client,
1717 templates: Templates,
1818 outputPath: string,
1919- options: Pick<Required<Config>, 'client' | 'enums'>
1919+ options: Pick<Required<UserConfig>, 'client' | 'enums'>
2020): Promise<void> => {
2121 for (const model of client.models) {
2222 const file = path.resolve(outputPath, `$${model.name}.ts`);
+4-5
src/utils/write/services.ts
···22import path from 'node:path';
3344import type { Client } from '../../client/interfaces/Client';
55-import type { Config } from '../../node';
66-import type { Templates } from '../registerHandlebarTemplates';
55+import type { Config } from '../../types/config';
66+import type { Templates } from '../handlebars';
7788/**
99 * Generate Services using the Handlebar template and write to disk.
1010 * @param client Client containing models, schemas, and services
1111 * @param templates The loaded handlebar templates
1212 * @param outputPath Directory to write the generated files to
1313- * @param options Options passed to the `generate()` function
1313+ * @param options {@link Config} passed to the `generate()` function
1414 */
1515export const writeClientServices = async (
1616 client: Client,
1717 templates: Templates,
1818 outputPath: string,
1919- options: Pick<Required<Config>, 'client' | 'postfixServices' | 'serviceResponse' | 'useOptions'> &
2020- Omit<Config, 'client' | 'postfixServices' | 'serviceResponse' | 'useOptions'>
1919+ options: Config
2120): Promise<void> => {
2221 for (const service of client.services) {
2322 const file = path.resolve(outputPath, `${service.name}${options.postfixServices}.ts`);
+914-360
test/__snapshots__/index.spec.ts.snap
···20052005import { OpenAPI } from '../core/OpenAPI';
20062006import { request as __request } from '../core/request';
2007200720082008+export type TDataCollectionFormat = {
20092009+ /**
20102010+ * This is an array parameter that is sent as csv format (comma-separated values)
20112011+ */
20122012+ parameterArrayCsv: Array<string>;
20132013+ /**
20142014+ * This is an array parameter that is sent as multi format (multiple parameter instances)
20152015+ */
20162016+ parameterArrayMulti: Array<string>;
20172017+ /**
20182018+ * This is an array parameter that is sent as pipes format (pipe-separated values)
20192019+ */
20202020+ parameterArrayPipes: Array<string>;
20212021+ /**
20222022+ * This is an array parameter that is sent as ssv format (space-separated values)
20232023+ */
20242024+ parameterArraySsv: Array<string>;
20252025+ /**
20262026+ * This is an array parameter that is sent as tsv format (tab-separated values)
20272027+ */
20282028+ parameterArrayTsv: Array<string>;
20292029+};
20302030+20082031export class CollectionFormatService {
20092032 /**
20102010- * @param parameterArrayCsv This is an array parameter that is sent as csv format (comma-separated values)
20112011- * @param parameterArraySsv This is an array parameter that is sent as ssv format (space-separated values)
20122012- * @param parameterArrayTsv This is an array parameter that is sent as tsv format (tab-separated values)
20132013- * @param parameterArrayPipes This is an array parameter that is sent as pipes format (pipe-separated values)
20142014- * @param parameterArrayMulti This is an array parameter that is sent as multi format (multiple parameter instances)
20152033 * @throws ApiError
20162034 */
20172017- public static collectionFormat(
20182018- parameterArrayCsv: Array<string>,
20192019- parameterArraySsv: Array<string>,
20202020- parameterArrayTsv: Array<string>,
20212021- parameterArrayPipes: Array<string>,
20222022- parameterArrayMulti: Array<string>
20232023- ): CancelablePromise<void> {
20352035+ public static collectionFormat(data: TDataCollectionFormat): CancelablePromise<void> {
20362036+ const { parameterArrayCsv, parameterArrayMulti, parameterArrayPipes, parameterArraySsv, parameterArrayTsv } =
20372037+ data;
20242038 return __request(OpenAPI, {
20252039 method: 'GET',
20262040 url: '/api/v{api-version}/collectionFormat',
···20432057import { OpenAPI } from '../core/OpenAPI';
20442058import { request as __request } from '../core/request';
2045205920602060+export type TDataComplexTypes = {
20612061+ /**
20622062+ * Parameter containing object
20632063+ */
20642064+ parameterObject: {
20652065+ first?: {
20662066+ second?: {
20672067+ third?: string;
20682068+ };
20692069+ };
20702070+ };
20712071+ /**
20722072+ * Parameter containing reference
20732073+ */
20742074+ parameterReference: ModelWithString;
20752075+};
20762076+20462077export class ComplexService {
20472078 /**
20482048- * @param parameterObject Parameter containing object
20492049- * @param parameterReference Parameter containing reference
20502079 * @returns ModelWithString Successful response
20512080 * @throws ApiError
20522081 */
20532053- public static complexTypes(
20542054- parameterObject: {
20552055- first?: {
20562056- second?: {
20572057- third?: string;
20582058- };
20592059- };
20602060- },
20612061- parameterReference: ModelWithString
20622062- ): CancelablePromise<Array<ModelWithString>> {
20822082+ public static complexTypes(data: TDataComplexTypes): CancelablePromise<Array<ModelWithString>> {
20832083+ const { parameterObject, parameterReference } = data;
20632084 return __request(OpenAPI, {
20642085 method: 'GET',
20652086 url: '/api/v{api-version}/complex',
···21022123import { OpenAPI } from '../core/OpenAPI';
21032124import { request as __request } from '../core/request';
2104212521262126+export type TDataCallWithDefaultParameters = {
21272127+ /**
21282128+ * This is a simple boolean with default value
21292129+ */
21302130+ parameterBoolean?: boolean;
21312131+ /**
21322132+ * This is a simple enum with default value
21332133+ */
21342134+ parameterEnum?: 'Success' | 'Warning' | 'Error';
21352135+ /**
21362136+ * This is a simple model with default value
21372137+ */
21382138+ parameterModel?: ModelWithString;
21392139+ /**
21402140+ * This is a simple number with default value
21412141+ */
21422142+ parameterNumber?: number;
21432143+ /**
21442144+ * This is a simple string with default value
21452145+ */
21462146+ parameterString?: string;
21472147+};
21482148+export type TDataCallWithDefaultOptionalParameters = {
21492149+ /**
21502150+ * This is a simple boolean that is optional with default value
21512151+ */
21522152+ parameterBoolean?: boolean;
21532153+ /**
21542154+ * This is a simple enum that is optional with default value
21552155+ */
21562156+ parameterEnum?: 'Success' | 'Warning' | 'Error';
21572157+ /**
21582158+ * This is a simple model that is optional with default value
21592159+ */
21602160+ parameterModel?: ModelWithString;
21612161+ /**
21622162+ * This is a simple number that is optional with default value
21632163+ */
21642164+ parameterNumber?: number;
21652165+ /**
21662166+ * This is a simple string that is optional with default value
21672167+ */
21682168+ parameterString?: string;
21692169+};
21702170+export type TDataCallToTestOrderOfParams = {
21712171+ /**
21722172+ * This is a optional string with default
21732173+ */
21742174+ parameterOptionalStringWithDefault?: string;
21752175+ /**
21762176+ * This is a optional string with empty default
21772177+ */
21782178+ parameterOptionalStringWithEmptyDefault?: string;
21792179+ /**
21802180+ * This is a optional string with no default
21812181+ */
21822182+ parameterOptionalStringWithNoDefault?: string;
21832183+ /**
21842184+ * This is a string that can be null with default
21852185+ */
21862186+ parameterStringNullableWithDefault?: string | null;
21872187+ /**
21882188+ * This is a string that can be null with no default
21892189+ */
21902190+ parameterStringNullableWithNoDefault?: string | null;
21912191+ /**
21922192+ * This is a string with default
21932193+ */
21942194+ parameterStringWithDefault?: string;
21952195+ /**
21962196+ * This is a string with empty default
21972197+ */
21982198+ parameterStringWithEmptyDefault?: string;
21992199+ /**
22002200+ * This is a string with no default
22012201+ */
22022202+ parameterStringWithNoDefault: string;
22032203+};
22042204+21052205export class DefaultsService {
21062206 /**
21072107- * @param parameterString This is a simple string with default value
21082108- * @param parameterNumber This is a simple number with default value
21092109- * @param parameterBoolean This is a simple boolean with default value
21102110- * @param parameterEnum This is a simple enum with default value
21112111- * @param parameterModel This is a simple model with default value
21122207 * @throws ApiError
21132208 */
21142114- public static callWithDefaultParameters(
21152115- parameterString: string = 'Hello World!',
21162116- parameterNumber: number = 123,
21172117- parameterBoolean: boolean = true,
21182118- parameterEnum: 'Success' | 'Warning' | 'Error' = 'Success',
21192119- parameterModel: ModelWithString = {
21202120- prop: 'Hello World!',
21212121- }
21222122- ): CancelablePromise<void> {
22092209+ public static callWithDefaultParameters(data: TDataCallWithDefaultParameters): CancelablePromise<void> {
22102210+ const {
22112211+ parameterBoolean = true,
22122212+ parameterEnum = 'Success',
22132213+ parameterModel = {
22142214+ prop: 'Hello World!',
22152215+ },
22162216+ parameterNumber = 123,
22172217+ parameterString = 'Hello World!',
22182218+ } = data;
21232219 return __request(OpenAPI, {
21242220 method: 'GET',
21252221 url: '/api/v{api-version}/defaults',
···21342230 }
2135223121362232 /**
21372137- * @param parameterString This is a simple string that is optional with default value
21382138- * @param parameterNumber This is a simple number that is optional with default value
21392139- * @param parameterBoolean This is a simple boolean that is optional with default value
21402140- * @param parameterEnum This is a simple enum that is optional with default value
21412141- * @param parameterModel This is a simple model that is optional with default value
21422233 * @throws ApiError
21432234 */
21442235 public static callWithDefaultOptionalParameters(
21452145- parameterString: string = 'Hello World!',
21462146- parameterNumber: number = 123,
21472147- parameterBoolean: boolean = true,
21482148- parameterEnum: 'Success' | 'Warning' | 'Error' = 'Success',
21492149- parameterModel: ModelWithString = {
21502150- prop: 'Hello World!',
21512151- }
22362236+ data: TDataCallWithDefaultOptionalParameters = {}
21522237 ): CancelablePromise<void> {
22382238+ const {
22392239+ parameterBoolean = true,
22402240+ parameterEnum = 'Success',
22412241+ parameterModel = {
22422242+ prop: 'Hello World!',
22432243+ },
22442244+ parameterNumber = 123,
22452245+ parameterString = 'Hello World!',
22462246+ } = data;
21532247 return __request(OpenAPI, {
21542248 method: 'POST',
21552249 url: '/api/v{api-version}/defaults',
···21642258 }
2165225921662260 /**
21672167- * @param parameterStringWithNoDefault This is a string with no default
21682168- * @param parameterOptionalStringWithDefault This is a optional string with default
21692169- * @param parameterOptionalStringWithEmptyDefault This is a optional string with empty default
21702170- * @param parameterOptionalStringWithNoDefault This is a optional string with no default
21712171- * @param parameterStringWithDefault This is a string with default
21722172- * @param parameterStringWithEmptyDefault This is a string with empty default
21732173- * @param parameterStringNullableWithNoDefault This is a string that can be null with no default
21742174- * @param parameterStringNullableWithDefault This is a string that can be null with default
21752261 * @throws ApiError
21762262 */
21772177- public static callToTestOrderOfParams(
21782178- parameterStringWithNoDefault: string,
21792179- parameterOptionalStringWithDefault: string = 'Hello World!',
21802180- parameterOptionalStringWithEmptyDefault: string = '',
21812181- parameterOptionalStringWithNoDefault?: string,
21822182- parameterStringWithDefault: string = 'Hello World!',
21832183- parameterStringWithEmptyDefault: string = '',
21842184- parameterStringNullableWithNoDefault?: string | null,
21852185- parameterStringNullableWithDefault: string | null = null
21862186- ): CancelablePromise<void> {
22632263+ public static callToTestOrderOfParams(data: TDataCallToTestOrderOfParams): CancelablePromise<void> {
22642264+ const {
22652265+ parameterOptionalStringWithDefault = 'Hello World!',
22662266+ parameterOptionalStringWithEmptyDefault = '',
22672267+ parameterOptionalStringWithNoDefault,
22682268+ parameterStringNullableWithDefault = null,
22692269+ parameterStringNullableWithNoDefault,
22702270+ parameterStringWithDefault = 'Hello World!',
22712271+ parameterStringWithEmptyDefault = '',
22722272+ parameterStringWithNoDefault,
22732273+ } = data;
21872274 return __request(OpenAPI, {
21882275 method: 'PUT',
21892276 url: '/api/v{api-version}/defaults',
···22082295import { OpenAPI } from '../core/OpenAPI';
22092296import { request as __request } from '../core/request';
2210229722112211-export class DescriptionsService {
22982298+export type TDataCallWithDescriptions = {
22992299+ /**
23002300+ * Testing backticks in string: \`backticks\` and \`\`\`multiple backticks\`\`\` should work
23012301+ */
23022302+ parameterWithBackticks?: string;
22122303 /**
22132213- * @param parameterWithBreaks Testing multiline comments in string: First line
23042304+ * Testing multiline comments in string: First line
22142305 * Second line
22152306 *
22162307 * Fourth line
22172217- * @param parameterWithBackticks Testing backticks in string: \`backticks\` and \`\`\`multiple backticks\`\`\` should work
22182218- * @param parameterWithSlashes Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work
22192219- * @param parameterWithExpressionPlaceholders Testing expression placeholders in string: \${expression} should work
22202220- * @param parameterWithQuotes Testing quotes in string: 'single quote''' and "double quotes""" should work
22212221- * @param parameterWithReservedCharacters Testing reserved characters in string: * inline * and ** inline ** should work
23082308+ */
23092309+ parameterWithBreaks?: string;
23102310+ /**
23112311+ * Testing expression placeholders in string: \${expression} should work
23122312+ */
23132313+ parameterWithExpressionPlaceholders?: string;
23142314+ /**
23152315+ * Testing quotes in string: 'single quote''' and "double quotes""" should work
23162316+ */
23172317+ parameterWithQuotes?: string;
23182318+ /**
23192319+ * Testing reserved characters in string: * inline * and ** inline ** should work
23202320+ */
23212321+ parameterWithReservedCharacters?: string;
23222322+ /**
23232323+ * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work
23242324+ */
23252325+ parameterWithSlashes?: string;
23262326+};
23272327+23282328+export class DescriptionsService {
23292329+ /**
22222330 * @throws ApiError
22232331 */
22242224- public static callWithDescriptions(
22252225- parameterWithBreaks?: string,
22262226- parameterWithBackticks?: string,
22272227- parameterWithSlashes?: string,
22282228- parameterWithExpressionPlaceholders?: string,
22292229- parameterWithQuotes?: string,
22302230- parameterWithReservedCharacters?: string
22312231- ): CancelablePromise<void> {
23322332+ public static callWithDescriptions(data: TDataCallWithDescriptions = {}): CancelablePromise<void> {
23332333+ const {
23342334+ parameterWithBackticks,
23352335+ parameterWithBreaks,
23362336+ parameterWithExpressionPlaceholders,
23372337+ parameterWithQuotes,
23382338+ parameterWithReservedCharacters,
23392339+ parameterWithSlashes,
23402340+ } = data;
22322341 return __request(OpenAPI, {
22332342 method: 'POST',
22342343 url: '/api/v{api-version}/descriptions/',
···23002409import { OpenAPI } from '../core/OpenAPI';
23012410import { request as __request } from '../core/request';
2302241124122412+export type TDataTestErrorCode = {
24132413+ /**
24142414+ * Status code to return
24152415+ */
24162416+ status: string;
24172417+};
24182418+23032419export class ErrorService {
23042420 /**
23052305- * @param status Status code to return
23062421 * @returns any Custom message: Successful response
23072422 * @throws ApiError
23082423 */
23092309- public static testErrorCode(status: string): CancelablePromise<any> {
24242424+ public static testErrorCode(data: TDataTestErrorCode): CancelablePromise<any> {
24252425+ const { status } = data;
23102426 return __request(OpenAPI, {
23112427 method: 'POST',
23122428 url: '/api/v{api-version}/error',
···24702586import { OpenAPI } from '../core/OpenAPI';
24712587import { request as __request } from '../core/request';
2472258825892589+export type TDataNonAsciiæøåÆøÅöôêÊ字符串 = {
25902590+ /**
25912591+ * Dummy input param
25922592+ */
25932593+ nonAsciiParamæøåÆøÅöôêÊ: number;
25942594+};
25952595+24732596export class NonAsciiÆøåÆøÅöôêÊService {
24742597 /**
24752475- * @param nonAsciiParamæøåÆøÅöôêÊ Dummy input param
24762598 * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response
24772599 * @throws ApiError
24782600 */
24792601 public static nonAsciiæøåÆøÅöôêÊ字符串(
24802480- nonAsciiParamæøåÆøÅöôêÊ: number
26022602+ data: TDataNonAsciiæøåÆøÅöôêÊ字符串
24812603 ): CancelablePromise<NonAsciiStringæøåÆØÅöôêÊ字符串> {
26042604+ const { nonAsciiParamæøåÆøÅöôêÊ } = data;
24822605 return __request(OpenAPI, {
24832606 method: 'POST',
24842607 url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',
···24962619import { OpenAPI } from '../core/OpenAPI';
24972620import { request as __request } from '../core/request';
2498262126222622+export type TDataCallWithParameters = {
26232623+ /**
26242624+ * This is the parameter that is sent as request body
26252625+ */
26262626+ parameterBody: string;
26272627+ /**
26282628+ * This is the parameter that goes into the form data
26292629+ */
26302630+ parameterForm: string;
26312631+ /**
26322632+ * This is the parameter that goes into the header
26332633+ */
26342634+ parameterHeader: string;
26352635+ /**
26362636+ * This is the parameter that goes into the path
26372637+ */
26382638+ parameterPath: string;
26392639+ /**
26402640+ * This is the parameter that goes into the query params
26412641+ */
26422642+ parameterQuery: string;
26432643+};
26442644+export type TDataCallWithWeirdParameterNames = {
26452645+ /**
26462646+ * This is the parameter with a reserved keyword
26472647+ */
26482648+ _default?: string;
26492649+ /**
26502650+ * This is the parameter that is sent as request body
26512651+ */
26522652+ parameterBody: string;
26532653+ /**
26542654+ * This is the parameter that goes into the request form data
26552655+ */
26562656+ parameterForm: string;
26572657+ /**
26582658+ * This is the parameter that goes into the request header
26592659+ */
26602660+ parameterHeader: string;
26612661+ /**
26622662+ * This is the parameter that goes into the path
26632663+ */
26642664+ parameterPath1?: string;
26652665+ /**
26662666+ * This is the parameter that goes into the path
26672667+ */
26682668+ parameterPath2?: string;
26692669+ /**
26702670+ * This is the parameter that goes into the path
26712671+ */
26722672+ parameterPath3?: string;
26732673+ /**
26742674+ * This is the parameter that goes into the request query params
26752675+ */
26762676+ parameterQuery: string;
26772677+};
26782678+24992679export class ParametersService {
25002680 /**
25012501- * @param parameterHeader This is the parameter that goes into the header
25022502- * @param parameterQuery This is the parameter that goes into the query params
25032503- * @param parameterForm This is the parameter that goes into the form data
25042504- * @param parameterBody This is the parameter that is sent as request body
25052505- * @param parameterPath This is the parameter that goes into the path
25062681 * @throws ApiError
25072682 */
25082508- public static callWithParameters(
25092509- parameterHeader: string,
25102510- parameterQuery: string,
25112511- parameterForm: string,
25122512- parameterBody: string,
25132513- parameterPath: string
25142514- ): CancelablePromise<void> {
26832683+ public static callWithParameters(data: TDataCallWithParameters): CancelablePromise<void> {
26842684+ const { parameterBody, parameterForm, parameterHeader, parameterPath, parameterQuery } = data;
25152685 return __request(OpenAPI, {
25162686 method: 'POST',
25172687 url: '/api/v{api-version}/parameters/{parameterPath}',
···25322702 }
2533270325342704 /**
25352535- * @param parameterHeader This is the parameter that goes into the request header
25362536- * @param parameterQuery This is the parameter that goes into the request query params
25372537- * @param parameterForm This is the parameter that goes into the request form data
25382538- * @param parameterBody This is the parameter that is sent as request body
25392539- * @param parameterPath1 This is the parameter that goes into the path
25402540- * @param parameterPath2 This is the parameter that goes into the path
25412541- * @param parameterPath3 This is the parameter that goes into the path
25422542- * @param _default This is the parameter with a reserved keyword
25432705 * @throws ApiError
25442706 */
25452545- public static callWithWeirdParameterNames(
25462546- parameterHeader: string,
25472547- parameterQuery: string,
25482548- parameterForm: string,
25492549- parameterBody: string,
25502550- parameterPath1?: string,
25512551- parameterPath2?: string,
25522552- parameterPath3?: string,
25532553- _default?: string
25542554- ): CancelablePromise<void> {
27072707+ public static callWithWeirdParameterNames(data: TDataCallWithWeirdParameterNames): CancelablePromise<void> {
27082708+ const {
27092709+ _default,
27102710+ parameterBody,
27112711+ parameterForm,
27122712+ parameterHeader,
27132713+ parameterPath1,
27142714+ parameterPath2,
27152715+ parameterPath3,
27162716+ parameterQuery,
27172717+ } = data;
25552718 return __request(OpenAPI, {
25562719 method: 'POST',
25572720 url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',
···27402903import { OpenAPI } from '../core/OpenAPI';
27412904import { request as __request } from '../core/request';
2742290529062906+export type TDataTypes = {
29072907+ /**
29082908+ * This is a number parameter
29092909+ */
29102910+ id?: number;
29112911+ /**
29122912+ * This is an array parameter
29132913+ */
29142914+ parameterArray: Array<string>;
29152915+ /**
29162916+ * This is a boolean parameter
29172917+ */
29182918+ parameterBoolean?: boolean;
29192919+ /**
29202920+ * This is a dictionary parameter
29212921+ */
29222922+ parameterDictionary: Record<string, string>;
29232923+ /**
29242924+ * This is an enum parameter
29252925+ */
29262926+ parameterEnum: 'Success' | 'Warning' | 'Error';
29272927+ /**
29282928+ * This is a number parameter
29292929+ */
29302930+ parameterNumber?: number;
29312931+ /**
29322932+ * This is an object parameter
29332933+ */
29342934+ parameterObject?: unknown;
29352935+ /**
29362936+ * This is a string parameter
29372937+ */
29382938+ parameterString?: string;
29392939+};
29402940+27432941export class TypesService {
27442942 /**
27452745- * @param parameterArray This is an array parameter
27462746- * @param parameterDictionary This is a dictionary parameter
27472747- * @param parameterEnum This is an enum parameter
27482748- * @param parameterNumber This is a number parameter
27492749- * @param parameterString This is a string parameter
27502750- * @param parameterBoolean This is a boolean parameter
27512751- * @param parameterObject This is an object parameter
27522752- * @param id This is a number parameter
27532943 * @returns number Response is a simple number
27542944 * @returns string Response is a simple string
27552945 * @returns boolean Response is a simple boolean
27562946 * @returns any Response is a simple object
27572947 * @throws ApiError
27582948 */
27592759- public static types(
27602760- parameterArray: Array<string>,
27612761- parameterDictionary: Record<string, string>,
27622762- parameterEnum: 'Success' | 'Warning' | 'Error',
27632763- parameterNumber: number = 123,
27642764- parameterString: string = 'default',
27652765- parameterBoolean: boolean = true,
27662766- parameterObject: unknown = null,
27672767- id?: number
27682768- ): CancelablePromise<number | string | boolean | unknown> {
29492949+ public static types(data: TDataTypes): CancelablePromise<number | string | boolean | unknown> {
29502950+ const {
29512951+ id,
29522952+ parameterArray,
29532953+ parameterBoolean = true,
29542954+ parameterDictionary,
29552955+ parameterEnum,
29562956+ parameterNumber = 123,
29572957+ parameterObject = null,
29582958+ parameterString = 'default',
29592959+ } = data;
27692960 return __request(OpenAPI, {
27702961 method: 'GET',
27712962 url: '/api/v{api-version}/types',
···3469366034703661export type TDataCallWithDefaultParameters = {
34713662 /**
34723472- * This is a simple string with default value
34733473- */
34743474- parameterString?: string | null;
34753475- /**
34763476- * This is a simple number with default value
34773477- */
34783478- parameterNumber?: number | null;
34793479- /**
34803663 * This is a simple boolean with default value
34813664 */
34823665 parameterBoolean?: boolean | null;
···34883671 * This is a simple model with default value
34893672 */
34903673 parameterModel?: ModelWithString | null;
34913491-};
34923492-export type TDataCallWithDefaultOptionalParameters = {
34933674 /**
34943494- * This is a simple string that is optional with default value
36753675+ * This is a simple number with default value
34953676 */
34963496- parameterString?: string;
36773677+ parameterNumber?: number | null;
34973678 /**
34983498- * This is a simple number that is optional with default value
36793679+ * This is a simple string with default value
34993680 */
35003500- parameterNumber?: number;
36813681+ parameterString?: string | null;
36823682+};
36833683+export type TDataCallWithDefaultOptionalParameters = {
35013684 /**
35023685 * This is a simple boolean that is optional with default value
35033686 */
···35103693 * This is a simple model that is optional with default value
35113694 */
35123695 parameterModel?: ModelWithString;
35133513-};
35143514-export type TDataCallToTestOrderOfParams = {
35153696 /**
35163516- * This is a string with no default
36973697+ * This is a simple number that is optional with default value
35173698 */
35183518- parameterStringWithNoDefault: string;
36993699+ parameterNumber?: number;
37003700+ /**
37013701+ * This is a simple string that is optional with default value
37023702+ */
37033703+ parameterString?: string;
37043704+};
37053705+export type TDataCallToTestOrderOfParams = {
35193706 /**
35203707 * This is a optional string with default
35213708 */
···35293716 */
35303717 parameterOptionalStringWithNoDefault?: string;
35313718 /**
37193719+ * This is a string that can be null with default
37203720+ */
37213721+ parameterStringNullableWithDefault?: string | null;
37223722+ /**
37233723+ * This is a string that can be null with no default
37243724+ */
37253725+ parameterStringNullableWithNoDefault?: string | null;
37263726+ /**
35323727 * This is a string with default
35333728 */
35343729 parameterStringWithDefault?: string;
···35373732 */
35383733 parameterStringWithEmptyDefault?: string;
35393734 /**
35403540- * This is a string that can be null with no default
37353735+ * This is a string with no default
35413736 */
35423542- parameterStringNullableWithNoDefault?: string | null;
35433543- /**
35443544- * This is a string that can be null with default
35453545- */
35463546- parameterStringNullableWithDefault?: string | null;
37373737+ parameterStringWithNoDefault: string;
35473738};
3548373935493740export class DefaultsService {
···35523743 */
35533744 public static callWithDefaultParameters(data: TDataCallWithDefaultParameters = {}): CancelablePromise<void> {
35543745 const {
35553555- parameterString = 'Hello World!',
35563556- parameterNumber = 123,
35573746 parameterBoolean = true,
35583747 parameterEnum = 'Success',
35593748 parameterModel = {
35603749 prop: 'Hello World!',
35613750 },
37513751+ parameterNumber = 123,
37523752+ parameterString = 'Hello World!',
35623753 } = data;
35633754 return __request(OpenAPI, {
35643755 method: 'GET',
···35803771 data: TDataCallWithDefaultOptionalParameters = {}
35813772 ): CancelablePromise<void> {
35823773 const {
35833583- parameterString = 'Hello World!',
35843584- parameterNumber = 123,
35853774 parameterBoolean = true,
35863775 parameterEnum = 'Success',
35873776 parameterModel = {
35883777 prop: 'Hello World!',
35893778 },
37793779+ parameterNumber = 123,
37803780+ parameterString = 'Hello World!',
35903781 } = data;
35913782 return __request(OpenAPI, {
35923783 method: 'POST',
···36063797 */
36073798 public static callToTestOrderOfParams(data: TDataCallToTestOrderOfParams): CancelablePromise<void> {
36083799 const {
36093609- parameterStringWithNoDefault,
36103800 parameterOptionalStringWithDefault = 'Hello World!',
36113801 parameterOptionalStringWithEmptyDefault = '',
36123802 parameterOptionalStringWithNoDefault,
38033803+ parameterStringNullableWithDefault = null,
38043804+ parameterStringNullableWithNoDefault,
36133805 parameterStringWithDefault = 'Hello World!',
36143806 parameterStringWithEmptyDefault = '',
36153615- parameterStringNullableWithNoDefault,
36163616- parameterStringNullableWithDefault = null,
38073807+ parameterStringWithNoDefault,
36173808 } = data;
36183809 return __request(OpenAPI, {
36193810 method: 'PUT',
···42754466export type { ModelThatExtendsExtends } from './models/ModelThatExtendsExtends';
42764467export type { ModelWithAdditionalPropertiesEqTrue } from './models/ModelWithAdditionalPropertiesEqTrue';
42774468export type { ModelWithArray } from './models/ModelWithArray';
44694469+export type { ModelWithArrayReadOnlyAndWriteOnly } from './models/ModelWithArrayReadOnlyAndWriteOnly';
42784470export type { ModelWithBoolean } from './models/ModelWithBoolean';
42794471export type { ModelWithCircularReference } from './models/ModelWithCircularReference';
42804472export type { ModelWithConst } from './models/ModelWithConst';
···43034495export type { ModelWithOrderedProperties } from './models/ModelWithOrderedProperties';
43044496export type { ModelWithPattern } from './models/ModelWithPattern';
43054497export type { ModelWithProperties } from './models/ModelWithProperties';
44984498+export type { ModelWithReadOnlyAndWriteOnly } from './models/ModelWithReadOnlyAndWriteOnly';
43064499export type { ModelWithReference } from './models/ModelWithReference';
43074500export type { ModelWithString } from './models/ModelWithString';
43084501export type { NestedAnyOfArraysNullable } from './models/NestedAnyOfArraysNullable';
···43724565export { $ModelThatExtendsExtends } from './schemas/$ModelThatExtendsExtends';
43734566export { $ModelWithAdditionalPropertiesEqTrue } from './schemas/$ModelWithAdditionalPropertiesEqTrue';
43744567export { $ModelWithArray } from './schemas/$ModelWithArray';
45684568+export { $ModelWithArrayReadOnlyAndWriteOnly } from './schemas/$ModelWithArrayReadOnlyAndWriteOnly';
43754569export { $ModelWithBoolean } from './schemas/$ModelWithBoolean';
43764570export { $ModelWithCircularReference } from './schemas/$ModelWithCircularReference';
43774571export { $ModelWithConst } from './schemas/$ModelWithConst';
···43954589export { $ModelWithOrderedProperties } from './schemas/$ModelWithOrderedProperties';
43964590export { $ModelWithPattern } from './schemas/$ModelWithPattern';
43974591export { $ModelWithProperties } from './schemas/$ModelWithProperties';
45924592+export { $ModelWithReadOnlyAndWriteOnly } from './schemas/$ModelWithReadOnlyAndWriteOnly';
43984593export { $ModelWithReference } from './schemas/$ModelWithReference';
43994594export { $ModelWithString } from './schemas/$ModelWithString';
44004595export { $NestedAnyOfArraysNullable } from './schemas/$NestedAnyOfArraysNullable';
···51055300"
51065301`;
5107530253035303+exports[`v3 should generate: test/generated/v3/models/ModelWithArrayReadOnlyAndWriteOnly.ts 1`] = `
53045304+"import type { ModelWithReadOnlyAndWriteOnly } from './ModelWithReadOnlyAndWriteOnly';
53055305+53065306+/**
53075307+ * This is a model with one property containing an array
53085308+ */
53095309+export type ModelWithArrayReadOnlyAndWriteOnly = {
53105310+ prop?: Array<ModelWithReadOnlyAndWriteOnly>;
53115311+ propWithFile?: Array<Blob>;
53125312+ propWithNumber?: Array<number>;
53135313+};
53145314+"
53155315+`;
53165316+51085317exports[`v3 should generate: test/generated/v3/models/ModelWithBoolean.ts 1`] = `
51095318"/**
51105319 * This is a model with one boolean property
···54375646 try?: string;
54385647 readonly '@namespace.string'?: string;
54395648 readonly '@namespace.integer'?: number;
56495649+};
56505650+"
56515651+`;
56525652+56535653+exports[`v3 should generate: test/generated/v3/models/ModelWithReadOnlyAndWriteOnly.ts 1`] = `
56545654+"export type ModelWithReadOnlyAndWriteOnly = {
56555655+ foo: string;
56565656+ readonly bar: string;
56575657+ baz: string;
54405658};
54415659"
54425660`;
···65456763"
65466764`;
6547676567666766+exports[`v3 should generate: test/generated/v3/schemas/$ModelWithArrayReadOnlyAndWriteOnly.ts 1`] = `
67676767+"export const $ModelWithArrayReadOnlyAndWriteOnly = {
67686768+ description: \`This is a model with one property containing an array\`,
67696769+ properties: {
67706770+ prop: {
67716771+ type: 'array',
67726772+ contains: {
67736773+ type: 'ModelWithReadOnlyAndWriteOnly',
67746774+ },
67756775+ },
67766776+ propWithFile: {
67776777+ type: 'array',
67786778+ contains: {
67796779+ type: 'binary',
67806780+ },
67816781+ },
67826782+ propWithNumber: {
67836783+ type: 'array',
67846784+ contains: {
67856785+ type: 'number',
67866786+ },
67876787+ },
67886788+ },
67896789+} as const;
67906790+"
67916791+`;
67926792+65486793exports[`v3 should generate: test/generated/v3/schemas/$ModelWithBoolean.ts 1`] = `
65496794"export const $ModelWithBoolean = {
65506795 description: \`This is a model with one boolean property\`,
···70597304"
70607305`;
7061730673077307+exports[`v3 should generate: test/generated/v3/schemas/$ModelWithReadOnlyAndWriteOnly.ts 1`] = `
73087308+"export const $ModelWithReadOnlyAndWriteOnly = {
73097309+ properties: {
73107310+ foo: {
73117311+ type: 'string',
73127312+ isRequired: true,
73137313+ },
73147314+ bar: {
73157315+ type: 'string',
73167316+ isReadOnly: true,
73177317+ isRequired: true,
73187318+ },
73197319+ baz: {
73207320+ type: 'string',
73217321+ isRequired: true,
73227322+ },
73237323+ },
73247324+} as const;
73257325+"
73267326+`;
73277327+70627328exports[`v3 should generate: test/generated/v3/schemas/$ModelWithReference.ts 1`] = `
70637329"export const $ModelWithReference = {
70647330 description: \`This is a model with one property containing a reference\`,
···72227488import { OpenAPI } from '../core/OpenAPI';
72237489import { request as __request } from '../core/request';
7224749074917491+export type TDataCollectionFormat = {
74927492+ /**
74937493+ * This is an array parameter that is sent as csv format (comma-separated values)
74947494+ */
74957495+ parameterArrayCsv: Array<string> | null;
74967496+ /**
74977497+ * This is an array parameter that is sent as multi format (multiple parameter instances)
74987498+ */
74997499+ parameterArrayMulti: Array<string> | null;
75007500+ /**
75017501+ * This is an array parameter that is sent as pipes format (pipe-separated values)
75027502+ */
75037503+ parameterArrayPipes: Array<string> | null;
75047504+ /**
75057505+ * This is an array parameter that is sent as ssv format (space-separated values)
75067506+ */
75077507+ parameterArraySsv: Array<string> | null;
75087508+ /**
75097509+ * This is an array parameter that is sent as tsv format (tab-separated values)
75107510+ */
75117511+ parameterArrayTsv: Array<string> | null;
75127512+};
75137513+72257514export class CollectionFormatService {
72267515 /**
72277227- * @param parameterArrayCsv This is an array parameter that is sent as csv format (comma-separated values)
72287228- * @param parameterArraySsv This is an array parameter that is sent as ssv format (space-separated values)
72297229- * @param parameterArrayTsv This is an array parameter that is sent as tsv format (tab-separated values)
72307230- * @param parameterArrayPipes This is an array parameter that is sent as pipes format (pipe-separated values)
72317231- * @param parameterArrayMulti This is an array parameter that is sent as multi format (multiple parameter instances)
72327516 * @throws ApiError
72337517 */
72347234- public static collectionFormat(
72357235- parameterArrayCsv: Array<string> | null,
72367236- parameterArraySsv: Array<string> | null,
72377237- parameterArrayTsv: Array<string> | null,
72387238- parameterArrayPipes: Array<string> | null,
72397239- parameterArrayMulti: Array<string> | null
72407240- ): CancelablePromise<void> {
75187518+ public static collectionFormat(data: TDataCollectionFormat): CancelablePromise<void> {
75197519+ const { parameterArrayCsv, parameterArrayMulti, parameterArrayPipes, parameterArraySsv, parameterArrayTsv } =
75207520+ data;
72417521 return __request(OpenAPI, {
72427522 method: 'GET',
72437523 url: '/api/v{api-version}/collectionFormat',
···72637543import { OpenAPI } from '../core/OpenAPI';
72647544import { request as __request } from '../core/request';
7265754575467546+export type TDataComplexTypes = {
75477547+ /**
75487548+ * Parameter containing object
75497549+ */
75507550+ parameterObject: {
75517551+ first?: {
75527552+ second?: {
75537553+ third?: string;
75547554+ };
75557555+ };
75567556+ };
75577557+ /**
75587558+ * Parameter containing reference
75597559+ */
75607560+ parameterReference: ModelWithString;
75617561+};
75627562+export type TDataComplexParams = {
75637563+ id: number;
75647564+ requestBody?: {
75657565+ readonly key: string | null;
75667566+ name: string | null;
75677567+ enabled?: boolean;
75687568+ readonly type: 'Monkey' | 'Horse' | 'Bird';
75697569+ listOfModels?: Array<ModelWithString> | null;
75707570+ listOfStrings?: Array<string> | null;
75717571+ parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;
75727572+ readonly user?: {
75737573+ readonly id?: number;
75747574+ readonly name?: string | null;
75757575+ };
75767576+ };
75777577+};
75787578+72667579export class ComplexService {
72677580 /**
72687268- * @param parameterObject Parameter containing object
72697269- * @param parameterReference Parameter containing reference
72707581 * @returns ModelWithString Successful response
72717582 * @throws ApiError
72727583 */
72737273- public static complexTypes(
72747274- parameterObject: {
72757275- first?: {
72767276- second?: {
72777277- third?: string;
72787278- };
72797279- };
72807280- },
72817281- parameterReference: ModelWithString
72827282- ): CancelablePromise<Array<ModelWithString>> {
75847584+ public static complexTypes(data: TDataComplexTypes): CancelablePromise<Array<ModelWithString>> {
75857585+ const { parameterObject, parameterReference } = data;
72837586 return __request(OpenAPI, {
72847587 method: 'GET',
72857588 url: '/api/v{api-version}/complex',
···72957598 }
7296759972977600 /**
72987298- * @param id
72997299- * @param requestBody
73007601 * @returns ModelWithString Success
73017602 * @throws ApiError
73027603 */
73037303- public static complexParams(
73047304- id: number,
73057305- requestBody?: {
73067306- readonly key: string | null;
73077307- name: string | null;
73087308- enabled?: boolean;
73097309- readonly type: 'Monkey' | 'Horse' | 'Bird';
73107310- listOfModels?: Array<ModelWithString> | null;
73117311- listOfStrings?: Array<string> | null;
73127312- parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary;
73137313- readonly user?: {
73147314- readonly id?: number;
73157315- readonly name?: string | null;
73167316- };
73177317- }
73187318- ): CancelablePromise<ModelWithString> {
76047604+ public static complexParams(data: TDataComplexParams): CancelablePromise<ModelWithString> {
76057605+ const { id, requestBody } = data;
73197606 return __request(OpenAPI, {
73207607 method: 'PUT',
73217608 url: '/api/v{api-version}/complex/{id}',
···73317618`;
7332761973337620exports[`v3 should generate: test/generated/v3/services/DefaultService.ts 1`] = `
73347334-"import type { CancelablePromise } from '../core/CancelablePromise';
76217621+"import type { ModelWithArrayReadOnlyAndWriteOnly } from '../models/ModelWithArrayReadOnlyAndWriteOnly';
76227622+import type { ModelWithReadOnlyAndWriteOnly } from '../models/ModelWithReadOnlyAndWriteOnly';
76237623+import type { CancelablePromise } from '../core/CancelablePromise';
73357624import { OpenAPI } from '../core/OpenAPI';
73367625import { request as __request } from '../core/request';
7337762676277627+export type TDataPostServiceWithEmptyTag = {
76287628+ requestBody: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly;
76297629+};
76307630+73387631export class DefaultService {
73397632 /**
73407633 * @throws ApiError
···73457638 url: '/api/v{api-version}/no-tag',
73467639 });
73477640 }
76417641+76427642+ /**
76437643+ * @returns ModelWithReadOnlyAndWriteOnly
76447644+ * @throws ApiError
76457645+ */
76467646+ public static postServiceWithEmptyTag(
76477647+ data: TDataPostServiceWithEmptyTag
76487648+ ): CancelablePromise<ModelWithReadOnlyAndWriteOnly> {
76497649+ const { requestBody } = data;
76507650+ return __request(OpenAPI, {
76517651+ method: 'POST',
76527652+ url: '/api/v{api-version}/no-tag',
76537653+ body: requestBody,
76547654+ mediaType: 'application/json',
76557655+ });
76567656+ }
73487657}
73497658"
73507659`;
···73557664import { OpenAPI } from '../core/OpenAPI';
73567665import { request as __request } from '../core/request';
7357766676677667+export type TDataCallWithDefaultParameters = {
76687668+ /**
76697669+ * This is a simple boolean with default value
76707670+ */
76717671+ parameterBoolean?: boolean | null;
76727672+ /**
76737673+ * This is a simple enum with default value
76747674+ */
76757675+ parameterEnum?: 'Success' | 'Warning' | 'Error';
76767676+ /**
76777677+ * This is a simple model with default value
76787678+ */
76797679+ parameterModel?: ModelWithString | null;
76807680+ /**
76817681+ * This is a simple number with default value
76827682+ */
76837683+ parameterNumber?: number | null;
76847684+ /**
76857685+ * This is a simple string with default value
76867686+ */
76877687+ parameterString?: string | null;
76887688+};
76897689+export type TDataCallWithDefaultOptionalParameters = {
76907690+ /**
76917691+ * This is a simple boolean that is optional with default value
76927692+ */
76937693+ parameterBoolean?: boolean;
76947694+ /**
76957695+ * This is a simple enum that is optional with default value
76967696+ */
76977697+ parameterEnum?: 'Success' | 'Warning' | 'Error';
76987698+ /**
76997699+ * This is a simple model that is optional with default value
77007700+ */
77017701+ parameterModel?: ModelWithString;
77027702+ /**
77037703+ * This is a simple number that is optional with default value
77047704+ */
77057705+ parameterNumber?: number;
77067706+ /**
77077707+ * This is a simple string that is optional with default value
77087708+ */
77097709+ parameterString?: string;
77107710+};
77117711+export type TDataCallToTestOrderOfParams = {
77127712+ /**
77137713+ * This is a optional string with default
77147714+ */
77157715+ parameterOptionalStringWithDefault?: string;
77167716+ /**
77177717+ * This is a optional string with empty default
77187718+ */
77197719+ parameterOptionalStringWithEmptyDefault?: string;
77207720+ /**
77217721+ * This is a optional string with no default
77227722+ */
77237723+ parameterOptionalStringWithNoDefault?: string;
77247724+ /**
77257725+ * This is a string that can be null with default
77267726+ */
77277727+ parameterStringNullableWithDefault?: string | null;
77287728+ /**
77297729+ * This is a string that can be null with no default
77307730+ */
77317731+ parameterStringNullableWithNoDefault?: string | null;
77327732+ /**
77337733+ * This is a string with default
77347734+ */
77357735+ parameterStringWithDefault?: string;
77367736+ /**
77377737+ * This is a string with empty default
77387738+ */
77397739+ parameterStringWithEmptyDefault?: string;
77407740+ /**
77417741+ * This is a string with no default
77427742+ */
77437743+ parameterStringWithNoDefault: string;
77447744+};
77457745+73587746export class DefaultsService {
73597747 /**
73607360- * @param parameterString This is a simple string with default value
73617361- * @param parameterNumber This is a simple number with default value
73627362- * @param parameterBoolean This is a simple boolean with default value
73637363- * @param parameterEnum This is a simple enum with default value
73647364- * @param parameterModel This is a simple model with default value
73657748 * @throws ApiError
73667749 */
73677367- public static callWithDefaultParameters(
73687368- parameterString: string | null = 'Hello World!',
73697369- parameterNumber: number | null = 123,
73707370- parameterBoolean: boolean | null = true,
73717371- parameterEnum: 'Success' | 'Warning' | 'Error' = 'Success',
73727372- parameterModel: ModelWithString | null = {
73737373- prop: 'Hello World!',
73747374- }
73757375- ): CancelablePromise<void> {
77507750+ public static callWithDefaultParameters(data: TDataCallWithDefaultParameters = {}): CancelablePromise<void> {
77517751+ const {
77527752+ parameterBoolean = true,
77537753+ parameterEnum = 'Success',
77547754+ parameterModel = {
77557755+ prop: 'Hello World!',
77567756+ },
77577757+ parameterNumber = 123,
77587758+ parameterString = 'Hello World!',
77597759+ } = data;
73767760 return __request(OpenAPI, {
73777761 method: 'GET',
73787762 url: '/api/v{api-version}/defaults',
···73877771 }
7388777273897773 /**
73907390- * @param parameterString This is a simple string that is optional with default value
73917391- * @param parameterNumber This is a simple number that is optional with default value
73927392- * @param parameterBoolean This is a simple boolean that is optional with default value
73937393- * @param parameterEnum This is a simple enum that is optional with default value
73947394- * @param parameterModel This is a simple model that is optional with default value
73957774 * @throws ApiError
73967775 */
73977776 public static callWithDefaultOptionalParameters(
73987398- parameterString: string = 'Hello World!',
73997399- parameterNumber: number = 123,
74007400- parameterBoolean: boolean = true,
74017401- parameterEnum: 'Success' | 'Warning' | 'Error' = 'Success',
74027402- parameterModel: ModelWithString = {
74037403- prop: 'Hello World!',
74047404- }
77777777+ data: TDataCallWithDefaultOptionalParameters = {}
74057778 ): CancelablePromise<void> {
77797779+ const {
77807780+ parameterBoolean = true,
77817781+ parameterEnum = 'Success',
77827782+ parameterModel = {
77837783+ prop: 'Hello World!',
77847784+ },
77857785+ parameterNumber = 123,
77867786+ parameterString = 'Hello World!',
77877787+ } = data;
74067788 return __request(OpenAPI, {
74077789 method: 'POST',
74087790 url: '/api/v{api-version}/defaults',
···74177799 }
7418780074197801 /**
74207420- * @param parameterStringWithNoDefault This is a string with no default
74217421- * @param parameterOptionalStringWithDefault This is a optional string with default
74227422- * @param parameterOptionalStringWithEmptyDefault This is a optional string with empty default
74237423- * @param parameterOptionalStringWithNoDefault This is a optional string with no default
74247424- * @param parameterStringWithDefault This is a string with default
74257425- * @param parameterStringWithEmptyDefault This is a string with empty default
74267426- * @param parameterStringNullableWithNoDefault This is a string that can be null with no default
74277427- * @param parameterStringNullableWithDefault This is a string that can be null with default
74287802 * @throws ApiError
74297803 */
74307430- public static callToTestOrderOfParams(
74317431- parameterStringWithNoDefault: string,
74327432- parameterOptionalStringWithDefault: string = 'Hello World!',
74337433- parameterOptionalStringWithEmptyDefault: string = '',
74347434- parameterOptionalStringWithNoDefault?: string,
74357435- parameterStringWithDefault: string = 'Hello World!',
74367436- parameterStringWithEmptyDefault: string = '',
74377437- parameterStringNullableWithNoDefault?: string | null,
74387438- parameterStringNullableWithDefault: string | null = null
74397439- ): CancelablePromise<void> {
78047804+ public static callToTestOrderOfParams(data: TDataCallToTestOrderOfParams): CancelablePromise<void> {
78057805+ const {
78067806+ parameterOptionalStringWithDefault = 'Hello World!',
78077807+ parameterOptionalStringWithEmptyDefault = '',
78087808+ parameterOptionalStringWithNoDefault,
78097809+ parameterStringNullableWithDefault = null,
78107810+ parameterStringNullableWithNoDefault,
78117811+ parameterStringWithDefault = 'Hello World!',
78127812+ parameterStringWithEmptyDefault = '',
78137813+ parameterStringWithNoDefault,
78147814+ } = data;
74407815 return __request(OpenAPI, {
74417816 method: 'PUT',
74427817 url: '/api/v{api-version}/defaults',
···74627837import { OpenAPI } from '../core/OpenAPI';
74637838import { request as __request } from '../core/request';
7464783978407840+export type TDataDeprecatedCall = {
78417841+ /**
78427842+ * This parameter is deprecated
78437843+ */
78447844+ parameter: DeprecatedModel | null;
78457845+};
78467846+74657847export class DeprecatedService {
74667848 /**
74677849 * @deprecated
74687468- * @param parameter This parameter is deprecated
74697850 * @throws ApiError
74707851 */
74717471- public static deprecatedCall(parameter: DeprecatedModel | null): CancelablePromise<void> {
78527852+ public static deprecatedCall(data: TDataDeprecatedCall): CancelablePromise<void> {
78537853+ const { parameter } = data;
74727854 return __request(OpenAPI, {
74737855 method: 'POST',
74747856 url: '/api/v{api-version}/parameters/deprecated',
···74867868import { OpenAPI } from '../core/OpenAPI';
74877869import { request as __request } from '../core/request';
7488787074897489-export class DescriptionsService {
78717871+export type TDataCallWithDescriptions = {
74907872 /**
74917491- * @param parameterWithBreaks Testing multiline comments in string: First line
78737873+ * Testing backticks in string: \`backticks\` and \`\`\`multiple backticks\`\`\` should work
78747874+ */
78757875+ parameterWithBackticks?: unknown;
78767876+ /**
78777877+ * Testing multiline comments in string: First line
74927878 * Second line
74937879 *
74947880 * Fourth line
74957495- * @param parameterWithBackticks Testing backticks in string: \`backticks\` and \`\`\`multiple backticks\`\`\` should work
74967496- * @param parameterWithSlashes Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work
74977497- * @param parameterWithExpressionPlaceholders Testing expression placeholders in string: \${expression} should work
74987498- * @param parameterWithQuotes Testing quotes in string: 'single quote''' and "double quotes""" should work
74997499- * @param parameterWithReservedCharacters Testing reserved characters in string: * inline * and ** inline ** should work
78817881+ */
78827882+ parameterWithBreaks?: unknown;
78837883+ /**
78847884+ * Testing expression placeholders in string: \${expression} should work
78857885+ */
78867886+ parameterWithExpressionPlaceholders?: unknown;
78877887+ /**
78887888+ * Testing quotes in string: 'single quote''' and "double quotes""" should work
78897889+ */
78907890+ parameterWithQuotes?: unknown;
78917891+ /**
78927892+ * Testing reserved characters in string: * inline * and ** inline ** should work
78937893+ */
78947894+ parameterWithReservedCharacters?: unknown;
78957895+ /**
78967896+ * Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work
78977897+ */
78987898+ parameterWithSlashes?: unknown;
78997899+};
79007900+79017901+export class DescriptionsService {
79027902+ /**
75007903 * @throws ApiError
75017904 */
75027502- public static callWithDescriptions(
75037503- parameterWithBreaks?: unknown,
75047504- parameterWithBackticks?: unknown,
75057505- parameterWithSlashes?: unknown,
75067506- parameterWithExpressionPlaceholders?: unknown,
75077507- parameterWithQuotes?: unknown,
75087508- parameterWithReservedCharacters?: unknown
75097509- ): CancelablePromise<void> {
79057905+ public static callWithDescriptions(data: TDataCallWithDescriptions = {}): CancelablePromise<void> {
79067906+ const {
79077907+ parameterWithBackticks,
79087908+ parameterWithBreaks,
79097909+ parameterWithExpressionPlaceholders,
79107910+ parameterWithQuotes,
79117911+ parameterWithReservedCharacters,
79127912+ parameterWithSlashes,
79137913+ } = data;
75107914 return __request(OpenAPI, {
75117915 method: 'POST',
75127916 url: '/api/v{api-version}/descriptions/',
···75787982import { OpenAPI } from '../core/OpenAPI';
75797983import { request as __request } from '../core/request';
7580798479857985+export type TDataTestErrorCode = {
79867986+ /**
79877987+ * Status code to return
79887988+ */
79897989+ status: number;
79907990+};
79917991+75817992export class ErrorService {
75827993 /**
75837583- * @param status Status code to return
75847994 * @returns any Custom message: Successful response
75857995 * @throws ApiError
75867996 */
75877587- public static testErrorCode(status: number): CancelablePromise<any> {
79977997+ public static testErrorCode(data: TDataTestErrorCode): CancelablePromise<any> {
79987998+ const { status } = data;
75887999 return __request(OpenAPI, {
75898000 method: 'POST',
75908001 url: '/api/v{api-version}/error',
···76088019import { OpenAPI } from '../core/OpenAPI';
76098020import { request as __request } from '../core/request';
7610802180228022+export type TDataFileResponse = {
80238023+ id: string;
80248024+};
80258025+76118026export class FileResponseService {
76128027 /**
76137613- * @param id
76148028 * @returns binary Success
76158029 * @throws ApiError
76168030 */
76177617- public static fileResponse(id: string): CancelablePromise<Blob> {
80318031+ public static fileResponse(data: TDataFileResponse): CancelablePromise<Blob> {
80328032+ const { id } = data;
76188033 return __request(OpenAPI, {
76198034 method: 'GET',
76208035 url: '/api/v{api-version}/file/{id}',
···76338048import { OpenAPI } from '../core/OpenAPI';
76348049import { request as __request } from '../core/request';
7635805080518051+export type TDataPostApiFormData = {
80528052+ /**
80538053+ * A reusable request body
80548054+ */
80558055+ formData?: ModelWithString;
80568056+ /**
80578057+ * This is a reusable parameter
80588058+ */
80598059+ parameter?: string;
80608060+};
80618061+76368062export class FormDataService {
76378063 /**
76387638- * @param parameter This is a reusable parameter
76397639- * @param formData A reusable request body
76408064 * @throws ApiError
76418065 */
76427642- public static postApiFormData(parameter?: string, formData?: ModelWithString): CancelablePromise<void> {
80668066+ public static postApiFormData(data: TDataPostApiFormData = {}): CancelablePromise<void> {
80678067+ const { formData, parameter } = data;
76438068 return __request(OpenAPI, {
76448069 method: 'POST',
76458070 url: '/api/v{api-version}/formData/',
···76858110import { OpenAPI } from '../core/OpenAPI';
76868111import { request as __request } from '../core/request';
7687811281138113+export type TDataMultipartRequest = {
81148114+ formData?: {
81158115+ content?: Blob;
81168116+ data?: ModelWithString | null;
81178117+ };
81188118+};
81198119+76888120export class MultipartService {
76898121 /**
76907690- * @param formData
76918122 * @throws ApiError
76928123 */
76937693- public static multipartRequest(formData?: {
76947694- content?: Blob;
76957695- data?: ModelWithString | null;
76967696- }): CancelablePromise<void> {
81248124+ public static multipartRequest(data: TDataMultipartRequest = {}): CancelablePromise<void> {
81258125+ const { formData } = data;
76978126 return __request(OpenAPI, {
76988127 method: 'POST',
76998128 url: '/api/v{api-version}/multipart',
···78428271import { OpenAPI } from '../core/OpenAPI';
78438272import { request as __request } from '../core/request';
7844827382748274+export type TDataNonAsciiæøåÆøÅöôêÊ字符串 = {
82758275+ /**
82768276+ * Dummy input param
82778277+ */
82788278+ nonAsciiParamæøåÆøÅöôêÊ: number;
82798279+};
82808280+78458281export class NonAsciiÆøåÆøÅöôêÊService {
78468282 /**
78477847- * @param nonAsciiParamæøåÆøÅöôêÊ Dummy input param
78488283 * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response
78498284 * @throws ApiError
78508285 */
78518286 public static nonAsciiæøåÆøÅöôêÊ字符串(
78527852- nonAsciiParamæøåÆøÅöôêÊ: number
82878287+ data: TDataNonAsciiæøåÆøÅöôêÊ字符串
78538288 ): CancelablePromise<Array<NonAsciiStringæøåÆØÅöôêÊ字符串>> {
82898289+ const { nonAsciiParamæøåÆøÅöôêÊ } = data;
78548290 return __request(OpenAPI, {
78558291 method: 'POST',
78568292 url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串',
···78728308import { OpenAPI } from '../core/OpenAPI';
78738309import { request as __request } from '../core/request';
7874831083118311+export type TDataDeleteFoo = {
83128312+ /**
83138313+ * bar in method
83148314+ */
83158315+ bar: string;
83168316+ /**
83178317+ * foo in method
83188318+ */
83198319+ foo: string;
83208320+};
83218321+export type TDataCallWithParameters = {
83228322+ fooAllOfEnum: ModelWithNestedArrayEnumsDataFoo;
83238323+ fooRefEnum?: ModelWithNestedArrayEnumsDataFoo;
83248324+ /**
83258325+ * This is the parameter that goes into the cookie
83268326+ */
83278327+ parameterCookie: string | null;
83288328+ /**
83298329+ * This is the parameter that goes into the form data
83308330+ */
83318331+ parameterForm: string | null;
83328332+ /**
83338333+ * This is the parameter that goes into the header
83348334+ */
83358335+ parameterHeader: string | null;
83368336+ /**
83378337+ * This is the parameter that goes into the path
83388338+ */
83398339+ parameterPath: string | null;
83408340+ /**
83418341+ * This is the parameter that goes into the query params
83428342+ */
83438343+ parameterQuery: string | null;
83448344+ /**
83458345+ * This is the parameter that goes into the body
83468346+ */
83478347+ requestBody: ModelWithString | null;
83488348+};
83498349+export type TDataCallWithWeirdParameterNames = {
83508350+ /**
83518351+ * This is the parameter with a reserved keyword
83528352+ */
83538353+ _default?: string;
83548354+ /**
83558355+ * This is the parameter that goes into the cookie
83568356+ */
83578357+ parameterCookie: string | null;
83588358+ /**
83598359+ * This is the parameter that goes into the request form data
83608360+ */
83618361+ parameterForm: string | null;
83628362+ /**
83638363+ * This is the parameter that goes into the request header
83648364+ */
83658365+ parameterHeader: string | null;
83668366+ /**
83678367+ * This is the parameter that goes into the path
83688368+ */
83698369+ parameterPath1?: string;
83708370+ /**
83718371+ * This is the parameter that goes into the path
83728372+ */
83738373+ parameterPath2?: string;
83748374+ /**
83758375+ * This is the parameter that goes into the path
83768376+ */
83778377+ parameterPath3?: string;
83788378+ /**
83798379+ * This is the parameter that goes into the request query params
83808380+ */
83818381+ parameterQuery: string | null;
83828382+ /**
83838383+ * This is the parameter that goes into the body
83848384+ */
83858385+ requestBody: ModelWithString | null;
83868386+};
83878387+export type TDataGetCallWithOptionalParam = {
83888388+ /**
83898389+ * This is an optional parameter
83908390+ */
83918391+ parameter?: string;
83928392+ /**
83938393+ * This is a required parameter
83948394+ */
83958395+ requestBody: ModelWithOneOfEnum;
83968396+};
83978397+export type TDataPostCallWithOptionalParam = {
83988398+ /**
83998399+ * This is a required parameter
84008400+ */
84018401+ parameter: Pageable;
84028402+ /**
84038403+ * This is an optional parameter
84048404+ */
84058405+ requestBody?: ModelWithString;
84068406+};
84078407+78758408export class ParametersService {
78768409 /**
78777877- * @param foo foo in method
78787878- * @param bar bar in method
78798410 * @throws ApiError
78808411 */
78817881- public static deleteFoo(foo: string, bar: string): CancelablePromise<void> {
84128412+ public static deleteFoo(data: TDataDeleteFoo): CancelablePromise<void> {
84138413+ const { bar, foo } = data;
78828414 return __request(OpenAPI, {
78838415 method: 'DELETE',
78848416 url: '/api/v{api-version}/foo/{foo}/bar/{bar}',
···78908422 }
7891842378928424 /**
78937893- * @param parameterHeader This is the parameter that goes into the header
78947894- * @param fooAllOfEnum
78957895- * @param parameterQuery This is the parameter that goes into the query params
78967896- * @param parameterForm This is the parameter that goes into the form data
78977897- * @param parameterCookie This is the parameter that goes into the cookie
78987898- * @param parameterPath This is the parameter that goes into the path
78997899- * @param requestBody This is the parameter that goes into the body
79007900- * @param fooRefEnum
79018425 * @throws ApiError
79028426 */
79037903- public static callWithParameters(
79047904- parameterHeader: string | null,
79057905- fooAllOfEnum: ModelWithNestedArrayEnumsDataFoo,
79067906- parameterQuery: string | null,
79077907- parameterForm: string | null,
79087908- parameterCookie: string | null,
79097909- parameterPath: string | null,
79107910- requestBody: ModelWithString | null,
79117911- fooRefEnum?: ModelWithNestedArrayEnumsDataFoo
79127912- ): CancelablePromise<void> {
84278427+ public static callWithParameters(data: TDataCallWithParameters): CancelablePromise<void> {
84288428+ const {
84298429+ fooAllOfEnum,
84308430+ fooRefEnum,
84318431+ parameterCookie,
84328432+ parameterForm,
84338433+ parameterHeader,
84348434+ parameterPath,
84358435+ parameterQuery,
84368436+ requestBody,
84378437+ } = data;
79138438 return __request(OpenAPI, {
79148439 method: 'POST',
79158440 url: '/api/v{api-version}/parameters/{parameterPath}',
···79368461 }
7937846279388463 /**
79397939- * @param parameterHeader This is the parameter that goes into the request header
79407940- * @param parameterQuery This is the parameter that goes into the request query params
79417941- * @param parameterForm This is the parameter that goes into the request form data
79427942- * @param parameterCookie This is the parameter that goes into the cookie
79437943- * @param requestBody This is the parameter that goes into the body
79447944- * @param parameterPath1 This is the parameter that goes into the path
79457945- * @param parameterPath2 This is the parameter that goes into the path
79467946- * @param parameterPath3 This is the parameter that goes into the path
79477947- * @param _default This is the parameter with a reserved keyword
79488464 * @throws ApiError
79498465 */
79507950- public static callWithWeirdParameterNames(
79517951- parameterHeader: string | null,
79527952- parameterQuery: string | null,
79537953- parameterForm: string | null,
79547954- parameterCookie: string | null,
79557955- requestBody: ModelWithString | null,
79567956- parameterPath1?: string,
79577957- parameterPath2?: string,
79587958- parameterPath3?: string,
79597959- _default?: string
79607960- ): CancelablePromise<void> {
84668466+ public static callWithWeirdParameterNames(data: TDataCallWithWeirdParameterNames): CancelablePromise<void> {
84678467+ const {
84688468+ _default,
84698469+ parameterCookie,
84708470+ parameterForm,
84718471+ parameterHeader,
84728472+ parameterPath1,
84738473+ parameterPath2,
84748474+ parameterPath3,
84758475+ parameterQuery,
84768476+ requestBody,
84778477+ } = data;
79618478 return __request(OpenAPI, {
79628479 method: 'POST',
79638480 url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}',
···79858502 }
7986850379878504 /**
79887988- * @param requestBody This is a required parameter
79897989- * @param parameter This is an optional parameter
79908505 * @throws ApiError
79918506 */
79927992- public static getCallWithOptionalParam(
79937993- requestBody: ModelWithOneOfEnum,
79947994- parameter?: string
79957995- ): CancelablePromise<void> {
85078507+ public static getCallWithOptionalParam(data: TDataGetCallWithOptionalParam): CancelablePromise<void> {
85088508+ const { parameter, requestBody } = data;
79968509 return __request(OpenAPI, {
79978510 method: 'GET',
79988511 url: '/api/v{api-version}/parameters/',
···80058518 }
8006851980078520 /**
80088008- * @param parameter This is a required parameter
80098009- * @param requestBody This is an optional parameter
80108521 * @throws ApiError
80118522 */
80128012- public static postCallWithOptionalParam(
80138013- parameter: Pageable,
80148014- requestBody?: ModelWithString
80158015- ): CancelablePromise<void> {
85238523+ public static postCallWithOptionalParam(data: TDataPostCallWithOptionalParam): CancelablePromise<void> {
85248524+ const { parameter, requestBody } = data;
80168525 return __request(OpenAPI, {
80178526 method: 'POST',
80188527 url: '/api/v{api-version}/parameters/',
···80338542import { OpenAPI } from '../core/OpenAPI';
80348543import { request as __request } from '../core/request';
8035854485458545+export type TDataPostApiRequestBody = {
85468546+ /**
85478547+ * A reusable request body
85488548+ */
85498549+ foo?: ModelWithString;
85508550+ /**
85518551+ * This is a reusable parameter
85528552+ */
85538553+ parameter?: string;
85548554+};
85558555+80368556export class RequestBodyService {
80378557 /**
80388038- * @param parameter This is a reusable parameter
80398039- * @param foo A reusable request body
80408558 * @throws ApiError
80418559 */
80428042- public static postApiRequestBody(parameter?: string, foo?: ModelWithString): CancelablePromise<void> {
85608560+ public static postApiRequestBody(data: TDataPostApiRequestBody = {}): CancelablePromise<void> {
85618561+ const { foo, parameter } = data;
80438562 return __request(OpenAPI, {
80448563 method: 'POST',
80458564 url: '/api/v{api-version}/requestBody/',
···82178736import { OpenAPI } from '../core/OpenAPI';
82188737import { request as __request } from '../core/request';
8219873887398739+export type TDataTypes = {
87408740+ /**
87418741+ * This is a number parameter
87428742+ */
87438743+ id?: number;
87448744+ /**
87458745+ * This is an array parameter
87468746+ */
87478747+ parameterArray: Array<string> | null;
87488748+ /**
87498749+ * This is a boolean parameter
87508750+ */
87518751+ parameterBoolean?: boolean | null;
87528752+ /**
87538753+ * This is a dictionary parameter
87548754+ */
87558755+ parameterDictionary: Record<string, unknown> | null;
87568756+ /**
87578757+ * This is an enum parameter
87588758+ */
87598759+ parameterEnum: 'Success' | 'Warning' | 'Error' | null;
87608760+ /**
87618761+ * This is a number parameter
87628762+ */
87638763+ parameterNumber?: number;
87648764+ /**
87658765+ * This is an object parameter
87668766+ */
87678767+ parameterObject?: Record<string, unknown> | null;
87688768+ /**
87698769+ * This is a string parameter
87708770+ */
87718771+ parameterString?: string | null;
87728772+};
87738773+82208774export class TypesService {
82218775 /**
82228222- * @param parameterArray This is an array parameter
82238223- * @param parameterDictionary This is a dictionary parameter
82248224- * @param parameterEnum This is an enum parameter
82258225- * @param parameterNumber This is a number parameter
82268226- * @param parameterString This is a string parameter
82278227- * @param parameterBoolean This is a boolean parameter
82288228- * @param parameterObject This is an object parameter
82298229- * @param id This is a number parameter
82308776 * @returns number Response is a simple number
82318777 * @returns string Response is a simple string
82328778 * @returns boolean Response is a simple boolean
82338779 * @returns unknown Response is a simple object
82348780 * @throws ApiError
82358781 */
82368236- public static types(
82378237- parameterArray: Array<string> | null,
82388238- parameterDictionary: Record<string, unknown> | null,
82398239- parameterEnum: 'Success' | 'Warning' | 'Error' | null,
82408240- parameterNumber: number = 123,
82418241- parameterString: string | null = 'default',
82428242- parameterBoolean: boolean | null = true,
82438243- parameterObject: Record<string, unknown> | null = null,
82448244- id?: number
82458245- ): CancelablePromise<number | string | boolean | Record<string, unknown>> {
87828782+ public static types(data: TDataTypes): CancelablePromise<number | string | boolean | Record<string, unknown>> {
87838783+ const {
87848784+ id,
87858785+ parameterArray,
87868786+ parameterBoolean = true,
87878787+ parameterDictionary,
87888788+ parameterEnum,
87898789+ parameterNumber = 123,
87908790+ parameterObject = null,
87918791+ parameterString = 'default',
87928792+ } = data;
82468793 return __request(OpenAPI, {
82478794 method: 'GET',
82488795 url: '/api/v{api-version}/types',
···82698816import { OpenAPI } from '../core/OpenAPI';
82708817import { request as __request } from '../core/request';
8271881888198819+export type TDataUploadFile = {
88208820+ /**
88218821+ * Supply a file reference for upload
88228822+ */
88238823+ file: Blob;
88248824+};
88258825+82728826export class UploadService {
82738827 /**
82748274- * @param file Supply a file reference for upload
82758828 * @returns boolean
82768829 * @throws ApiError
82778830 */
82788278- public static uploadFile(file: Blob): CancelablePromise<boolean> {
88318831+ public static uploadFile(data: TDataUploadFile): CancelablePromise<boolean> {
88328832+ const { file } = data;
82798833 return __request(OpenAPI, {
82808834 method: 'POST',
82818835 url: '/api/v{api-version}/upload',