-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Render templates using
env
before dereferencing
Allows using `${{ env.anything }}` in `$ref`s. See stepci/stepci#220 for a use case explanation.
- Loading branch information
1 parent
df1e528
commit 8e46f3d
Showing
4 changed files
with
100 additions
and
3 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,26 @@ | ||
version: '1.1' | ||
name: Process templates using env in `$ref`s (https://github.com/stepci/stepci/issues/220) | ||
env: | ||
host: ${{ env.petstore }}/api/v3 | ||
tests: | ||
example: | ||
steps: | ||
- http: | ||
method: POST | ||
url: ${{ env.host }}/user | ||
headers: | ||
Content-Type: application/json | ||
json: | ||
{ | ||
'id': 10, | ||
'username': 'theUser', | ||
'firstName': 'John', | ||
'lastName': 'James', | ||
'email': '[email protected]', | ||
'password': '12345', | ||
'phone': '12345', | ||
'userStatus': 1, | ||
} | ||
check: | ||
schema: | ||
$ref: ${{ env.host }}/openapi.yaml#/components/schemas/User |
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,26 @@ | ||
version: '1.1' | ||
name: Process templates using env in `$ref`s (https://github.com/stepci/stepci/issues/220) | ||
env: | ||
host: https://petstore3.swagger.io/api/v3 | ||
tests: | ||
example: | ||
steps: | ||
- http: | ||
method: POST | ||
url: ${{ env.host }}/user | ||
headers: | ||
Content-Type: application/json | ||
json: | ||
{ | ||
'id': 10, | ||
'username': 'theUser', | ||
'firstName': 'John', | ||
'lastName': 'James', | ||
'email': '[email protected]', | ||
'password': '12345', | ||
'phone': '12345', | ||
'userStatus': 1, | ||
} | ||
check: | ||
schema: | ||
$ref: ${{ env.host }}/openapi.yaml#/components/schemas/User |
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