insodoc / insomnia-documenter

Tool to create minimalist and beautiful API documentation pages using your Insomnia workspace export file.
MIT License
492 stars 59 forks source link

Allow to pass data-root to command line #76

Closed ecarreras closed 1 year ago

ecarreras commented 2 years ago

As explained in https://github.com/jozsefsallai/insomnia-documenter#custom-root-paths we can change the data-root attribute to use custom root paths, but we want to automatize this and have made this change to allow to pass this option to command line executable

insomnia-documenter -c Insomnia.json -o docs -d /docs

jozsefsallai commented 2 years ago

Hello. What happens when you don't specify the -d flag? Wouldn't it replace DATAROOT with undefined?

ecarreras commented 2 years ago

@jozsefsallai default value is '' an empty string, configured with the option parser. We keep the default value when generating the template: https://github.com/jozsefsallai/insomnia-documenter/blob/c737da90492bd7f35116a0d05475c8f226941c49/src/main.js#L7

ecarreras commented 1 year ago

@jozsefsallai sorry for the delay, maybe with this changes the pull-request is ready to be merged

jozsefsallai commented 1 year ago

Thank you!

todoroff commented 1 year ago

has this been released yet? I tried with both "-d" and "--data-root" but it says "unknown option"

jozsefsallai commented 1 year ago

@todoroff published a new release on npm, please try now