Display Two Level Grouping of Smartdocs API Documentation on Developer Portal based on Swagger 2

Hi

I want to build two level of grouping while displaying Swagger API Documentation on Developer Portal.

Currently when we create SmartDocs model, then import Swagger 2 JSON, then render and publish the nodes , it displays all the API's on the same page under APIs link on top of Developer Portal.

Now we want to display API's based on two level grouping like it has been created below

https://developers.digitalriver.com/

If you check this, there is menu REST APIs on top, when we click it displays the Categories which is first level of Grouping like OAuth API, Shopper API...then when we click on any one category like OAuthAPI, it displays set of OAuth API's which is second level of Grouping and then if we click any of the specific API, it displays all the respurces of that API (like all GET, POST etc).

We want to build this Use Case on Developer Portal.

Could you help us in providing the inputs on how we can achieve this or there is some reference on the same ?

0 3 764
3 REPLIES 3

@GAURAV ,

It's easy. What you need is little bit of Drupal CMS knowledge.

  • Above site uses module called " Nice Menus" for hierarchical menus.
  • Add above module & enable same
  • Navigate to Menus & Add New Menu / Update existing main menu with hierarchical links. For more details check readme / documentation of nice menus module
  • Enable same in header region by editing your custom theme / check settings in nice menu.

Thanks @Anil Sagar

I am afraid that I have no knowledge of Drupal but will try to learn and deal with it.

Points you talked about are related to Hierarchical Menus which I can get from the Drupal Module you mentioned but will that doesn't require any customization on SmartDocs side ?

As our application will have just the Swagger 2 JSON like we have petstore json

http://petstore.swagger.io/v2/swagger.json

Now we have to group api's based on tags like pet,user,store and then when we click on pet, it should display it's resources only, currently when we import this petstore json , it displays all the methods of every tag on the same page on Developer Portal.

@GAURAV , Menu links just point to smartdocs pages, you don't need any changes to smartdocs. Just navigate to "admin/structure/menu/manage/main-menu" & drag and drop link to make hierarchical.