Skip to content

Commit 0c11661

Browse files
nocontributescarf005
authored andcommitted
chore: update generator output
1 parent 4755408 commit 0c11661

178 files changed

Lines changed: 835 additions & 6777 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

samples/client/echo_api/typescript-axios/build/api.ts

Lines changed: 22 additions & 306 deletions
Large diffs are not rendered by default.

samples/client/echo_api/typescript-axios/build/base.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,18 @@ import globalAxios from 'axios';
2121

2222
export const BASE_PATH = "http://localhost:3000".replace(/\/+$/, "");
2323

24-
/**
25-
*
26-
* @export
27-
*/
2824
export const COLLECTION_FORMATS = {
2925
csv: ",",
3026
ssv: " ",
3127
tsv: "\t",
3228
pipes: "|",
3329
};
3430

35-
/**
36-
*
37-
* @export
38-
* @interface RequestArgs
39-
*/
4031
export interface RequestArgs {
4132
url: string;
4233
options: RawAxiosRequestConfig;
4334
}
4435

45-
/**
46-
*
47-
* @export
48-
* @class BaseAPI
49-
*/
5036
export class BaseAPI {
5137
protected configuration: Configuration | undefined;
5238

@@ -58,12 +44,6 @@ export class BaseAPI {
5844
}
5945
};
6046

61-
/**
62-
*
63-
* @export
64-
* @class RequiredError
65-
* @extends {Error}
66-
*/
6747
export class RequiredError extends Error {
6848
constructor(public field: string, msg?: string) {
6949
super(msg);
@@ -78,9 +58,5 @@ interface ServerMap {
7858
}[];
7959
}
8060

81-
/**
82-
*
83-
* @export
84-
*/
8561
export const operationServerMap: ServerMap = {
8662
}

samples/client/echo_api/typescript-axios/build/common.ts

Lines changed: 4 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,18 @@ import type { RequestArgs } from "./base";
1818
import type { AxiosInstance, AxiosResponse } from 'axios';
1919
import { RequiredError } from "./base";
2020

21-
/**
22-
*
23-
* @export
24-
*/
2521
export const DUMMY_BASE_URL = 'https://example.com'
2622

2723
/**
2824
*
2925
* @throws {RequiredError}
30-
* @export
3126
*/
3227
export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {
3328
if (paramValue === null || paramValue === undefined) {
3429
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
3530
}
3631
}
3732

38-
/**
39-
*
40-
* @export
41-
*/
4233
export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {
4334
if (configuration && configuration.apiKey) {
4435
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
@@ -48,20 +39,12 @@ export const setApiKeyToObject = async function (object: any, keyParamName: stri
4839
}
4940
}
5041

51-
/**
52-
*
53-
* @export
54-
*/
5542
export const setBasicAuthToObject = function (object: any, configuration?: Configuration) {
5643
if (configuration && (configuration.username || configuration.password)) {
5744
object["auth"] = { username: configuration.username, password: configuration.password };
5845
}
5946
}
6047

61-
/**
62-
*
63-
* @export
64-
*/
6548
export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {
6649
if (configuration && configuration.accessToken) {
6750
const accessToken = typeof configuration.accessToken === 'function'
@@ -71,10 +54,6 @@ export const setBearerAuthToObject = async function (object: any, configuration?
7154
}
7255
}
7356

74-
/**
75-
*
76-
* @export
77-
*/
7857
export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {
7958
if (configuration && configuration.accessToken) {
8059
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
@@ -89,37 +68,29 @@ function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: an
8968
if (typeof parameter === "object") {
9069
if (Array.isArray(parameter)) {
9170
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
92-
}
71+
}
9372
else {
94-
Object.keys(parameter).forEach(currentKey =>
73+
Object.keys(parameter).forEach(currentKey =>
9574
setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)
9675
);
9776
}
98-
}
77+
}
9978
else {
10079
if (urlSearchParams.has(key)) {
10180
urlSearchParams.append(key, parameter);
102-
}
81+
}
10382
else {
10483
urlSearchParams.set(key, parameter);
10584
}
10685
}
10786
}
10887

109-
/**
110-
*
111-
* @export
112-
*/
11388
export const setSearchParams = function (url: URL, ...objects: any[]) {
11489
const searchParams = new URLSearchParams(url.search);
11590
setFlattenedQueryParams(searchParams, objects);
11691
url.search = searchParams.toString();
11792
}
11893

119-
/**
120-
*
121-
* @export
122-
*/
12394
export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
12495
const nonString = typeof value !== 'string';
12596
const needsSerialization = nonString && configuration && configuration.isJsonMime
@@ -130,18 +101,10 @@ export const serializeDataIfNeeded = function (value: any, requestOptions: any,
130101
: (value || "");
131102
}
132103

133-
/**
134-
*
135-
* @export
136-
*/
137104
export const toPathString = function (url: URL) {
138105
return url.pathname + url.search + url.hash
139106
}
140107

141-
/**
142-
*
143-
* @export
144-
*/
145108
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
146109
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
147110
const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};

