File tree Expand file tree Collapse file tree
modules/openapi-generator/src/main/resources/typescript/model
client/others/typescript/builds/with-unique-items/models
openapi3/client/petstore/typescript/builds Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ let primitives = [
2424
2525const supportedMediaTypes: { [mediaType: string]: number } = {
2626 " application/json" : Infinity,
27+ " application/json-patch+json" : 1,
28+ " application/merge-patch+json" : 1,
29+ " application/strategic-merge-patch+json" : 1,
2730 " application/octet-stream" : 0,
2831 " application/x-www-form-urlencoded" : 0
2932}
@@ -225,7 +228,7 @@ export class ObjectSerializer {
225228 return String(data);
226229 }
227230
228- if (mediaType === "application/json") {
231+ if (mediaType === "application/json" || mediaType === "application/json-patch+json" || mediaType === "application/merge-patch+json" || mediaType === "application/strategic-merge-patch+json" ) {
229232 return JSON.stringify(data);
230233 }
231234
@@ -244,7 +247,7 @@ export class ObjectSerializer {
244247 return rawData;
245248 }
246249
247- if (mediaType === "application/json") {
250+ if (mediaType === "application/json" || mediaType === "application/json-patch+json" || mediaType === "application/merge-patch+json" || mediaType === "application/strategic-merge-patch+json" ) {
248251 return JSON.parse(rawData);
249252 }
250253
Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ let primitives = [
1616
1717const supportedMediaTypes : { [ mediaType : string ] : number } = {
1818 "application/json" : Infinity ,
19+ "application/json-patch+json" : 1 ,
20+ "application/merge-patch+json" : 1 ,
21+ "application/strategic-merge-patch+json" : 1 ,
1922 "application/octet-stream" : 0 ,
2023 "application/x-www-form-urlencoded" : 0
2124}
@@ -197,7 +200,7 @@ export class ObjectSerializer {
197200 return String ( data ) ;
198201 }
199202
200- if ( mediaType === "application/json" ) {
203+ if ( mediaType === "application/json" || mediaType === "application/json-patch+json" || mediaType === "application/merge-patch+json" || mediaType === "application/strategic-merge-patch+json" ) {
201204 return JSON . stringify ( data ) ;
202205 }
203206
@@ -216,7 +219,7 @@ export class ObjectSerializer {
216219 return rawData ;
217220 }
218221
219- if ( mediaType === "application/json" ) {
222+ if ( mediaType === "application/json" || mediaType === "application/json-patch+json" || mediaType === "application/merge-patch+json" || mediaType === "application/strategic-merge-patch+json" ) {
220223 return JSON . parse ( rawData ) ;
221224 }
222225
Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ let primitives = [
2626
2727const supportedMediaTypes : { [ mediaType : string ] : number } = {
2828 "application/json" : Infinity ,
29+ "application/json-patch+json" : 1 ,
30+ "application/merge-patch+json" : 1 ,
31+ "application/strategic-merge-patch+json" : 1 ,
2932 "application/octet-stream" : 0 ,
3033 "application/x-www-form-urlencoded" : 0
3134}
@@ -214,7 +217,7 @@ export class ObjectSerializer {
214217 return String ( data ) ;
215218 }
216219
217- if ( mediaType === "application/json" ) {
220+ if ( mediaType === "application/json" || mediaType === "application/json-patch+json" || mediaType === "application/merge-patch+json" || mediaType === "application/strategic-merge-patch+json" ) {
218221 return JSON . stringify ( data ) ;
219222 }
220223
@@ -233,7 +236,7 @@ export class ObjectSerializer {
233236 return rawData ;
234237 }
235238
236- if ( mediaType === "application/json" ) {
239+ if ( mediaType === "application/json" || mediaType === "application/json-patch+json" || mediaType === "application/merge-patch+json" || mediaType === "application/strategic-merge-patch+json" ) {
237240 return JSON . parse ( rawData ) ;
238241 }
239242
Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ let primitives = [
2828
2929const supportedMediaTypes : { [ mediaType : string ] : number } = {
3030 "application/json" : Infinity ,
31+ "application/json-patch+json" : 1 ,
32+ "application/merge-patch+json" : 1 ,
33+ "application/strategic-merge-patch+json" : 1 ,
3134 "application/octet-stream" : 0 ,
3235 "application/x-www-form-urlencoded" : 0
3336}
@@ -219,7 +222,7 @@ export class ObjectSerializer {
219222 return String ( data ) ;
220223 }
221224
222- if ( mediaType === "application/json" ) {
225+ if ( mediaType === "application/json" || mediaType === "application/json-patch+json" || mediaType === "application/merge-patch+json" || mediaType === "application/strategic-merge-patch+json" ) {
223226 return JSON . stringify ( data ) ;
224227 }
225228
@@ -238,7 +241,7 @@ export class ObjectSerializer {
238241 return rawData ;
239242 }
240243
241- if ( mediaType === "application/json" ) {
244+ if ( mediaType === "application/json" || mediaType === "application/json-patch+json" || mediaType === "application/merge-patch+json" || mediaType === "application/strategic-merge-patch+json" ) {
242245 return JSON . parse ( rawData ) ;
243246 }
244247
Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ let primitives = [
2626
2727const supportedMediaTypes : { [ mediaType : string ] : number } = {
2828 "application/json" : Infinity ,
29+ "application/json-patch+json" : 1 ,
30+ "application/merge-patch+json" : 1 ,
31+ "application/strategic-merge-patch+json" : 1 ,
2932 "application/octet-stream" : 0 ,
3033 "application/x-www-form-urlencoded" : 0
3134}
@@ -214,7 +217,7 @@ export class ObjectSerializer {
214217 return String ( data ) ;
215218 }
216219
217- if ( mediaType === "application/json" ) {
220+ if ( mediaType === "application/json" || mediaType === "application/json-patch+json" || mediaType === "application/merge-patch+json" || mediaType === "application/strategic-merge-patch+json" ) {
218221 return JSON . stringify ( data ) ;
219222 }
220223
@@ -233,7 +236,7 @@ export class ObjectSerializer {
233236 return rawData ;
234237 }
235238
236- if ( mediaType === "application/json" ) {
239+ if ( mediaType === "application/json" || mediaType === "application/json-patch+json" || mediaType === "application/merge-patch+json" || mediaType === "application/strategic-merge-patch+json" ) {
237240 return JSON . parse ( rawData ) ;
238241 }
239242
Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ let primitives = [
2626
2727const supportedMediaTypes : { [ mediaType : string ] : number } = {
2828 "application/json" : Infinity ,
29+ "application/json-patch+json" : 1 ,
30+ "application/merge-patch+json" : 1 ,
31+ "application/strategic-merge-patch+json" : 1 ,
2932 "application/octet-stream" : 0 ,
3033 "application/x-www-form-urlencoded" : 0
3134}
@@ -214,7 +217,7 @@ export class ObjectSerializer {
214217 return String ( data ) ;
215218 }
216219
217- if ( mediaType === "application/json" ) {
220+ if ( mediaType === "application/json" || mediaType === "application/json-patch+json" || mediaType === "application/merge-patch+json" || mediaType === "application/strategic-merge-patch+json" ) {
218221 return JSON . stringify ( data ) ;
219222 }
220223
@@ -233,7 +236,7 @@ export class ObjectSerializer {
233236 return rawData ;
234237 }
235238
236- if ( mediaType === "application/json" ) {
239+ if ( mediaType === "application/json" || mediaType === "application/json-patch+json" || mediaType === "application/merge-patch+json" || mediaType === "application/strategic-merge-patch+json" ) {
237240 return JSON . parse ( rawData ) ;
238241 }
239242
Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ let primitives = [
2626
2727const supportedMediaTypes : { [ mediaType : string ] : number } = {
2828 "application/json" : Infinity ,
29+ "application/json-patch+json" : 1 ,
30+ "application/merge-patch+json" : 1 ,
31+ "application/strategic-merge-patch+json" : 1 ,
2932 "application/octet-stream" : 0 ,
3033 "application/x-www-form-urlencoded" : 0
3134}
@@ -214,7 +217,7 @@ export class ObjectSerializer {
214217 return String ( data ) ;
215218 }
216219
217- if ( mediaType === "application/json" ) {
220+ if ( mediaType === "application/json" || mediaType === "application/json-patch+json" || mediaType === "application/merge-patch+json" || mediaType === "application/strategic-merge-patch+json" ) {
218221 return JSON . stringify ( data ) ;
219222 }
220223
@@ -233,7 +236,7 @@ export class ObjectSerializer {
233236 return rawData ;
234237 }
235238
236- if ( mediaType === "application/json" ) {
239+ if ( mediaType === "application/json" || mediaType === "application/json-patch+json" || mediaType === "application/merge-patch+json" || mediaType === "application/strategic-merge-patch+json" ) {
237240 return JSON . parse ( rawData ) ;
238241 }
239242
Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ let primitives = [
2626
2727const supportedMediaTypes : { [ mediaType : string ] : number } = {
2828 "application/json" : Infinity ,
29+ "application/json-patch+json" : 1 ,
30+ "application/merge-patch+json" : 1 ,
31+ "application/strategic-merge-patch+json" : 1 ,
2932 "application/octet-stream" : 0 ,
3033 "application/x-www-form-urlencoded" : 0
3134}
@@ -214,7 +217,7 @@ export class ObjectSerializer {
214217 return String ( data ) ;
215218 }
216219
217- if ( mediaType === "application/json" ) {
220+ if ( mediaType === "application/json" || mediaType === "application/json-patch+json" || mediaType === "application/merge-patch+json" || mediaType === "application/strategic-merge-patch+json" ) {
218221 return JSON . stringify ( data ) ;
219222 }
220223
@@ -233,7 +236,7 @@ export class ObjectSerializer {
233236 return rawData ;
234237 }
235238
236- if ( mediaType === "application/json" ) {
239+ if ( mediaType === "application/json" || mediaType === "application/json-patch+json" || mediaType === "application/merge-patch+json" || mediaType === "application/strategic-merge-patch+json" ) {
237240 return JSON . parse ( rawData ) ;
238241 }
239242
Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ let primitives = [
2626
2727const supportedMediaTypes : { [ mediaType : string ] : number } = {
2828 "application/json" : Infinity ,
29+ "application/json-patch+json" : 1 ,
30+ "application/merge-patch+json" : 1 ,
31+ "application/strategic-merge-patch+json" : 1 ,
2932 "application/octet-stream" : 0 ,
3033 "application/x-www-form-urlencoded" : 0
3134}
@@ -214,7 +217,7 @@ export class ObjectSerializer {
214217 return String ( data ) ;
215218 }
216219
217- if ( mediaType === "application/json" ) {
220+ if ( mediaType === "application/json" || mediaType === "application/json-patch+json" || mediaType === "application/merge-patch+json" || mediaType === "application/strategic-merge-patch+json" ) {
218221 return JSON . stringify ( data ) ;
219222 }
220223
@@ -233,7 +236,7 @@ export class ObjectSerializer {
233236 return rawData ;
234237 }
235238
236- if ( mediaType === "application/json" ) {
239+ if ( mediaType === "application/json" || mediaType === "application/json-patch+json" || mediaType === "application/merge-patch+json" || mediaType === "application/strategic-merge-patch+json" ) {
237240 return JSON . parse ( rawData ) ;
238241 }
239242
You can’t perform that action at this time.
0 commit comments