diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index fa987c12d6..e1e859dbe3 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -15,7 +15,10 @@ "default": "https://spec.openapis.org/oas/3.1/dialect/base" }, "servers": { - "$ref": "#/$defs/server" + "type": "array", + "items": { + "$ref": "#/$defs/server" + } }, "paths": { "$ref": "#/$defs/paths" @@ -1337,4 +1340,4 @@ } } } -} +} \ No newline at end of file diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index 9b71e11031..60377ae424 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -12,7 +12,9 @@ properties: $ref: '#/$defs/uri' default: 'https://spec.openapis.org/oas/3.1/dialect/base' servers: - $ref: '#/$defs/server' + type: array + items: + $ref: '#/$defs/server' paths: $ref: '#/$defs/paths' webhooks: diff --git a/tests/v3.1/fail/servers.yaml b/tests/v3.1/fail/servers.yaml new file mode 100644 index 0000000000..7aaa05c0af --- /dev/null +++ b/tests/v3.1/fail/servers.yaml @@ -0,0 +1,8 @@ +openapi: 3.1.0 +info: + title: API + version: 1.0.0 +paths: {} +servers: + url: /v1 + description: Run locally. diff --git a/tests/v3.1/pass/servers.yaml b/tests/v3.1/pass/servers.yaml new file mode 100644 index 0000000000..77a20498da --- /dev/null +++ b/tests/v3.1/pass/servers.yaml @@ -0,0 +1,10 @@ +openapi: 3.1.0 +info: + title: API + version: 1.0.0 +paths: {} +servers: + - url: /v1 + description: Run locally. + - url: https://production.com/v1 + description: Run on production server.