samples/client/echo_api/typescript-axios/build/configuration.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,49 +28,32 @@ export class Configuration {
2828
/**
2929
* parameter for apiKey security
3030
* @param name security name
31-
* @memberof Configuration
3231
*/
3332
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
3433
/**
3534
* parameter for basic security
36-
*
37-
* @type {string}
38-
* @memberof Configuration
3935
*/
4036
username?: string;
4137
/**
4238
* parameter for basic security
43-
*
44-
* @type {string}
45-
* @memberof Configuration
4639
*/
4740
password?: string;
4841
/**
4942
* parameter for oauth2 security
5043
* @param name security name
5144
* @param scopes oauth2 scope
52-
* @memberof Configuration
5345
*/
5446
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
5547
/**
5648
* override base path
57-
*
58-
* @type {string}
59-
* @memberof Configuration
6049
*/
6150
basePath?: string;
6251
/**
6352
* override server index
64-
*
65-
* @type {number}
66-
* @memberof Configuration
6753
*/
6854
serverIndex?: number;
6955
/**
7056
* base options for axios calls
71-
*
72-
* @type {any}
73-
* @memberof Configuration
7457
*/
7558
baseOptions?: any;
7659
/**

samples/client/echo_api/typescript-axios/build/docs/Bird.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8-
**size** | **string** | | [optional] [default to undefined]
98
**color** | **string** | | [optional] [default to undefined]
9+
**size** | **string** | | [optional] [default to undefined]
1010

1111
## Example
1212

1313
```typescript
1414
import { Bird } from '@openapitools/typescript-axios-echo-api';
1515

1616
const instance: Bird = {
17-
size,
1817
color,
18+
size,
1919
};
2020
```
2121

samples/client/echo_api/typescript-axios/build/docs/DataQuery.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8+
**date** | **string** | A date | [optional] [default to undefined]
89
**suffix** | **string** | test suffix | [optional] [default to undefined]
910
**text** | **string** | Some text containing white spaces | [optional] [default to undefined]
10-
**date** | **string** | A date | [optional] [default to undefined]
1111

1212
## Example
1313

1414
```typescript
1515
import { DataQuery } from '@openapitools/typescript-axios-echo-api';
1616

1717
const instance: DataQuery = {
18+
date,
1819
suffix,
1920
text,
20-
date,
2121
};
2222
```
2323

samples/client/echo_api/typescript-axios/build/docs/DefaultValue.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ to test the default value of properties
66

77
Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
9-
**array_string_enum_ref_default** | [**Array&lt;StringEnumRef&gt;**](StringEnumRef.md) | | [optional] [default to undefined]
10-
**array_string_enum_default** | **Array&lt;string&gt;** | | [optional] [default to undefined]
11-
**array_string_default** | **Array&lt;string&gt;** | | [optional] [default to undefined]
129
**array_integer_default** | **Array&lt;number&gt;** | | [optional] [default to undefined]
1310
**array_string** | **Array&lt;string&gt;** | | [optional] [default to undefined]
14-
**array_string_nullable** | **Array&lt;string&gt;** | | [optional] [default to undefined]
11+
**array_string_default** | **Array&lt;string&gt;** | | [optional] [default to undefined]
12+
**array_string_enum_default** | **Array&lt;string&gt;** | | [optional] [default to undefined]
13+
**array_string_enum_ref_default** | [**Array&lt;StringEnumRef&gt;**](StringEnumRef.md) | | [optional] [default to undefined]
1514
**array_string_extension_nullable** | **Array&lt;string&gt;** | | [optional] [default to undefined]
15+
**array_string_nullable** | **Array&lt;string&gt;** | | [optional] [default to undefined]
1616
**string_nullable** | **string** | | [optional] [default to undefined]
1717

1818
## Example
@@ -21,13 +21,13 @@ Name | Type | Description | Notes
2121
import { DefaultValue } from '@openapitools/typescript-axios-echo-api';
2222

2323
const instance: DefaultValue = {
24-
array_string_enum_ref_default,
25-
array_string_enum_default,
26-
array_string_default,
2724
array_integer_default,
2825
array_string,
29-
array_string_nullable,
26+
array_string_default,
27+
array_string_enum_default,
28+
array_string_enum_ref_default,
3029
array_string_extension_nullable,
30+
array_string_nullable,
3131
string_nullable,
3232
};
3333
```

samples/client/echo_api/typescript-axios/build/docs/NumberPropertiesOnly.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8-
**number** | **number** | | [optional] [default to undefined]
9-
**_float** | **number** | | [optional] [default to undefined]
108
**_double** | **number** | | [optional] [default to undefined]
9+
**_float** | **number** | | [optional] [default to undefined]
10+
**number** | **number** | | [optional] [default to undefined]
1111

1212
## Example
1313

1414
```typescript
1515
import { NumberPropertiesOnly } from '@openapitools/typescript-axios-echo-api';
1616

1717
const instance: NumberPropertiesOnly = {
18-
number,
19-
_float,
2018
_double,
19+
_float,
20+
number,
2121
};
2222
```
2323

samples/client/echo_api/typescript-axios/build/docs/Pet.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8+
**category** | [**Category**](Category.md) | | [optional] [default to undefined]
89
**id** | **number** | | [optional] [default to undefined]
910
**name** | **string** | | [default to undefined]
10-
**category** | [**Category**](Category.md) | | [optional] [default to undefined]
1111
**photoUrls** | **Array&lt;string&gt;** | | [default to undefined]
12-
**tags** | [**Array&lt;Tag&gt;**](Tag.md) | | [optional] [default to undefined]
1312
**status** | **string** | pet status in the store | [optional] [default to undefined]
13+
**tags** | [**Array&lt;Tag&gt;**](Tag.md) | | [optional] [default to undefined]
1414

1515
## Example
1616

1717
```typescript
1818
import { Pet } from '@openapitools/typescript-axios-echo-api';
1919

2020
const instance: Pet = {
21+
category,
2122
id,
2223
name,
23-
category,
2424
photoUrls,
25-
tags,
2625
status,
26+
tags,
2727
};
2828
```
2929

samples/client/echo_api/typescript-axios/build/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8-
**size** | **string** | | [optional] [default to undefined]
98
**color** | **string** | | [optional] [default to undefined]
109
**id** | **number** | | [optional] [default to undefined]
1110
**name** | **string** | | [optional] [default to undefined]
11+
**size** | **string** | | [optional] [default to undefined]
1212

1313
## Example
1414

1515
```typescript
1616
import { TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter } from '@openapitools/typescript-axios-echo-api';
1717

1818
const instance: TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter = {
19-
size,
2019
color,
2120
id,
2221
name,
22+
size,
2323
};
2424
```
2525

0 commit comments

Comments
 (0)