Skip to content

Commit bd82b50

Browse files
committed
Add testcase for #152
1 parent 177438c commit bd82b50

5 files changed

Lines changed: 93 additions & 0 deletions

File tree

test/resolver/issue152/input.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
openapi: 3.0.0
2+
info:
3+
version: 1.0.0
4+
title: API
5+
tags:
6+
- name: test
7+
description: a test tag
8+
paths:
9+
/foo:
10+
post:
11+
operationId: postFoo
12+
summary: Super post op
13+
tags:
14+
- test
15+
responses:
16+
'201':
17+
$ref: 'responses.yaml#/components/responses/Post201'
18+
/bar:
19+
post:
20+
operationId: postBar
21+
summary: Super post op
22+
tags:
23+
- test
24+
responses:
25+
'201':
26+
$ref: 'responses.yaml#/components/responses/Post201'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#preserveMiro: false

test/resolver/issue152/output.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
openapi: 3.0.0
2+
info:
3+
version: 1.0.0
4+
title: API
5+
tags:
6+
- name: test
7+
description: a test tag
8+
paths:
9+
/foo:
10+
post:
11+
operationId: postFoo
12+
summary: Super post op
13+
tags:
14+
- test
15+
responses:
16+
'201':
17+
description: Success post
18+
content:
19+
application/json:
20+
schema:
21+
title: XYZ
22+
description: this is xyz
23+
type: object
24+
properties:
25+
id:
26+
description: the local identifier (not necessarily globally unique)
27+
type: string
28+
/bar:
29+
post:
30+
operationId: postBar
31+
summary: Super post op
32+
tags:
33+
- test
34+
responses:
35+
'201':
36+
$ref: '#/paths/~1foo/post/responses/201'
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
openapi: 3.0.0
2+
info:
3+
version: '1.0'
4+
title: Common Response schemas
5+
description: Response definitions commonly used in API-docs in a separate reference file
6+
paths: {}
7+
components:
8+
responses:
9+
Post201:
10+
description: Success post
11+
content:
12+
application/json:
13+
schema:
14+
$ref: 'schemas.yaml#/components/schemas/xyz'
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
openapi: 3.0.0
2+
info:
3+
version: '1.0'
4+
title: Common Message/JSON schemas
5+
description: Message schemas / JSON datatypes commonly used in API-docs in a separate reference file
6+
paths: {}
7+
components:
8+
schemas:
9+
xyz:
10+
title: XYZ
11+
description: this is xyz
12+
type: object
13+
properties:
14+
id:
15+
description: the local identifier (not necessarily globally unique)
16+
type: string

0 commit comments

Comments
 (0)