feat(index): add ability to specify title and version from CLI.#258
feat(index): add ability to specify title and version from CLI.#258erunion merged 8 commits intoreadmeio:mainfrom
title and version from CLI.#258Conversation
erunion
left a comment
There was a problem hiding this comment.
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:
titleandapiVersionupdateTitleAndVersion()method to index.js to update thetitleandversionattributes of a swagger or OAS filesinfoobject 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.0and confirm thetitleandversionattributes of theinfoobject in the outputted swagger/oas.json file aretestTitleand2.0respectively based on the CLI input.