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

folders aren't parsed #38

Closed
ethicnology opened this issue Mar 15, 2021 · 0 comments · Fixed by #39
Closed

folders aren't parsed #38

ethicnology opened this issue Mar 15, 2021 · 0 comments · Fixed by #39

Comments

@ethicnology
Copy link
Contributor

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/>
@jamesgeorge007 jamesgeorge007 linked a pull request Apr 16, 2021 that will close this issue
jamesgeorge007 pushed a commit that referenced this issue Apr 16, 2021
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

Successfully merging a pull request may close this issue.

1 participant