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

Multi-level grouping of Api Declarations #409

Closed
decoder318 opened this issue Mar 4, 2014 · 9 comments
Closed

Multi-level grouping of Api Declarations #409

decoder318 opened this issue Mar 4, 2014 · 9 comments

Comments

@decoder318
Copy link

We have hundreds of controllers in our Web Api Project and it is going to increase a lot, and so organized the controllers in separate folders (based on the project module). The namespace of any controller is directly derived from its folder path.

It would be a lot helpful if we can group Api-Declarations, first by the Controller Namespace and then by the Controller Name, and hence can have multiple levels of collapsible groups, like in a tree-view explorer.

@fehguy
Copy link
Contributor

fehguy commented Mar 4, 2014

Can you describe the organization a bit more? There is a similar request from another large deployment and we're looking at supporting lazy-loading as well.

@decoder318
Copy link
Author

We use ASP.NET WebApi RESTful service.

Lets's say we have product modules like: Core, Health, Integrity, Strategy, etc. In the controllers folder of the project, we have folders (with names same as modules). And the namespace of each controller is based on the folder structure.

Eg:- CommandController.cs is inside the folder: Controllers/Core. The namespace is Company.WebApi.Controllers.Core.

PolicyController.cs is inside the folder: Controllers/Health. The namespace is Company.WebApi.Controllers.Health

@fehguy
Copy link
Contributor

fehguy commented Mar 5, 2014

You do know that you can point swagger UI directly at an API declaration and get just that, right? For instance, point to here:

http://petstore.swagger.wordnik.com/api/api-docs/pet

But I don't think that's what you're after--you want semi-arbitrary organization.

@decoder318
Copy link
Author

yeah, Imagine a hierarchical tree-view kind of folder structure, each containing a list of ApiControllers or a further division of folders, and so on

(you categorize based based on the namespace of the controllers)

@decoder318
Copy link
Author

Or can you think of better way for the UI, to be not so heavy when we have like 500 or more api-groups?

@fehguy
Copy link
Contributor

fehguy commented Aug 2, 2014

the 2.0 spec will allow for this.

@fehguy fehguy closed this as completed Aug 2, 2014
@clintonpatterson
Copy link

I know this issue has been closed, I'd just like to find out if this issue was ever addressed in the 2.0 spec? I can't find any references to it.

@fehguy
Copy link
Contributor

fehguy commented May 19, 2016

Yes, tags are used for grouping in the 2.0 spec.

@clintonpatterson
Copy link

Could you perhaps direct me to an example using web api? I can't find any.

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

No branches or pull requests

3 participants