hoppscotch / hopp-doc-gen

📔 API documentation generator CLI for https://hoppscotch.io

Home Page:https://hoppscotch.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add new options to generate command

yubathom opened this issue · comments

Consider adding some options for the users in the generate command?

I was wondering something like:

generate <path>                 Create API documentation
generate [options] <path>

Options:
  -o, --output-path <path>       The documentation markdown file output path
  -u, --update <path>            Update de documentation markdown file
  -n, --no-install               Skip npm install and create only the markdown file
  -r, --request-buttons          Add a request button for each request
  1. -o, --output-path <path>
    Now the default value of path is docs/README.md. Would be nice if we could replace it for some other path.

2. -u, --update
Now if we have a docs folder or a package.json the process is stoped. As the api evolves is common the need to update the documentation. With this option set, the user could just update the existing markdown file.

  1. -n, --no-install
    It is great that the cli create all the doc website and npm install and so on. But in some cases it is more usefull to gerenerate just the plain markdown.

  2. -r, --request-buttons
    Would be nice if in the generated website we could run the requests and easily test the apis.

todo:

hdg generate <options>

  • -o, --output-path <path>
  • update existing doc after response from the user
  • -n, --no-install
  • -r, --request-buttons
  • tests

Good call, I think instead of having the --update flag we can ask the user whether he/she intends to overwrite the existing content.

I will give a try next weekend

Can you please explain me the task I am unable to understand it. Whether we want a command to add feature or we have to add new command as features.I will be happy to do this once you explain it.

Hey @nikhilspy we already have that command and feature. The missing part is on add support to do the request in the doc website. Check HoppRequest.vue, is very incomplete.. Maybe you could check these supporting more methods and options.