thunderclient / thunder-client-support

Thunder Client is a lightweight Rest API Client Extension for VS Code.
https://www.thunderclient.com
Other
3.61k stars 127 forks source link

Generate markdown documentation from requests #1051

Open Salmondx opened 1 year ago

Salmondx commented 1 year ago

Please describe feature/problem details and solution you'd like. Would be great if thunder client could generate markdown documentation based on collections/requests. E.g. either add it to a README.md or to some /doc folder. It would help a lot and simplify a process of creating API documentation without a need of external tools.

Scenario would be useful if a person who is working on API doesn't want to clone repository just to check requests. In this case he can just open a git repo and check requests from there.

Describe alternatives you've considered Tried using Postman and Insomnia but they don't provide such functionality. There are plugins that do something similar:

But both these tools require some external cloud syncing for collection itself so doesn't fit in a workflow. Thunderclient is great because it stores collections in a git repo itself.

Your Team Size Using TC: 2-5

rangav commented 1 year ago

Thanks @Salmondx for the feedback, Will add to roadmap.

rangav commented 1 year ago

@Salmondx can you please share sample markdown file to show how you want the documentation format to be displayed for a collection.

Salmondx commented 1 year ago

@rangav great to hear that it was added to a roadmap :)

I don't have any specific preferences, but for example the library I shared above (postman-to-markdown) generates docs in such format: https://github.com/bautistaj/postman-to-markdown/blob/master/resources/example.md

rangav commented 1 year ago

This is a good suggestion, thought it will be useful to others also, so added to roadmap.

Thanks for sharing the link.

rangav commented 1 year ago

related #774

vasansr commented 1 year ago

@Salmondx, although something built-in would be nice, I have developed a rather simple system for this. See this gist:

It has the following:

So, with the above, I just edit the Thunder Client requests, add some documentation and commit. The markdown documentation is auto-generated and committed along with the thunder tests. I can share the link to the generated .md in my repository, which can be opened up in a browser.

Notes:

isAlmogK commented 1 year ago

+1 I can also really use this