Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

hapi-swagger - group docs by tags #406

Merged
merged 1 commit into from
Jul 27, 2017
Merged

hapi-swagger - group docs by tags #406

merged 1 commit into from
Jul 27, 2017

Conversation

darahayes
Copy link
Contributor

By default the Swagger definitions are grouped by path prefix e.g. /cats /dogs.

Every path except /ping in Udaru is prefixed with /authorization and the result is a giant unorganized list of paths shown in the image:

This PR adds a tiny config change passed to hapi-swagger and the result of that is something like this:

Now this does create duplication e.g. /authorization/organizations is listed under the organizations tag heading and it's also listed under the service tag heading. But really I find most of the tags are pretty useless so I propose we simplify the whole thing down, maybe to a maximum of two tags:

  1. A tag that identifies the endpoint by function e.g. organization or users or teams
  2. A tag that makes the distinction between public/private or admin/user oriented. @dberesford I can't remember the exact name you put on it but you should get the idea.

What do you think?

@coveralls
Copy link

coveralls commented Jul 25, 2017

Coverage Status

Coverage increased (+0.0007%) to 96.254% when pulling 6dc1f1e on swagger-tags into 87a5c61 on master.

@p16
Copy link
Contributor

p16 commented Jul 26, 2017

@darahayes I'm fine with fewer and more meaningful tags 👍

@darahayes darahayes merged commit 4c70d0b into master Jul 27, 2017
@darahayes darahayes deleted the swagger-tags branch July 27, 2017 10:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants