Skip to content

Commit a2dab5d

Browse files
authored
Merge pull request #5202 from karenetheridge/ether/3.1-fix-broken-refs
2 parents b9b1028 + 7f34b3c commit a2dab5d

10 files changed

+37
-8
lines changed

tests/schema/fail/server_enum_empty.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
openapi: 3.1.0
22

3-
# this example should fail as the server variable enum is empty, and so does not contain the default value
3+
# this example should fail as the server variable enum is empty
4+
# (it also does not contain the default value, but this is not checked by the schema)
45

56
info:
67
title: API

tests/schema/pass/callback-object-examples.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ components:
2727
$ref: '#/components/schemas/SomePayload'
2828
responses:
2929
'200':
30-
description: callback successfully processed
30+
description: callback successfully processed
31+
schemas:
32+
SomePayload: {}

tests/schema/pass/example-object-examples.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ info:
33
title: API
44
version: 1.0.0
55
components:
6+
examples:
7+
zip-example: {}
8+
confirmation-success: {}
9+
schemas:
10+
SuccessResponse: {}
11+
Address: {}
612
requestBodies:
713
with-example:
814
content:

tests/schema/pass/header-object-examples.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ components:
1717
type: string
1818
pattern: ^"
1919
Reference:
20-
$ref: '#/components/schemas/ETag'
20+
$ref: '#/components/headers/ETag'
2121
Style:
2222
schema:
2323
type: array

tests/schema/pass/media-type-examples.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ openapi: 3.1.0
33
info:
44
title: API
55
version: 1.0.0
6+
components:
7+
examples:
8+
frog-example: {}
9+
schemas:
10+
Address: {}
11+
Pet: {}
612
paths:
713
/something:
814
put:

tests/schema/pass/path-item-object-example.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ openapi: 3.1.0
22
info:
33
title: API
44
version: 1.0.0
5+
components:
6+
schemas:
7+
Pet: {}
8+
ErrorModel: {}
59
paths:
610
/pets/{id}:
711
get:
@@ -32,4 +36,4 @@ paths:
3236
type: array
3337
items:
3438
type: string
35-
style: simple
39+
style: simple

tests/schema/pass/path_item_servers_parameters.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,6 @@ components:
109109
content:
110110
application/json:
111111
schema:
112-
type: object
112+
type: object
113+
schemas:
114+
SomePayload: {}

tests/schema/pass/paths-object-example.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ openapi: 3.1.0
22
info:
33
title: API
44
version: 1.0.0
5+
components:
6+
schemas:
7+
pet: {}
58
paths:
69
/pets:
710
get:
@@ -14,4 +17,4 @@ paths:
1417
schema:
1518
type: array
1619
items:
17-
$ref: '#/components/schemas/pet'
20+
$ref: '#/components/schemas/pet'

tests/schema/pass/request-body-examples.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ openapi: 3.1.0
22
info:
33
title: API
44
version: 1.0.0
5+
components:
6+
schemas:
7+
User: {}
58
paths:
69
/something:
710
put:
@@ -31,4 +34,4 @@ paths:
3134
examples:
3235
user:
3336
summary: User example in other format
34-
externalValue: https://foo.bar/examples/user-example.whatever
37+
externalValue: https://foo.bar/examples/user-example.whatever

tests/schema/pass/response-object-examples.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,6 @@ components:
3939
schema:
4040
type: integer
4141
no-return-value:
42-
description: object created
42+
description: object created
43+
schemas:
44+
VeryComplexType: {}

0 commit comments

Comments
 (0)