Skip to content

Commit

Permalink
test: add test for server variable description
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenyong committed May 13, 2024
1 parent 9ad9bff commit c473bb9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
openapi: 3.1.0
info:
version: "1.0"
title: Invalid API
servers:
- url: https://{subdomain}.io
variables:
subdomain:
default: petstore
description: lorem ipsum
paths:
/anything:
get:
responses:
'200':
description: OK
4 changes: 4 additions & 0 deletions test/specs/validate-spec/validate-spec.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,10 @@ describe('Invalid APIs (specification validation)', () => {
it('OpenAPI 3.1', () => assertValid('3.1/component-schema-with-hyphens.yaml'));
});

describe('should allow description property in server variables', () => {
it('OpenAPI 3.1', () => assertValid('3.1/server-variable-description.yaml'));
});

describe('should catch a component schema name that contains a space', () => {
it('OpenAPI 3.0', () => {
return assertInvalid(
Expand Down

0 comments on commit c473bb9

Please sign in to comment.