danielgtaylor / aglio

An API Blueprint renderer with theme support that outputs static HTML
4.75k stars 480 forks source link

[BUG] Grouping multiples files rendering issue #356

Open Cosmet opened 6 years ago

Cosmet commented 6 years ago
index.apib
# Group A
<!-- include(child-A.apib) -->
<!-- include(child-B.apib) -->

---

child-A.apib
# Child A [/path]
## Some API [POST]
## Another API [GET]

---

child-B.apib
# Child B [/path]
## Some Other API [POST]

---->

This results in the sidebar looking like this
Group A (expandable)
- Child A
  - Some API
  - Another API
  - Some Other API

---

but it should look like this
Group A (expandable)
- Child A
  - Some API
  - Another API
- Child B
  - Some Other API

---

or even ideally like this
Group A (expandable)
- Group Child A (expandable)
  - Some API
  - Another API
- Group Child B (expandable)
  - Some Other API

Now if you add another method to child-B it renders the way it should be

Changing it to this format somewhat fixes the issue

index.apib
# Group A
<!-- include(child-A.apib) -->
<!-- include(child-B.apib) -->

---

child-A.apib
# Child A [/path]
## Some API [POST]
## Another API [GET]

---

child-B.apib
# Child B [GET /path]

---->

however this format you have to have all single method children files at the top of the group otherwise they fall into other child sections