File tree Expand file tree Collapse file tree 2 files changed +10
-23
lines changed Expand file tree Collapse file tree 2 files changed +10
-23
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import type { OpenApiSchema } from '../interfaces/OpenApiSchema';
5
5
import { extendEnum } from './extendEnum' ;
6
6
import { getComment } from './getComment' ;
7
7
import { getEnum } from './getEnum' ;
8
- import { getEnumFromDescription } from './getEnumFromDescription' ;
9
8
import { getModelComposition } from './getModelComposition' ;
10
9
import { getModelDefault } from './getModelDefault' ;
11
10
import { getModelProperties } from './getModelProperties' ;
@@ -73,18 +72,6 @@ export function getModel(
73
72
}
74
73
}
75
74
76
- if ( ( definition . type === 'int' || definition . type === 'integer' ) && definition . description ) {
77
- const enumerators = getEnumFromDescription ( definition . description ) ;
78
- if ( enumerators . length ) {
79
- model . export = 'enum' ;
80
- model . type = 'number' ;
81
- model . base = 'number' ;
82
- model . enum . push ( ...enumerators ) ;
83
- model . default = getModelDefault ( definition , model ) ;
84
- return model ;
85
- }
86
- }
87
-
88
75
if ( definition . type === 'array' && definition . items ) {
89
76
if ( definition . items . $ref ) {
90
77
const arrayItems = getType ( definition . items . $ref ) ;
Original file line number Diff line number Diff line change @@ -21,13 +21,13 @@ async function sendRequest(
21
21
22
22
onCancel(() => source.cancel('The user aborted a request.'));
23
23
24
- try {
25
- return await axios.request(config );
26
- } catch (error) {
27
- const axiosError = error as AxiosError;
28
- if (axiosError.response) {
29
- return axiosError.response;
30
- }
31
- throw error;
32
- }
33
- }
24
+ try {
25
+ return await axios.request(requestConfig );
26
+ } catch (error) {
27
+ const axiosError = error as AxiosError< T > ;
28
+ if (axiosError.response) {
29
+ return axiosError.response;
30
+ }
31
+ throw error;
32
+ }
33
+ };
You can’t perform that action at this time.
0 commit comments