apiaryio / api-blueprint

API Blueprint
https://apiblueprint.org
MIT License
8.65k stars 2.14k forks source link

Organize sidenav by sections #405

Closed wrobbinz closed 5 years ago

wrobbinz commented 7 years ago

Sorry if I missed the documenation or issue that covers this!

Apiary's sidenav appears to only have two sections:

INTRODUCTION: h1 (#) sections that are not a part of a 'Group' (# Group ). Presumably, these are topics broad enough to describe the entire API.

REFERENCE: Any section that has been defined once a 'Group' has been defined. Presumably, this is all the resources of your API.

screen shot 2017-10-23 at 1 56 21 pm

In the below example, I have a company that has an extensive API. There are dozens of resources that can naturally be grouped into many different sections. However, when rendering this in Apiary, all resources are jumbled into the REFERENCE section.

How can I organize my API so that each 'Group' is segregated into unique sections? Instead of a lazy/ambiguous REFERENCE section, I want to offer an INTRODUCTION, SODA, and JUICE section. Is this possible?

FORMAT: 1A
HOST: https://app.drinkr.io

# Drinkr API

:[Introduction](blueprint/introduction.apib)

# Authentication

:[Authentication](blueprint/authentication.apib)

# Pagination

:[Pagination](blueprint/pagination.apib)

# Group Soda

The Soda API handles all fizzy endpoints.

:[Bottle Caps](blueprint/bottle_caps.apib)
:[Carbonation](blueprint/carbonation.apib)
:[Sugar](blueprint/sugar.apib)
:[Caffeine](blueprint/caffeine.apib)

# Group Juice

The Juice API handles all freshly squeezed endpoints.

:[Fruits](blueprint/fruits.apib)
:[Vegetables](blueprint/vegetables.apib)
:[Pulp](blueprint/pulp.apib)
:[Nutrients](blueprint/nutrients.apib)
wrobbinz commented 7 years ago

Hi, sorry to bump. It would be awesome to get clarification if this is either:

a) already an available feature b) a planned feature c) an unplanned feature

Any answer is fine, and would help my team move forward. Thanks!

kylef commented 7 years ago

Your resource groups should show in the reference section.

Here's an example:

messages image 4134390671

# My API

...

## Group Soda

## Example [/example]

### View [GET]

+ Response 204

## Group Juice

## Juicing Resource [/juices]

### View [GET]

+ Response 204

If you are seeing different behaviour, would you be able to share with us a full API Blueprint so we can test. You're welcome to reach out to Apiary support (support@apiary.io) to send the private document and they will be happy to debug the problem.