Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v3] docgen does not take into account the subitems into postman collection #46

Open
HerveMorosini opened this issue Jan 26, 2021 · 5 comments

Comments

@HerveMorosini
Copy link

HerveMorosini commented Jan 26, 2021

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:

image

Thanks for your help.

@thedevsaddam
Copy link
Owner

@HerveMorosini It would be great if you provide a postman example collection of the scenario so that I can regenerate and debug.

@HerveMorosini
Copy link
Author

Hi @thedevsaddam
I will do.

@HerveMorosini
Copy link
Author

@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.

@louagej
Copy link

louagej commented Feb 16, 2021

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
image

Kind regards,
Job

@furick1
Copy link

furick1 commented Aug 4, 2021

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants