Skip to content
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): add --dryRun option #612

Merged
merged 13 commits into from
Sep 22, 2022

Conversation

darrenyong
Copy link
Contributor

🚥 Fix RM-3854

🧰 Changes

This adds a --dryRun option to the openapi command so users can debug their spec creation and updating.

🧬 QA & Testing

Provide as much information as you can on how to test what you've done.

@kanadgupta kanadgupta added enhancement New feature or request command:openapi Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands labels Sep 15, 2022
@kanadgupta kanadgupta added this to the v8 milestone Sep 16, 2022
@darrenyong
Copy link
Contributor Author

@kanadgupta, what do you think we should do in the case where a user does a dryRun in a directory that only has one file?

we automatically return this notification letting them know that we're attempting to upload it. should we change the copy at all to avoid confusion or is that okay?

@kanadgupta
Copy link
Member

@darrenyong good question... I think it's okay to leave the copy as is! I think it's clear from these logs what's happening:

We found petstore.json and are attempting to upload it.
🎭 dry run! The spec with the id SPEC_ID will be updated

I think we should clean up the dry run log copy a bit but I'll leave a suggestion during my actual review!

@darrenyong darrenyong marked this pull request as ready for review September 20, 2022 23:44
@darrenyong
Copy link
Contributor Author

@kanadgupta merged main 😎

@kanadgupta kanadgupta changed the title feat(openapi): add --dryrun option to openapi feat(openapi): add --dryRun option Sep 22, 2022
Copy link
Member

@kanadgupta kanadgupta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few copy edit suggestions below but the code and tests look great! Could you also add a little note about the dry run flag in the README.md file? I think it makes sense for that note to live around here.

src/cmds/openapi/index.ts Outdated Show resolved Hide resolved
src/cmds/openapi/index.ts Outdated Show resolved Hide resolved
src/cmds/openapi/index.ts Outdated Show resolved Hide resolved
src/cmds/openapi/index.ts Outdated Show resolved Hide resolved
@darrenyong
Copy link
Contributor Author

darrenyong commented Sep 22, 2022

A few copy edit suggestions below but the code and tests look great! Could you also add a little note about the dry run flag in the README.md file? I think it makes sense for that note to live around here.

Added! I'll update our docs here with the openapi --dryRun once we release this!

Copy link
Member

@kanadgupta kanadgupta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super tiny docs suggestion but otherwise looks LGTM 🚀

(also ticketed the docs change in RM-5475!)

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@darrenyong darrenyong merged commit 8cb48e8 into main Sep 22, 2022
@darrenyong darrenyong deleted the darren/rm-3854-add---dryrun-option-to-openapi-command branch September 22, 2022 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command:openapi Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants