-
Notifications
You must be signed in to change notification settings - Fork 43
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
feat(openapi): a fresh coat of paint on openapi inspect
#1127
Conversation
let msg: string; | ||
msg = `You have a total of ${chalk.bold(info.found)} ${pluralize(info.name.toLowerCase(), info.found)} in your API.`; | ||
if (info.found > 100) { | ||
msg += ` ${chalk.cyanBright('Wow! 🤯')}`; |
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.
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.
obsessed with this
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.
ended up bumping this up to 200
report.push( | ||
table(tableData, { | ||
border: tableBorder, | ||
columns: { | ||
0: { | ||
width: 26, |
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.
This caps the "Feature" table column to a specific width, which because the second "Used" one doesn't have variable content, causes the width of every table to now be identical.
let msg: string; | ||
msg = `You have a total of ${chalk.bold(info.found)} ${pluralize(info.name.toLowerCase(), info.found)} in your API.`; | ||
if (info.found > 100) { | ||
msg += ` ${chalk.cyanBright('Wow! 🤯')}`; |
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.
obsessed with this
Co-authored-by: Kanad Gupta <[email protected]>
# [10.1.0-next.2](v10.1.0-next.1...v10.1.0-next.2) (2025-01-06) ### Features * **openapi:** a fresh coat of paint on `openapi inspect` ([#1127](#1127)) ([ff8c304](ff8c304)) [skip ci]
🎉 This PR is included in version 10.1.0-next.2 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
## 🧰 Changes The biggest problem I've had since originally building our `openapi inspect` command has been that the tables between OpenAPI and ReadMe features aren't of consistent widths. Drives me up a damn wall. <img width="1309" alt="Screenshot 2024-12-20 at 9 50 05 PM" src="https://github.com/user-attachments/assets/2cfc1dd6-9bd8-4c1c-bed4-7d627d26e2d0" /> So I'm giving a fresh coat of paint to this command that deserves some love. * [x] Consistent table widths. <sub>existential grumbling</sub> * [x] Table headers are now yellow instead of green to reduce the amount of color thrashing we have going on. * [x] URLs to OpenAPI spec definitions our own docs are now dimmed instead of grey. * [x] Tossed an emoji on the different feature sections. 🌲 for OpenAPI and 📖 for us. * [x] Swapped out the ✅ emoji for used features in place of 🟢 and 🔴 circles. * [x] Usage strings like "2 Media Types", "a total of 9 Operations", or "a single Security Type" are now lowercased because it looked funky as hell. * [x] Bumped OpenAPI spec links to the latest versions for 3.0 and 3.1. I also made a couple minor readability to how we construct this table because the code was a bit gnar with some deeply nested `array.push()` calls. ## 🧬 QA & Testing This is what it all looks like: <img width="1426" alt="Screenshot 2024-12-20 at 9 42 57 PM" src="https://github.com/user-attachments/assets/99028b5d-85a6-423e-a578-b4c095ca0cee" /> --------- Co-authored-by: Kanad Gupta <[email protected]>
## 🧰 Changes reapplies the following changes from the `next` branch onto the `v9` branch: - [x] #1124 - [x] #1125 - [x] #1126 - [x] #1127 - [x] #1143 - [x] #1144 - [x] #1141 ## 🧬 QA & Testing do tests pass? --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Jon Ursenbach <[email protected]> Co-authored-by: semantic-release-bot <[email protected]> Co-authored-by: Jon Ursenbach <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
🧰 Changes
The biggest problem I've had since originally building our
openapi inspect
command has been that the tables between OpenAPI and ReadMe features aren't of consistent widths. Drives me up a damn wall.So I'm giving a fresh coat of paint to this command that deserves some love.
I also made a couple minor readability to how we construct this table because the code was a bit gnar with some deeply nested
array.push()
calls.🧬 QA & Testing
This is what it all looks like: