Skip to content

Commit 8ee614b

Browse files
ralphdoefrantuma
authored andcommitted
samples updates - samples/client/petstore/typescript-node/npm
1 parent b4760aa commit 8ee614b

File tree

1 file changed

+52
-6
lines changed
  • samples/client/petstore/typescript-node/npm

1 file changed

+52
-6
lines changed

samples/client/petstore/typescript-node/npm/api.ts

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,35 @@ class ObjectSerializer {
136136
}
137137
}
138138

139+
/**
140+
* some description
141+
*/
142+
export class Amount {
143+
/**
144+
* some description
145+
*/
146+
'value': number;
147+
'currency': Currency;
148+
149+
static discriminator: string | undefined = undefined;
150+
151+
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
152+
{
153+
"name": "value",
154+
"baseName": "value",
155+
"type": "number"
156+
},
157+
{
158+
"name": "currency",
159+
"baseName": "currency",
160+
"type": "Currency"
161+
} ];
162+
163+
static getAttributeTypeMap() {
164+
return Amount.attributeTypeMap;
165+
}
166+
}
167+
139168
/**
140169
* Describes the result of uploading an image resource
141170
*/
@@ -144,7 +173,7 @@ export class ApiResponse {
144173
'type'?: string;
145174
'message'?: string;
146175

147-
static discriminator = undefined;
176+
static discriminator: string | undefined = undefined;
148177

149178
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
150179
{
@@ -175,7 +204,7 @@ export class Category {
175204
'id'?: number;
176205
'name'?: string;
177206

178-
static discriminator = undefined;
207+
static discriminator: string | undefined = undefined;
179208

180209
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
181210
{
@@ -194,6 +223,21 @@ export class Category {
194223
}
195224
}
196225

226+
/**
227+
* some description
228+
*/
229+
export class Currency {
230+
231+
static discriminator: string | undefined = undefined;
232+
233+
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
234+
];
235+
236+
static getAttributeTypeMap() {
237+
return Currency.attributeTypeMap;
238+
}
239+
}
240+
197241
/**
198242
* An order for a pets from the pet store
199243
*/
@@ -208,7 +252,7 @@ export class Order {
208252
'status'?: Order.StatusEnum;
209253
'complete'?: boolean;
210254

211-
static discriminator = undefined;
255+
static discriminator: string | undefined = undefined;
212256

213257
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
214258
{
@@ -268,7 +312,7 @@ export class Pet {
268312
*/
269313
'status'?: Pet.StatusEnum;
270314

271-
static discriminator = undefined;
315+
static discriminator: string | undefined = undefined;
272316

273317
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
274318
{
@@ -321,7 +365,7 @@ export class Tag {
321365
'id'?: number;
322366
'name'?: string;
323367

324-
static discriminator = undefined;
368+
static discriminator: string | undefined = undefined;
325369

326370
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
327371
{
@@ -356,7 +400,7 @@ export class User {
356400
*/
357401
'userStatus'?: number;
358402

359-
static discriminator = undefined;
403+
static discriminator: string | undefined = undefined;
360404

361405
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
362406
{
@@ -412,8 +456,10 @@ let enumsMap: {[index: string]: any} = {
412456
}
413457

414458
let typeMap: {[index: string]: any} = {
459+
"Amount": Amount,
415460
"ApiResponse": ApiResponse,
416461
"Category": Category,
462+
"Currency": Currency,
417463
"Order": Order,
418464
"Pet": Pet,
419465
"Tag": Tag,

0 commit comments

Comments
 (0)