Skip to content

Commit 1ce46a0

Browse files
committed
3.1 Schema: Remove submodule
1 parent b5bf761 commit 1ce46a0

18 files changed

+193
-14
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "tests/v3.1/openapi3-examples"]
2-
path = tests/openapi3-examples
3-
url = [email protected]:Mermade/openapi3-examples.git

scripts/validate.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ const args = process.argv.reduce((acc, arg) => {
2424

2525
(async function () {
2626
try {
27+
const schemaType = args.schema || "schema";
28+
const schemaVersion = args.version || "2021-03-02";
29+
const outputFormat = args.format || JsonSchema.BASIC;
30+
2731
// Config
2832
JsonSchema.setMetaOutputFormat(outputFormat);
2933
//JsonSchema.setShouldMetaValidate(false);
3034

31-
const schemaType = args.schema || "schema";
32-
const schemaVersion = args.version || "2021-03-02";
33-
const ouputFormat = args.format || JsonSchema.BASIC;
34-
3535
// Load schemas
3636
JsonSchema.add(dialect);
3737
JsonSchema.add(vocabulary);

tests/openapi3-examples

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/v3.1/fail/no_containers.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
iopenapi: 3.1.0
2+
info:
3+
title: API
4+
version: 1.0.0

tests/v3.1/fail/sever_enum_empty.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
openapi: 3.1.0
2+
info:
3+
title: API
4+
version: 1.0.0
5+
servers:
6+
- url: https://example.com/{var}
7+
variables:
8+
var:
9+
enum: []
10+
default: a
11+
components: {}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
openapi: 3.1.0
2+
info:
3+
title: API
4+
version: 1.0.0
5+
servers:
6+
- url: https://example.com/{var}
7+
variables:
8+
var:
9+
enum:
10+
- a
11+
default: b
12+
components: {}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
openapi: 3.1.0
2+
info:
3+
title: API
4+
version: 1.0.0
5+
overlays: {}

tests/v3.1/pass/comp_pathitems.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
openapi: 3.1.0
2+
info:
3+
title: API
4+
version: 1.0.0
5+
components:
6+
pathItems: {}

tests/v3.1/pass/info_summary.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
openapi: 3.1.0
2+
info:
3+
title: API
4+
summary: My lovely API
5+
version: 1.0.0
6+
components: {}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
openapi: 3.1.0
2+
info:
3+
title: API
4+
summary: My lovely API
5+
version: 1.0.0
6+
license:
7+
name: Apache
8+
identifier: Apache-2.0
9+
components: {}

0 commit comments

Comments
 (0)