hoppscotch/hopp-doc-gen

folders aren't parsed

ethicnology opened this issue · 0 comments

collection

[
    {
      "name": "Demo",
      "folders": [
        {
          "name": "folder1",
          "requests": [
            {
              "url": "http://127.0.0.1:1984",
              "path": "/first-folder1",
              "method": "GET",
              "name": "Inside sub-folder",
              "collection": 2
            },
            {
                "url": "http://127.0.0.1:1984",
                "path": "/second-folder1",
                "method": "GET",
                "name": "Inside sub-folder",
                "collection": 2
              }
          ],
          "folders": []
        },
        {
            "name": "folder2",
            "requests": [
              {
                "url": "http://127.0.0.1:1984",
                "path": "/first-folder2",
                "method": "GET",
                "name": "Inside sub-folder",
                "collection": 2
              },
              {
                "url": "http://127.0.0.1:1984",
                "path": "/second-folder2",
                "method": "GET",
                "name": "Inside sub-folder",
                "collection": 2
              }
            ],
            "folders": []
          }
      ],
      "requests": [
        {
          "url": "http://127.0.0.1:1984",
          "path": "/outside",
          "method": "GET",
          "name": "Outside sub-folder",
          "collection": 2
        }
      ]
    }
  ]

actual output

command

hdg generate -s example.json

output

# API Documentation

## Demo
### Outside sub-folder
 - url: http://127.0.0.1:1984
 - path: /outside
 - method: GET
---

<br/>

expected output

# API Documentation

## Demo
### Outside sub-folder
 - url: http://127.0.0.1:1984
 - path: /outside
 - method: GET
---
### folder1
#### Inside sub-folder
 - url: http://127.0.0.1:1984
 - path: /first-folder1
 - method: GET
---
#### Inside sub-folder
 - url: http://127.0.0.1:1984
 - path: /second-folder1
 - method: GET
---
### folder2
#### Inside sub-folder
 - url: http://127.0.0.1:1984
 - path: /first-folder2
 - method: GET
---
#### Inside sub-folder
 - url: http://127.0.0.1:1984
 - path: /second-folder2
 - method: GET
---

<br/>