-
Notifications
You must be signed in to change notification settings - Fork 38
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
Pattern support #249
Pattern support #249
Conversation
- added pattern command-line arguement - added pattern attribute to Options object
- added pattern command-line arguement with help text - added pattern attribute and get/set methods to Options object - added loadPattern method to Loader to load json file - added section in swaggerInline in Indx to handle adding the loaded pattern file to options - expanded test coverage to cover all changes
…ger-inline into patternSupport
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.
Handful of nits, but overall this looks pretty solid! Thanks for picking this up.
Can you also re-run Prettier on your changes? You can run it with npx prettier --list-different --write "./**/**.{js}"
Co-authored-by: Jon Ursenbach <erunion@users.noreply.github.com>
Co-authored-by: Jon Ursenbach <erunion@users.noreply.github.com>
Co-authored-by: Jon Ursenbach <erunion@users.noreply.github.com>
Co-authored-by: Jon Ursenbach <erunion@users.noreply.github.com>
@erunion Receiving following error when running prettier: |
@garrett-wade I just pushed up c718583 that has a |
@erunion was able to run |
Co-authored-by: Jon Ursenbach <erunion@users.noreply.github.com>
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.
Sorry, I finally had a chance to run this locally and a found a couple things. These should be the last of the changes! Thanks again for this.
Co-authored-by: Jon Ursenbach <erunion@users.noreply.github.com>
Co-authored-by: Jon Ursenbach <erunion@users.noreply.github.com>
Co-authored-by: Jon Ursenbach <erunion@users.noreply.github.com>
Co-authored-by: Jon Ursenbach <erunion@users.noreply.github.com>
Co-authored-by: Jon Ursenbach <erunion@users.noreply.github.com>
Co-authored-by: Jon Ursenbach <erunion@users.noreply.github.com>
@erunion thanks for all of the feedback! This is my first time contributing to an open source library as well as extending a node.js library in general. Thank you for taking the time to make the suggestions, learned a lot! |
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.
Thanks again for this!
Adding support for custom comment pattern specification
This is initial enhancement to support the following issue readmeio/oas#603.
This enhancement:
pattern
argument command-line argument with help textOptions
objectloadPattern
method toLoader
to load json file that contains specification of patternswaggerInline
inindex
file to handle adding the loaded pattern file to the optionsvariable
Testing
Refer to the
can extract comments from custom pattern and custom file
test in theextractor.test.js
file to see a detailed test of the additional functionality.