-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add markdown output format to stats command (#1395)
* fix: Remove non-json format elements from JSON output * feat: Add markdown output format, suitable for use in GitHub Job Summaries * chore: run prettier, update snapshot for existing tests * chore: add tests for all the stats output formats * chore: add museum file, run prettier * fix: Tidy up some ends spotted by eslint * fix: Tidy up some ends spotted by eslint * feat: reinstate debug/timing output for stylish format only * chore: update snapshots with timing output * chore: run prettier * feat: Add markdown table formatting to stats markdown output * chore: update snapshots for new output format * docs: Add changeset for markdown format option in stats command
- Loading branch information
Showing
11 changed files
with
819 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@redocly/cli": patch | ||
--- | ||
|
||
Added markdown format option to stats command for use with GitHub job summaries. |
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 @@ | ||
../../../resources/museum.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,39 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`E2E stats stats should produce correct JSON output 1`] = ` | ||
{ | ||
"refs": { | ||
"metric": "🚗 References", | ||
"total": 39 | ||
}, | ||
"externalDocs": { | ||
"metric": "📦 External Documents", | ||
"total": 0 | ||
}, | ||
"schemas": { | ||
"metric": "📈 Schemas", | ||
"total": 22 | ||
}, | ||
"parameters": { | ||
"metric": "👉 Parameters", | ||
"total": 6 | ||
}, | ||
"links": { | ||
"metric": "🔗 Links", | ||
"total": 0 | ||
}, | ||
"pathItems": { | ||
"metric": "➡️ Path Items", | ||
"total": 5 | ||
}, | ||
"operations": { | ||
"metric": "👷 Operations", | ||
"total": 8 | ||
}, | ||
"tags": { | ||
"metric": "🔖 Tags", | ||
"total": 3 | ||
} | ||
} | ||
`; |
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 @@ | ||
../../../resources/museum.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,16 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`E2E stats stats should produce correct Markdown format 1`] = ` | ||
| Feature | Count | | ||
| --- | --- | | ||
| 🚗 References | 39 | | ||
| 📦 External Documents | 0 | | ||
| 📈 Schemas | 22 | | ||
| 👉 Parameters | 6 | | ||
| 🔗 Links | 0 | | ||
| ➡️ Path Items | 5 | | ||
| 👷 Operations | 8 | | ||
| 🔖 Tags | 3 | | ||
`; |
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 @@ | ||
../../../resources/museum.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,19 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`E2E stats stats should produce correct output (stylish format) 1`] = ` | ||
Document: museum.yaml stats: | ||
🚗 References: 39 | ||
📦 External Documents: 0 | ||
📈 Schemas: 22 | ||
👉 Parameters: 6 | ||
🔗 Links: 0 | ||
➡️ Path Items: 5 | ||
👷 Operations: 8 | ||
🔖 Tags: 3 | ||
museum.yaml: stats processed in <test>ms | ||
`; |
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
Oops, something went wrong.
4868a5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Test suite run success
699 tests passing in 100 suites.
Report generated by 🧪jest coverage report action from 4868a5b