Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(serverVariables): refresh state on definition change (#7821)
* fix(serverVariables): refresh state on definition change * test(serverVariables): urls with server variables assertions
- Loading branch information
Showing
5 changed files
with
170 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
urls: | ||
- name: One | ||
url: /documents/features/urls/server-variables-1.yaml | ||
- name: Two | ||
url: /documents/features/urls/server-variables-2.yaml |
38 changes: 38 additions & 0 deletions
38
test/e2e-cypress/static/documents/features/urls/server-variables-1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: Server Variables - One | ||
description: sample OAS 3 definition to test server variables with urls | ||
version: 1.0.0 | ||
servers: | ||
- url: "https://localhost:3200{basePath}" | ||
variables: | ||
basePath: | ||
default: "/oneFirstUrl" | ||
- url: "http://localhost:3201{basePath}" | ||
variables: | ||
basePath: | ||
default: "/oneSecondUrl" | ||
paths: | ||
/a: | ||
post: | ||
summary: simple service A | ||
requestBody: | ||
content: | ||
'application/json': | ||
schema: | ||
properties: | ||
foo: | ||
type: string | ||
bar: | ||
type: string | ||
required: | ||
- foo | ||
type: object | ||
required: true | ||
responses: | ||
200: | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
type: 'string' |
38 changes: 38 additions & 0 deletions
38
test/e2e-cypress/static/documents/features/urls/server-variables-2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: Server Variables - Two | ||
description: sample OAS 3 definition to test server variables with urls | ||
version: 1.0.0 | ||
servers: | ||
- url: "https://localhost:3200{basePath}" | ||
variables: | ||
basePath: | ||
default: "/twoFirstUrl" | ||
- url: "http://localhost:3201{basePath}" | ||
variables: | ||
basePath: | ||
default: "/twoSecondUrl" | ||
paths: | ||
/b: | ||
post: | ||
summary: simple service B | ||
requestBody: | ||
content: | ||
'application/json': | ||
schema: | ||
properties: | ||
foo: | ||
type: string | ||
bar: | ||
type: string | ||
required: | ||
- foo | ||
type: object | ||
required: true | ||
responses: | ||
200: | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
type: 'string' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters