Skip to content

Commit ebe44a2

Browse files
ralphdoefrantuma
authored andcommitted
samples updates - samples/client/petstore/typescript-angular-v4/npm
1 parent a8b36c1 commit ebe44a2

File tree

6 files changed

+68
-0
lines changed

6 files changed

+68
-0
lines changed

samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ export class PetService {
199199
200200
*/
201201
public addPetWithHttpInfo(body: Pet, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
202+
202203
if (body === null || body === undefined) {
203204
throw new Error('Required parameter body was null or undefined when calling addPet.');
204205
}
@@ -255,10 +256,12 @@ export class PetService {
255256
256257
*/
257258
public deletePetWithHttpInfo(petId: number, apiKey?: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
259+
258260
if (petId === null || petId === undefined) {
259261
throw new Error('Required parameter petId was null or undefined when calling deletePet.');
260262
}
261263

264+
262265
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
263266
if (apiKey !== undefined && apiKey !== null) {
264267
headers.set('api_key', String(apiKey));
@@ -306,6 +309,7 @@ export class PetService {
306309
307310
*/
308311
public findPetsByStatusWithHttpInfo(status: Array<'available' | 'pending' | 'sold'>, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
312+
309313
if (status === null || status === undefined) {
310314
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
311315
}
@@ -360,6 +364,7 @@ export class PetService {
360364
361365
*/
362366
public findPetsByTagsWithHttpInfo(tags: Array<string>, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
367+
363368
if (tags === null || tags === undefined) {
364369
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
365370
}
@@ -414,6 +419,7 @@ export class PetService {
414419
415420
*/
416421
public getPetByIdWithHttpInfo(petId: number, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
422+
417423
if (petId === null || petId === undefined) {
418424
throw new Error('Required parameter petId was null or undefined when calling getPetById.');
419425
}
@@ -459,6 +465,7 @@ export class PetService {
459465
460466
*/
461467
public updatePetWithHttpInfo(body: Pet, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
468+
462469
if (body === null || body === undefined) {
463470
throw new Error('Required parameter body was null or undefined when calling updatePet.');
464471
}
@@ -516,10 +523,13 @@ export class PetService {
516523
517524
*/
518525
public updatePetWithFormWithHttpInfo(petId: number, name?: string, status?: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
526+
519527
if (petId === null || petId === undefined) {
520528
throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.');
521529
}
522530

531+
532+
523533
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
524534

525535
// authentication (petstore_auth) required
@@ -590,10 +600,13 @@ export class PetService {
590600
591601
*/
592602
public uploadFileWithHttpInfo(petId: number, additionalMetadata?: string, file?: Blob, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
603+
593604
if (petId === null || petId === undefined) {
594605
throw new Error('Required parameter petId was null or undefined when calling uploadFile.');
595606
}
596607

608+
609+
597610
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
598611

599612
// authentication (petstore_auth) required

samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ export class StoreService {
128128
129129
*/
130130
public deleteOrderWithHttpInfo(orderId: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
131+
131132
if (orderId === null || orderId === undefined) {
132133
throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.');
133134
}
@@ -208,6 +209,7 @@ export class StoreService {
208209
209210
*/
210211
public getOrderByIdWithHttpInfo(orderId: number, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
212+
211213
if (orderId === null || orderId === undefined) {
212214
throw new Error('Required parameter orderId was null or undefined when calling getOrderById.');
213215
}
@@ -248,6 +250,7 @@ export class StoreService {
248250
249251
*/
250252
public placeOrderWithHttpInfo(body: Order, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
253+
251254
if (body === null || body === undefined) {
252255
throw new Error('Required parameter body was null or undefined when calling placeOrder.');
253256
}

samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ export class UserService {
194194
195195
*/
196196
public createUserWithHttpInfo(body: User, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
197+
197198
if (body === null || body === undefined) {
198199
throw new Error('Required parameter body was null or undefined when calling createUser.');
199200
}
@@ -239,6 +240,7 @@ export class UserService {
239240
240241
*/
241242
public createUsersWithArrayInputWithHttpInfo(body: Array<User>, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
243+
242244
if (body === null || body === undefined) {
243245
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
244246
}
@@ -284,6 +286,7 @@ export class UserService {
284286
285287
*/
286288
public createUsersWithListInputWithHttpInfo(body: Array<User>, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
289+
287290
if (body === null || body === undefined) {
288291
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
289292
}
@@ -329,6 +332,7 @@ export class UserService {
329332
330333
*/
331334
public deleteUserWithHttpInfo(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
335+
332336
if (username === null || username === undefined) {
333337
throw new Error('Required parameter username was null or undefined when calling deleteUser.');
334338
}
@@ -369,6 +373,7 @@ export class UserService {
369373
370374
*/
371375
public getUserByNameWithHttpInfo(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
376+
372377
if (username === null || username === undefined) {
373378
throw new Error('Required parameter username was null or undefined when calling getUserByName.');
374379
}
@@ -410,9 +415,11 @@ export class UserService {
410415
411416
*/
412417
public loginUserWithHttpInfo(username: string, password: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
418+
413419
if (username === null || username === undefined) {
414420
throw new Error('Required parameter username was null or undefined when calling loginUser.');
415421
}
422+
416423
if (password === null || password === undefined) {
417424
throw new Error('Required parameter password was null or undefined when calling loginUser.');
418425
}
@@ -499,9 +506,11 @@ export class UserService {
499506
500507
*/
501508
public updateUserWithHttpInfo(username: string, body: User, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
509+
502510
if (username === null || username === undefined) {
503511
throw new Error('Required parameter username was null or undefined when calling updateUser.');
504512
}
513+
505514
if (body === null || body === undefined) {
506515
throw new Error('Required parameter body was null or undefined when calling updateUser.');
507516
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* Swagger Petstore
3+
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
4+
*
5+
* OpenAPI spec version: 1.0.0
6+
* Contact: [email protected]
7+
*
8+
* NOTE: This class is auto generated by the swagger code generator program.
9+
* https://github.com/swagger-api/swagger-codegen.git
10+
* Do not edit the class manually.
11+
*/
12+
import { Currency } from './currency';
13+
14+
15+
/**
16+
* some description
17+
*/
18+
export interface Amount {
19+
/**
20+
* some description
21+
*/
22+
value: number;
23+
currency: Currency;
24+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Swagger Petstore
3+
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
4+
*
5+
* OpenAPI spec version: 1.0.0
6+
* Contact: [email protected]
7+
*
8+
* NOTE: This class is auto generated by the swagger code generator program.
9+
* https://github.com/swagger-api/swagger-codegen.git
10+
* Do not edit the class manually.
11+
*/
12+
13+
14+
/**
15+
* some description
16+
*/
17+
export type Currency = string;

samples/client/petstore/typescript-angular-v4/npm/model/models.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
export * from './amount';
12
export * from './apiResponse';
23
export * from './category';
4+
export * from './currency';
35
export * from './order';
46
export * from './pet';
57
export * from './tag';

0 commit comments

Comments
 (0)