docgen
docgen copied to clipboard
[v3] docgen does not take into account the subitems into postman collection
Hello! First of all,I would like to thank you for having developping this tool.
Here is the issue:
I have a postman collection with few subfolders such as
{
"info": {
"_postman_id": "",
"name": "",
"description": "",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "v1",
"item": [
{
"name": "1. title",
"item": [
{
"name": "1.2. title",
"item": [
{
"name": "1.2.1. title",
"item": [
{
"name": "1.2.1.1. title",
"event": [...],
"request": {...},
"response": []
},
...
When generating the HTML documentation from this collection, it generates only the first and second level of items.
Example:
Thanks for your help.
@HerveMorosini It would be great if you provide a postman example collection of the scenario so that I can regenerate and debug.
Hi @thedevsaddam I will do.
@thedevsaddam Here is an example of postman collection which not work with new version of gocgen. Example.postman_collection.zip Hope this will help! Thanks.
Hi @thedevsaddam ,
Could this be taken into account as a Proposal for improvement?
I'm not able to run and build this code, but it might be a pretty simple fix.
Maybe the Code in the function func (d *Documentation) buildSubChilditems(itm...
the should refer not to it's own function, but it's parent function func (d *Documentation) build()
buildSubChilditems
Kind regards, Job
@thedevsaddam does @louagej comment contain a valid fix to be able to show items in postman sub folders? The current build excludes requests from sub folders when converting to html. I am considering removing subfolders from our postman to be able to share with a broader audience via html who don't have postman installed or desire to download and import.