Skip to content

Commit 901e0b6

Browse files
committed
tests(custom): pets path get schema items and patch
Signed-off-by: Vojtech Mašek <[email protected]>
1 parent bf76b57 commit 901e0b6

File tree

3 files changed

+9
-27
lines changed

3 files changed

+9
-27
lines changed

tests/custom/api/api-client.interface.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface APIClientInterface {
2727
id: string,
2828
},
2929
requestHttpOptions?: HttpOptions
30-
): Observable<any[]>;
30+
): Observable<models.Pet[]>;
3131

3232
deletePetsId(
3333
args: {
@@ -36,13 +36,6 @@ export interface APIClientInterface {
3636
requestHttpOptions?: HttpOptions
3737
): Observable<any>;
3838

39-
patchPetsId(
40-
args: {
41-
id: string,
42-
},
43-
requestHttpOptions?: HttpOptions
44-
): Observable<any>;
45-
4639
getCustomers(
4740
requestHttpOptions?: HttpOptions
4841
): Observable<models.Customer[] | null>;

tests/custom/api/api-client.service.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ export class APIClient implements APIClientInterface {
8484
id: string,
8585
},
8686
requestHttpOptions?: HttpOptions
87-
): Observable<any[]> {
87+
): Observable<models.Pet[]> {
8888
const path = `/pets/${args.id}`;
8989
const options: APIHttpOptions = {...this.options, ...requestHttpOptions};
9090

91-
return this.sendRequest<any[]>('GET', path, options);
91+
return this.sendRequest<models.Pet[]>('GET', path, options);
9292
}
9393

9494
deletePetsId(
@@ -103,18 +103,6 @@ export class APIClient implements APIClientInterface {
103103
return this.sendRequest<any>('DELETE', path, options);
104104
}
105105

106-
patchPetsId(
107-
args: {
108-
id: string,
109-
},
110-
requestHttpOptions?: HttpOptions
111-
): Observable<any> {
112-
const path = `/pets/${args.id}`;
113-
const options: APIHttpOptions = {...this.options, ...requestHttpOptions};
114-
115-
return this.sendRequest<any>('PATCH', path, options);
116-
}
117-
118106
getCustomers(
119107
requestHttpOptions?: HttpOptions
120108
): Observable<models.Customer[] | null> {

tests/custom/swagger.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,13 @@ paths:
7474
description: OK
7575
schema:
7676
type: array
77-
$ref: "#/definitions/Pet"
77+
items:
78+
$ref: "#/definitions/Pet"
7879
delete:
7980
responses:
8081
200:
8182
description: OK
82-
patch:
83+
# patch:
8384
# requestBody:
8485
# content:
8586
# application/json:
@@ -89,9 +90,9 @@ paths:
8990
# - $ref: '#/definitions/Dog'
9091
# discriminator:
9192
# propertyName: pet_type
92-
responses:
93-
'200':
94-
description: Updated
93+
# responses:
94+
# '200':
95+
# description: Updated
9596
/customers:
9697
get:
9798
responses:

0 commit comments

Comments
 (0)