Skip to content

Commit 8883175

Browse files
committed
feat: tests for references to properties
1 parent c4e9f58 commit 8883175

7 files changed

+254
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* This file was auto-generated by openapi-typescript.
3+
* Do not make direct changes to the file.
4+
*/
5+
6+
export interface paths {
7+
readonly "/pet": {
8+
readonly post: operations["addPet"];
9+
};
10+
}
11+
12+
export interface definitions {
13+
readonly Pet: {
14+
readonly id?: number;
15+
readonly name: string;
16+
};
17+
}
18+
19+
export interface operations {
20+
readonly addPet: {
21+
readonly parameters: {
22+
readonly body: {
23+
readonly body: {
24+
readonly name?: definitions["Pet"]["name"];
25+
};
26+
};
27+
};
28+
readonly responses: {
29+
readonly 200: unknown;
30+
};
31+
};
32+
}
33+
34+
export interface external {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* This file was auto-generated by openapi-typescript.
3+
* Do not make direct changes to the file.
4+
*/
5+
6+
export interface paths {
7+
"/pet": {
8+
post: operations["addPet"];
9+
};
10+
}
11+
12+
export interface definitions {
13+
Pet: {
14+
id?: number;
15+
name: string;
16+
};
17+
}
18+
19+
export interface operations {
20+
addPet: {
21+
parameters: {
22+
body: {
23+
body: {
24+
name?: definitions["Pet"]["name"];
25+
};
26+
};
27+
};
28+
responses: {
29+
200: unknown;
30+
};
31+
};
32+
}
33+
34+
export interface external {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
swagger: "2.0"
2+
info:
3+
description: ""
4+
version: "1.0.0"
5+
title: "Swagger Petstore"
6+
termsOfService: "http://swagger.io/terms/"
7+
contact:
8+
9+
license:
10+
name: "Apache 2.0"
11+
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
12+
paths:
13+
/pet:
14+
post:
15+
operationId: "addPet"
16+
consumes:
17+
- "application/json"
18+
produces:
19+
- "application/json"
20+
parameters:
21+
- in: "body"
22+
name: "body"
23+
description: ""
24+
required: true
25+
schema:
26+
properties:
27+
name:
28+
$ref: "#/definitions/Pet/properties/name"
29+
responses:
30+
200:
31+
description: ""
32+
definitions:
33+
Pet:
34+
type: "object"
35+
required:
36+
- "name"
37+
properties:
38+
id:
39+
type: "integer"
40+
format: "int64"
41+
name:
42+
type: "string"
43+
example: "doggie"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/**
2+
* This file was auto-generated by openapi-typescript.
3+
* Do not make direct changes to the file.
4+
*/
5+
6+
export interface paths {
7+
"/pet": {
8+
put: operations["updatePet"];
9+
};
10+
}
11+
12+
export interface components {
13+
schemas: {
14+
Pet: {
15+
name: string;
16+
} & { [key: string]: any };
17+
};
18+
}
19+
20+
export interface operations {
21+
updatePet: {
22+
responses: {
23+
200: unknown;
24+
};
25+
requestBody: {
26+
content: {
27+
"application/json": {
28+
name?: components["schemas"]["Pet"]["name"];
29+
} & { [key: string]: any };
30+
};
31+
};
32+
};
33+
}
34+
35+
export interface external {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/**
2+
* This file was auto-generated by openapi-typescript.
3+
* Do not make direct changes to the file.
4+
*/
5+
6+
export interface paths {
7+
readonly "/pet": {
8+
readonly put: operations["updatePet"];
9+
};
10+
}
11+
12+
export interface components {
13+
readonly schemas: {
14+
readonly Pet: {
15+
readonly name: string;
16+
};
17+
};
18+
}
19+
20+
export interface operations {
21+
readonly updatePet: {
22+
readonly responses: {
23+
readonly 200: unknown;
24+
};
25+
readonly requestBody: {
26+
readonly content: {
27+
readonly "application/json": {
28+
readonly name?: components["schemas"]["Pet"]["name"];
29+
};
30+
};
31+
};
32+
};
33+
}
34+
35+
export interface external {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/**
2+
* This file was auto-generated by openapi-typescript.
3+
* Do not make direct changes to the file.
4+
*/
5+
6+
export interface paths {
7+
"/pet": {
8+
put: operations["updatePet"];
9+
};
10+
}
11+
12+
export interface components {
13+
schemas: {
14+
Pet: {
15+
name: string;
16+
};
17+
};
18+
}
19+
20+
export interface operations {
21+
updatePet: {
22+
responses: {
23+
200: unknown;
24+
};
25+
requestBody: {
26+
content: {
27+
"application/json": {
28+
name?: components["schemas"]["Pet"]["name"];
29+
};
30+
};
31+
};
32+
};
33+
}
34+
35+
export interface external {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
openapi: 3.0.1
2+
info:
3+
title: Spec with reference to proeprties
4+
description: ''
5+
termsOfService: http://swagger.io/terms/
6+
contact:
7+
8+
license:
9+
name: Apache 2.0
10+
url: http://www.apache.org/licenses/LICENSE-2.0.html
11+
version: 1.0.0
12+
paths:
13+
/pet:
14+
put:
15+
summary: ''
16+
operationId: updatePet
17+
requestBody:
18+
description: ''
19+
content:
20+
application/json:
21+
schema:
22+
properties:
23+
name:
24+
$ref: '#/components/schemas/Pet/properties/name'
25+
required: true
26+
responses:
27+
200:
28+
description: ''
29+
content: {}
30+
components:
31+
schemas:
32+
Pet:
33+
required:
34+
- name
35+
type: object
36+
properties:
37+
name:
38+
type: string

0 commit comments

Comments
 (0)