-
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
docs(openapi): add postman warning #851
base: next
Are you sure you want to change the base?
docs(openapi): add postman warning #851
Conversation
…x-364-create-a-warning-in-rdme-when-someone-works-with-a-postman
…-someone-works-with-a-postman
…-someone-works-with-a-postman
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.
great work so far, for real! the code is in the exact spot it should be and you've absolutely nailed the logic — i have a few small suggestions below, and i think it might be good to add a test to ensure that it shows up when we want it to. happy to pair on 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.
Mind reverting this change?
); | ||
break; | ||
default: | ||
debug(`Type ${chalk.yellow('rdme help')} to see all commands`); |
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.
don't think you need this debug
statement, mind removing it?
switch (command) { | ||
case 'openapi': | ||
warn( | ||
'You are attempting to upload a Postman collection. This feature is currently experimental. For more information, visit our docs here: https://docs.readme.com/main/docs/openapi#the-api-reference', |
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.
small refactoring suggestion: mind creating a separate variable above (called postmanWarning
or something like that) and re-using that in all of these warn
statements?
if (definitionVersion.specification === 'postman') { | ||
switch (command) { | ||
case 'openapi': |
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.
great job here with this if
/switch
logic — super readable and it's in the perfect spot 👏🏽
🧰 Changes
Describe in detail what this PR is for.
🧬 QA & Testing
Provide as much information as you can on how to test what you've done.