-
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): auto-detect API definitions #567
Merged
kanadgupta
merged 25 commits into
main
from
kanad/rm-5059-expand-openapi-file-search-functionality
Aug 16, 2022
Merged
feat(openapi): auto-detect API definitions #567
kanadgupta
merged 25 commits into
main
from
kanad/rm-5059-expand-openapi-file-search-functionality
Aug 16, 2022
Conversation
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 filter is going to be used when passing in the filter from the `ignore` package.
this was a weird edge case with the oas-normalize function that we should make sure to account for
kanadgupta
added
enhancement
New feature or request
command:openapi
Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands
labels
Aug 15, 2022
After struggling for hours with `enquirer` and trying to get a single test to run properly, I caved and went with `prompts`. I'm completely blown away by how simple it was to write a test and I'm so mad about it lol 😭 Tagging a few PRs below that I tried to reference when writing `enquirer` tests: enquirer/enquirer#234 enquirer/enquirer#284
I think these docs should be in third person when describing what the tool does (e.g. "rdme does this" vs. "we do this"). I think using first-person grammar is fine when describing our recommendations. Also using the GitHub callout syntax, see: https://github.com/orgs/community/discussions/16925
kanadgupta
requested review from
a team,
erunion,
Dashron,
domharrington and
darrenyong
and removed request for
a team
August 16, 2022 17:28
kanadgupta
commented
Aug 16, 2022
erunion
requested changes
Aug 16, 2022
We're no longer creating this file in tests, so no need to ignore it.
Co-Authored-By: Jon Ursenbach <[email protected]>
erunion
approved these changes
Aug 16, 2022
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.
hell yeah
Co-authored-by: Jon Ursenbach <[email protected]>
kanadgupta
deleted the
kanad/rm-5059-expand-openapi-file-search-functionality
branch
August 16, 2022 21:41
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
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.
🧰 Changes
This swaps out our auto-detection of
swagger.json
,openapi.yml
, etc. in theopenapi
andvalidate
commands for a search functionality that's far more comprehensive.rdme
will now look for any and all JSON or YAML files (including in sub-directories) that contain a top-levelopenapi
orswagger
property.1 It will then prompt the user (if in a non-CI environment) if multiple files are found.Here's what the new workflow looks like:
Screen.Recording.2022-08-16.at.12.10.52.PM.mov
.gitignore
and a prompt-based system driven byprompts
enquirer
usage over toprompts
in a follow-up PR, ticketed in RM-5116🧬 QA & Testing
Added a whole lotta test coverage which is now passing ✅
Also confirmed that this works when run locally (including in different directories via
npm link
). I added2.0/
to the.gitignore
file in theoas-examples
repo and confirmed that this is what I got when running a linked version ofrdme
in the repo:Screen.Recording.2022-08-16.at.12.26.45.PM.mov
Footnotes
rdme
will not scan anything in the working directory's.git/
directory, nor any files/directories specified in the.gitignore
file (if the file exists). ↩