-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: 🧪 release (feat: wip, introduce "respect") (#1915)
- Loading branch information
1 parent
84a6252
commit 1dfa12d
Showing
312 changed files
with
121,939 additions
and
242 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
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 |
---|---|---|
|
@@ -13,3 +13,4 @@ output/ | |
*.tgz | ||
redoc-static.html | ||
packages/cli/README.md | ||
.env |
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
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
33 changes: 33 additions & 0 deletions
33
...ts__/respect/case-insensitive-headers/__snapshots__/case-insensitive-headers.test.ts.snap
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,33 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`should send in request and proceed case-insensitive headers in runtime expressions 1`] = ` | ||
"────────────────────────────────────────────────────────────────────────────────[0m | ||
[0m | ||
Running workflow case-insensitive-headers.yaml / get-museum-hours[0m | ||
[0m | ||
✓ GET /museum-hours - step get-museum-hours[0m | ||
✓ success criteria check | ||
✓ success criteria check | ||
✓ success criteria check | ||
✓ status code check (Response code 200 matches one of description codes: [200, 400, 404]) | ||
✓ content-type check | ||
✓ schema check | ||
[0m | ||
[0m | ||
Summary for case-insensitive-headers.yaml | ||
Workflows: 1 passed, 1 total | ||
Steps: 1 passed, 1 total | ||
Checks: 6 passed, 6 total | ||
Time: <test>ms[0m | ||
[0m | ||
[0m | ||
┌───────────────────────────────────────────────────────────────────────┬────────────┬─────────┬─────────┬──────────┬─────────┐ | ||
│ Filename │ Workflows │ Passed │ Failed │ Warnings │ Skipped │ | ||
├───────────────────────────────────────────────────────────────────────┼────────────┼─────────┼─────────┼──────────┼─────────┤ | ||
│ ✓ case-insensitive-headers.yaml │ 1 │ 1 │ - │ - │ - │ | ||
└───────────────────────────────────────────────────────────────────────┴────────────┴─────────┴─────────┴──────────┴─────────┘[0m | ||
[0m | ||
" | ||
`; |
11 changes: 11 additions & 0 deletions
11
__tests__/respect/case-insensitive-headers/case-insensitive-headers.test.ts
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,11 @@ | ||
import { join } from 'path'; | ||
import { getCommandOutput, getParams } from '../utils'; | ||
|
||
test('should send in request and proceed case-insensitive headers in runtime expressions', () => { | ||
const indexEntryPoint = join(process.cwd(), 'packages/cli/lib/index.js'); | ||
const fixturesPath = join(__dirname, 'case-insensitive-headers.yaml'); | ||
const args = getParams(indexEntryPoint, ['respect', fixturesPath]); | ||
|
||
const result = getCommandOutput(args); | ||
expect(result).toMatchSnapshot(); | ||
}); |
42 changes: 42 additions & 0 deletions
42
__tests__/respect/case-insensitive-headers/case-insensitive-headers.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,42 @@ | ||
arazzo: 1.0.1 | ||
info: | ||
title: Redocly Museum API | ||
description: >- | ||
Testing case insensitive headers in workflows | ||
version: 1.0.0 | ||
|
||
sourceDescriptions: | ||
- name: museum-api | ||
type: openapi | ||
url: museum-api.yaml | ||
|
||
workflows: | ||
- workflowId: get-museum-hours | ||
description: >- | ||
This workflow demonstrates how to get the museum opening hours and buy tickets. | ||
parameters: | ||
- in: header | ||
name: Authorization | ||
value: Basic Og== | ||
steps: | ||
- stepId: get-museum-hours | ||
description: >- | ||
Get museum hours by resolving request details with getMuseumHours operationId from museum-api.yaml description. | ||
parameters: | ||
- in: header | ||
name: CammelCasedHeader | ||
value: custom-header | ||
- in: header | ||
name: CoNtenT-Type | ||
value: first | ||
- in: header | ||
name: ContenT-Type | ||
value: second | ||
- in: header | ||
name: ContenT-TypE | ||
value: third | ||
operationId: museum-api.getMuseumHours | ||
successCriteria: | ||
- condition: $request.header.content-type == 'third' | ||
- condition: $request.header.CammelCasedHeader == 'custom-header' && $response.header.X-Frame-Options == 'deny' | ||
- condition: $response.header.X-Content-Type-Options == 'nosniff' |
Oops, something went wrong.