-
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
feat(index): add ability to specify title
and version
from CLI.
#258
feat(index): add ability to specify title
and version
from CLI.
#258
Conversation
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.
mostly just a few small nits, but this looks great! can you run npm run prettier
and npm run lint
and resolve any issues that that finds?
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 ran prettier and lint, there is one linting error I cannot figure out how to avoid without turning if off. Any suggestions here: |
With the case you're doing that line it's safe to add an |
@erunion should be good to go, thanks for the feedback! |
Published to 5.3.0. Thank you! |
🧰 What's being changed?
This enhancement:
title
andapiVersion
updateTitleAndVersion()
method to index.js to update thetitle
andversion
attributes of a swagger or OAS filesinfo
object if specified with the added CLI argumentsupdateTitleAndVersion()
after the base file is confirmed to be loaded🧬 Testing
Run the following command
node bin/swagger-inline __tests__/__fixtures__/project-openapi --base __tests__/__fixtures__/project-openapi/openapiBase.json --title testTitle --apiVersion 2.0
and confirm thetitle
andversion
attributes of theinfo
object in the outputted swagger/oas.json file aretestTitle
and2.0
respectively based on the CLI input.