Skip to content

Commit 36011ab

Browse files
committed
set up tests/schema directory
Adjust 3.1 tests where possible
1 parent 14e4bf2 commit 36011ab

30 files changed

+41
-237
lines changed

_archive_/schemas/v3.0/schema.test.mjs

Lines changed: 0 additions & 42 deletions
This file was deleted.
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
openapi: 3.1.1
1+
openapi: 3.0.0
22

3-
# this example shows invalid types for the schemaObject
3+
# this example shows invalid types for the Schema Object
44

55
info:
66
title: API
@@ -10,4 +10,6 @@ components:
1010
invalid_null: null
1111
invalid_number: 0
1212
invalid_array: []
13-
13+
anything_boolean: true
14+
nothing_boolean: false
15+
paths: {}

tests/schema/fail/no-paths.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
openapi: "3.0.0"
2+
3+
# this example should fail as there are no paths
4+
5+
info:
6+
title: API
7+
version: 1.0.0

tests/schema/fail/no_containers.yaml

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/schema/fail/servers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
openapi: 3.1.0
1+
openapi: 3.0.0
22

33
# this example should fail, as servers must be an array, not an object
44

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
openapi: 3.1.0
1+
openapi: 3.0.0
22

33
# this example should fail as overlays is not a valid top-level object/keyword
44

55
info:
66
title: API
77
version: 1.0.0
8+
paths: {}
9+
810
overlays: {}
File renamed without changes.
File renamed without changes.

tests/schema/pass/comp_pathitems.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

tests/schema/pass/info_summary.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)