Skip to content

Commit afccc76

Browse files
committed
added typescript samples with current version
1 parent 78701a8 commit afccc76

File tree

20 files changed

+80
-51
lines changed

20 files changed

+80
-51
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.16
1+
3.0.17-SNAPSHOT

samples/composed/client/petstore/typescript-angular-v2/default/api/pet.service.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,10 @@ export class PetService {
119119
* @param petType type of food
120120
* @param status status
121121
* @param petId ID of pet to return
122+
* @param sessionId session id
122123
*/
123-
public feedPet(body: Pet, token: string, petType: string, status: string, petId: number, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> {
124-
return this.feedPetWithHttpInfo(body, token, petType, status, petId, extraHttpRequestParams)
124+
public feedPet(body: Pet, token: string, petType: string, status: string, petId: number, sessionId: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> {
125+
return this.feedPetWithHttpInfo(body, token, petType, status, petId, sessionId, extraHttpRequestParams)
125126
.map((response: Response) => {
126127
if (response.status === 204) {
127128
return undefined;
@@ -419,9 +420,10 @@ export class PetService {
419420
* @param petType type of food
420421
* @param status status
421422
* @param petId ID of pet to return
423+
* @param sessionId session id
422424
423425
*/
424-
public feedPetWithHttpInfo(body: Pet, token: string, petType: string, status: string, petId: number, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
426+
public feedPetWithHttpInfo(body: Pet, token: string, petType: string, status: string, petId: number, sessionId: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
425427

426428
if (body === null || body === undefined) {
427429
throw new Error('Required parameter body was null or undefined when calling feedPet.');
@@ -443,6 +445,10 @@ export class PetService {
443445
throw new Error('Required parameter petId was null or undefined when calling feedPet.');
444446
}
445447

448+
if (sessionId === null || sessionId === undefined) {
449+
throw new Error('Required parameter sessionId was null or undefined when calling feedPet.');
450+
}
451+
446452
let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper());
447453
if (petType !== undefined && petType !== null) {
448454
queryParameters.set('petType', <any>petType);

samples/composed/client/petstore/typescript-angular-v2/default/model/models.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ export * from './dog';
99
export * from './inlineResponse200';
1010
export * from './inlineResponse2001';
1111
export * from './macaw';
12-
export * from './oneOfAllPetsResponseItems';
13-
export * from './oneOfPartMasterOrigin';
1412
export * from './order';
1513
export * from './parakeet';
1614
export * from './partFour';

samples/composed/client/petstore/typescript-angular-v2/default/model/partMaster.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
* https://github.com/swagger-api/swagger-codegen.git
1010
* Do not edit the class manually.
1111
*/
12-
import { OneOfPartMasterDestination } from './oneOfPartMasterDestination';
13-
import { OneOfPartMasterOrigin } from './oneOfPartMasterOrigin';
12+
import { PartFour } from './partFour';
13+
import { PartOne } from './partOne';
14+
import { PartThree } from './partThree';
15+
import { PartTwo } from './partTwo';
1416

1517
export interface PartMaster {
16-
destination?: OneOfPartMasterDestination;
17-
origin?: OneOfPartMasterOrigin;
18+
destination?: PartOne | PartTwo;
19+
origin?: PartThree | PartFour;
1820
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.16
1+
3.0.17-SNAPSHOT

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,10 @@ export class PetService {
119119
* @param petType type of food
120120
* @param status status
121121
* @param petId ID of pet to return
122+
* @param sessionId session id
122123
*/
123-
public feedPet(body: Pet, token: string, petType: string, status: string, petId: number, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> {
124-
return this.feedPetWithHttpInfo(body, token, petType, status, petId, extraHttpRequestParams)
124+
public feedPet(body: Pet, token: string, petType: string, status: string, petId: number, sessionId: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> {
125+
return this.feedPetWithHttpInfo(body, token, petType, status, petId, sessionId, extraHttpRequestParams)
125126
.map((response: Response) => {
126127
if (response.status === 204) {
127128
return undefined;
@@ -419,9 +420,10 @@ export class PetService {
419420
* @param petType type of food
420421
* @param status status
421422
* @param petId ID of pet to return
423+
* @param sessionId session id
422424
423425
*/
424-
public feedPetWithHttpInfo(body: Pet, token: string, petType: string, status: string, petId: number, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
426+
public feedPetWithHttpInfo(body: Pet, token: string, petType: string, status: string, petId: number, sessionId: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
425427

426428
if (body === null || body === undefined) {
427429
throw new Error('Required parameter body was null or undefined when calling feedPet.');
@@ -443,6 +445,10 @@ export class PetService {
443445
throw new Error('Required parameter petId was null or undefined when calling feedPet.');
444446
}
445447

448+
if (sessionId === null || sessionId === undefined) {
449+
throw new Error('Required parameter sessionId was null or undefined when calling feedPet.');
450+
}
451+
446452
let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper());
447453
if (petType !== undefined && petType !== null) {
448454
queryParameters.set('petType', <any>petType);

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ export * from './dog';
99
export * from './inlineResponse200';
1010
export * from './inlineResponse2001';
1111
export * from './macaw';
12-
export * from './oneOfAllPetsResponseItems';
13-
export * from './oneOfPartMasterOrigin';
1412
export * from './order';
1513
export * from './parakeet';
1614
export * from './partFour';

samples/composed/client/petstore/typescript-angular-v2/npm/model/partMaster.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
* https://github.com/swagger-api/swagger-codegen.git
1010
* Do not edit the class manually.
1111
*/
12-
import { OneOfPartMasterDestination } from './oneOfPartMasterDestination';
13-
import { OneOfPartMasterOrigin } from './oneOfPartMasterOrigin';
12+
import { PartFour } from './partFour';
13+
import { PartOne } from './partOne';
14+
import { PartThree } from './partThree';
15+
import { PartTwo } from './partTwo';
1416

1517
export interface PartMaster {
16-
destination?: OneOfPartMasterDestination;
17-
origin?: OneOfPartMasterOrigin;
18+
destination?: PartOne | PartTwo;
19+
origin?: PartThree | PartFour;
1820
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.16
1+
3.0.17-SNAPSHOT

samples/composed/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,10 @@ export class PetService implements PetServiceInterface {
120120
* @param petType type of food
121121
* @param status status
122122
* @param petId ID of pet to return
123+
* @param sessionId session id
123124
*/
124-
public feedPet(body: Pet, token: string, petType: string, status: string, petId: number, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> {
125-
return this.feedPetWithHttpInfo(body, token, petType, status, petId, extraHttpRequestParams)
125+
public feedPet(body: Pet, token: string, petType: string, status: string, petId: number, sessionId: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> {
126+
return this.feedPetWithHttpInfo(body, token, petType, status, petId, sessionId, extraHttpRequestParams)
126127
.map((response: Response) => {
127128
if (response.status === 204) {
128129
return undefined;
@@ -420,9 +421,10 @@ export class PetService implements PetServiceInterface {
420421
* @param petType type of food
421422
* @param status status
422423
* @param petId ID of pet to return
424+
* @param sessionId session id
423425
424426
*/
425-
public feedPetWithHttpInfo(body: Pet, token: string, petType: string, status: string, petId: number, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
427+
public feedPetWithHttpInfo(body: Pet, token: string, petType: string, status: string, petId: number, sessionId: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
426428

427429
if (body === null || body === undefined) {
428430
throw new Error('Required parameter body was null or undefined when calling feedPet.');
@@ -444,6 +446,10 @@ export class PetService implements PetServiceInterface {
444446
throw new Error('Required parameter petId was null or undefined when calling feedPet.');
445447
}
446448

449+
if (sessionId === null || sessionId === undefined) {
450+
throw new Error('Required parameter sessionId was null or undefined when calling feedPet.');
451+
}
452+
447453
let queryParameters = new URLSearchParams('', new CustomQueryEncoderHelper());
448454
if (petType !== undefined && petType !== null) {
449455
queryParameters.set('petType', <any>petType);

0 commit comments

Comments
 (0)