File tree 3 files changed +16
-2
lines changed
3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -137,8 +137,8 @@ export const getNumberWord = (num: number) => {
137
137
return arrayOfNumber . reduce ( ( acc , n ) => acc + NUMBERS [ n ] , '' ) ;
138
138
} ;
139
139
140
- export const escape = ( str : string , char : string = "'" ) =>
141
- str . replace ( char , `\\${ char } ` ) ;
140
+ export const escape = ( str : string | null , char : string = "'" ) =>
141
+ str ? .replace ( char , `\\${ char } ` ) ;
142
142
143
143
/**
144
144
* Escape all characters not included in SingleStringCharacters and
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ export default defineConfig({
60
60
'null-type-v-3-0' : {
61
61
input : '../specifications/null-type-v3-0.yaml' ,
62
62
output : {
63
+ mock : true ,
63
64
schemas : '../generated/default/null-type-v3-0/model' ,
64
65
target : '../generated/default/null-type-v3-0/endpoints.ts' ,
65
66
} ,
Original file line number Diff line number Diff line change @@ -49,6 +49,19 @@ paths:
49
49
application/json :
50
50
schema :
51
51
$ref : ' #/components/schemas/NullableAnyObject'
52
+ /nullable-string-enum :
53
+ get :
54
+ tags :
55
+ - nullables
56
+ summary : Nullable string enums
57
+ operationId : fetchNullableEnums
58
+ responses :
59
+ 200 :
60
+ description : Successful Operation
61
+ content :
62
+ application/json :
63
+ schema :
64
+ $ref : ' #/components/schemas/NullableStringEnum'
52
65
components :
53
66
schemas :
54
67
ObjectWithNullableItems :
You can’t perform that action at this time.
0 commit comments