-
Notifications
You must be signed in to change notification settings - Fork 208
feat: added no-secrets-masking respect option to allow raw output
#2346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7042325
feat: added `no-mask-secrets` respect option to allow raw output
DmitryAnansky 5188645
chore: docs update
DmitryAnansky 510e4fe
feat: rename to secretsReveal and implement logic
DmitryAnansky 90f7bf6
chore: add changelog and e2e test
DmitryAnansky 2aba9aa
chore: docs update
DmitryAnansky af4602a
feat: rename option
DmitryAnansky 6ca305c
Update docs/@v2/commands/respect.md
DmitryAnansky 9efeca5
chore: prettier fix
DmitryAnansky 210614d
feat: apply boolean-negation setting to all commands
DmitryAnansky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,6 @@ | ||
| --- | ||
| "@redocly/respect-core": minor | ||
| "@redocly/cli": minor | ||
| --- | ||
|
|
||
| Added the `secrets-reveal` option to the respect command, allowing raw (unmasked) output to be generated. | ||
284 changes: 284 additions & 0 deletions
284
...espect/reveal-masked-input-secrets/__snapshots__/reveal-masked-input-secrets.test.ts.snap
This file contains hidden or 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,284 @@ | ||
| // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
|
||
| exports[`should reveal masked input values 1`] = ` | ||
| "──────────────────────────────────────────────────────────────────────────────── | ||
|
|
||
| Running workflow reveal-masked-input-secrets.arazzo.yaml / get-museum-hours | ||
|
|
||
| ✓ GET /museum-hours - step get-museum-hours | ||
|
|
||
| Request URL: https://redocly.com/_mock/demo/openapi/museum-api/museum-hours | ||
| Request Headers: | ||
| accept: application/json, application/problem+json | ||
| authorization: Basic Og== | ||
| password: password | ||
| username: John | ||
| masked-combined-value: John and password and maybe Basic Og== | ||
| multi-word-secret: Bearer password | ||
|
|
||
|
|
||
| Response status code: 200 | ||
| Response time: <test> ms | ||
| Response Headers: <response headers test> | ||
| Response Body: | ||
| [ | ||
| { | ||
| "date": "2023-09-11", | ||
| "timeOpen": "09:00", | ||
| "timeClose": "18:00" | ||
| }, | ||
| { | ||
| "date": "2023-09-12", | ||
| "timeOpen": "09:00", | ||
| "timeClose": "18:00" | ||
| }, | ||
| { | ||
| "date": "2023-09-13", | ||
| "timeOpen": "09:00", | ||
| "timeClose": "18:00" | ||
| }, | ||
| { | ||
| "date": "2023-09-14", | ||
| "timeOpen": "09:00", | ||
| "timeClose": "18:00" | ||
| }, | ||
| { | ||
| "date": "2023-09-15", | ||
| "timeOpen": "10:00", | ||
| "timeClose": "16:00" | ||
| }, | ||
| { | ||
| "date": "2023-09-18", | ||
| "timeOpen": "09:00", | ||
| "timeClose": "18:00" | ||
| }, | ||
| { | ||
| "date": "2023-09-19", | ||
| "timeOpen": "09:00", | ||
| "timeClose": "18:00" | ||
| }, | ||
| { | ||
| "date": "2023-09-20", | ||
| "timeOpen": "09:00", | ||
| "timeClose": "18:00" | ||
| }, | ||
| { | ||
| "date": "2023-09-21", | ||
| "timeOpen": "09:00", | ||
| "timeClose": "18:00" | ||
| }, | ||
| { | ||
| "date": "2023-09-22", | ||
| "timeOpen": "10:00", | ||
| "timeClose": "16:00" | ||
| } | ||
| ] | ||
|
|
||
| ✓ success criteria check - $statusCode == 200 | ||
| ✓ status code check - $statusCode in [200, 400, 404] | ||
| ✓ content-type check | ||
| ✓ schema check | ||
|
|
||
| ──────────────────────────────────────────────────────────────────────────────── | ||
|
|
||
| Running workflow reveal-masked-input-secrets.arazzo.yaml / events-crud | ||
|
|
||
| ✓ GET /special-events - step list-events | ||
|
|
||
| Request URL: https://redocly.com/_mock/demo/openapi/museum-api/special-events | ||
| Request Headers: | ||
| accept: application/json, application/problem+json | ||
| authorization: Basic Og== | ||
| multi-word-secret: composed Basic Og== | ||
|
|
||
|
|
||
| Response status code: 200 | ||
| Response time: <test> ms | ||
| Response Headers: <response headers test> | ||
| Response Body: | ||
| [ | ||
| { | ||
| "eventId": "f3e0e76e-e4a8-466e-ab9c-ae36c15b8e97", | ||
| "name": "Sasquatch Ballet", | ||
| "location": "Seattle... probably", | ||
| "eventDescription": "They're big, they're hairy, but they're also graceful. Come learn how the biggest feet can have the lightest touch.", | ||
| "dates": [ | ||
| "2023-12-15", | ||
| "2023-12-22" | ||
| ], | ||
| "price": 40 | ||
| }, | ||
| { | ||
| "eventId": "2f14374a-9c65-4ee5-94b7-fba66d893483", | ||
| "name": "Solar Telescope Demonstration", | ||
| "location": "Far from the sun.", | ||
| "eventDescription": "Look at the sun without going blind!", | ||
| "dates": [ | ||
| "2023-09-07", | ||
| "2023-09-14" | ||
| ], | ||
| "price": 50 | ||
| }, | ||
| { | ||
| "eventId": "6aaa61ba-b2aa-4868-b803-603dbbf7bfdb", | ||
| "name": "Cook like a Caveman", | ||
| "location": "Fire Pit on East side", | ||
| "eventDescription": "Learn to cook on an open flame.", | ||
| "dates": [ | ||
| "2023-11-10", | ||
| "2023-11-17", | ||
| "2023-11-24" | ||
| ], | ||
| "price": 5 | ||
| }, | ||
| { | ||
| "eventId": "602b75e1-5696-4ab8-8c7a-f9e13580f910", | ||
| "name": "Underwater Basket Weaving", | ||
| "location": "Rec Center Pool next door.", | ||
| "eventDescription": "Learn to weave baskets underwater.", | ||
| "dates": [ | ||
| "2023-09-12", | ||
| "2023-09-15" | ||
| ], | ||
| "price": 15 | ||
| }, | ||
| { | ||
| "eventId": "dad4bce8-f5cb-4078-a211-995864315e39", | ||
| "name": "Mermaid Treasure Identification and Analysis", | ||
| "location": "Room Sea-12", | ||
| "eventDescription": "Join us as we review and classify a rare collection of 20 thingamabobs, gadgets, gizmos, whoosits, and whatsits — kindly donated by Ariel.", | ||
| "dates": [ | ||
| "2023-09-05", | ||
| "2023-09-08" | ||
| ], | ||
| "price": 30 | ||
| }, | ||
| { | ||
| "eventId": "6744a0da-4121-49cd-8479-f8cc20526495", | ||
| "name": "Time Traveler Tea Party", | ||
| "location": "Temporal Tearoom", | ||
| "eventDescription": "Sip tea with important historical figures.", | ||
| "dates": [ | ||
| "2023-11-18", | ||
| "2023-11-25", | ||
| "2023-12-02" | ||
| ], | ||
| "price": 60 | ||
| }, | ||
| { | ||
| "eventId": "3be6453c-03eb-4357-ae5a-984a0e574a54", | ||
| "name": "Pirate Coding Workshop", | ||
| "location": "Computer Room", | ||
| "eventDescription": "Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang).", | ||
| "dates": [ | ||
| "2023-10-29", | ||
| "2023-10-30", | ||
| "2023-10-31" | ||
| ], | ||
| "price": 45 | ||
| }, | ||
| { | ||
| "eventId": "9d90d29a-2af5-4206-97d9-9ea9ceadcb78", | ||
| "name": "Llama Street Art Through the Ages", | ||
| "location": "Auditorium", | ||
| "eventDescription": "Llama street art?! Alpaca my bags -- let's go!", | ||
| "dates": [ | ||
| "2023-10-29", | ||
| "2023-10-30", | ||
| "2023-10-31" | ||
| ], | ||
| "price": 45 | ||
| }, | ||
| { | ||
| "eventId": "a3c7b2c4-b5fb-4ef7-9322-00a919864957", | ||
| "name": "The Great Parrot Debate", | ||
| "location": "Outdoor Amphitheatre", | ||
| "eventDescription": "See leading parrot minds discuss important geopolitical issues.", | ||
| "dates": [ | ||
| "2023-11-03", | ||
| "2023-11-10" | ||
| ], | ||
| "price": 35 | ||
| }, | ||
| { | ||
| "eventId": "b92d46b7-4c5d-422b-87a5-287767e26f29", | ||
| "name": "Eat a Bunch of Corn", | ||
| "location": "Cafeteria", | ||
| "eventDescription": "We accidentally bought too much corn. Please come eat it.", | ||
| "dates": [ | ||
| "2023-11-10", | ||
| "2023-11-17", | ||
| "2023-11-24" | ||
| ], | ||
| "price": 5 | ||
| } | ||
| ] | ||
|
|
||
| ✓ status code check - $statusCode in [200, 400, 404] | ||
| ✓ content-type check | ||
| ✓ schema check | ||
|
|
||
| ✓ POST /special-events - step create-event | ||
|
|
||
| Request URL: https://redocly.com/_mock/demo/openapi/museum-api/special-events | ||
| Request Headers: | ||
| content-type: application/json | ||
| accept: application/json, application/problem+json | ||
| authorization: Basic Og== | ||
| multi-word-secret: composed Basic Og== | ||
| Request Body: | ||
| { | ||
| "username": "John", | ||
| "secret": "password", | ||
| "multiwordSecret": "Bearer secretToken", | ||
| "name": "Mermaid Treasure Identification and Analysis", | ||
| "location": "Under the seaaa 🦀 🎶 🌊.", | ||
| "eventDescription": "Join us as we review and classify a rare collection of 20 thingamabobs, gadgets, gizmos, whoosits, and whatsits, kindly donated by Ariel.", | ||
| "dates": [ | ||
| "2023-09-05", | ||
| "2023-09-08" | ||
| ], | ||
| "price": 0 | ||
| } | ||
|
|
||
|
|
||
| Response status code: 201 | ||
| Response time: <test> ms | ||
| Response Headers: <response headers test> | ||
| Response Body: | ||
| { | ||
| "eventId": "dad4bce8-f5cb-4078-a211-995864315e39", | ||
| "name": "Mermaid Treasure Identification and Analysis", | ||
| "location": "Under the seaaa 🦀 🎶 🌊.", | ||
| "eventDescription": "Join us as we review and classify a rare collection of 20 thingamabobs, gadgets, gizmos, whoosits, and whatsits, kindly donated by Ariel.", | ||
| "dates": [ | ||
| "2023-09-05", | ||
| "2023-09-08" | ||
| ], | ||
| "price": 0 | ||
| } | ||
|
|
||
| ✓ success criteria check - $statusCode == 201 | ||
| ✓ success criteria check - $.name == 'Mermaid Treasure Identification and Ana... | ||
| ✓ status code check - $statusCode in [201, 400, 404] | ||
| ✓ content-type check | ||
| ✓ schema check | ||
|
|
||
|
|
||
| Summary for reveal-masked-input-secrets.arazzo.yaml | ||
|
|
||
| Workflows: 2 passed, 2 total | ||
| Steps: 3 passed, 3 total | ||
| Checks: 12 passed, 12 total | ||
| Time: <test>ms | ||
|
|
||
|
|
||
| ┌─────────────────────────────────────────────────────────────────────────────────┬────────────┬─────────┬─────────┬──────────┐ | ||
| │ Filename │ Workflows │ Passed │ Failed │ Warnings │ | ||
| ├─────────────────────────────────────────────────────────────────────────────────┼────────────┼─────────┼─────────┼──────────┤ | ||
| │ ✓ reveal-masked-input-secrets.arazzo.yaml │ 2 │ 2 │ - │ - │ | ||
| └─────────────────────────────────────────────────────────────────────────────────┴────────────┴─────────┴─────────┴──────────┘ | ||
|
|
||
|
|
||
| " | ||
| `; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.