You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building an API with a lot of exposed services that belong to different groups.
For example, I have a group prospecting, with 8 different services inside it. What I want to achieve is URI structure like "prospects/persons/{id}", "prospects/companies/{id}" and so on.
To archive that, I'm defining my services like so:
It works: API endpoints are available and SwaggerUI shows all endpoints.
But there are some serious problems.
Expected behaviour
What I want to do is to define docs for every of my sub-services and see them in Swagger. Also, ideally, I would like them to be displayed as different groups in SwaggerUI.
Actual behaviour
When I do so, they all appear under same tag "prospects" - this means that I can't set definitions for them (every definition is replacing the previous one) and can't group them by actual service name.
The problem is here because of automatic tags generation. It would be great to have an ability to:
set custom tags for service;
or at least support nested routes during generation.
System configuration
Module versions:
feathers@2.0.2;
feathers-swagger@0.3.1;
The text was updated successfully, but these errors were encountered:
I've realised now that I can overcome definitions problem with using definitions field instead of definition. But there is still a problem with grouping by different tag.
P.S. I will be happy to fill a PR, but would like to discuss implementation before.
Maybe it makes sense to add a couple of recognised fields in docs schema?
tags(optional) - array of tags to assign to the service. If not given, current generation rules will apply.
definitionName(optional) - name to assign to definition. If not given, the first value from the array of tags will be used.
Steps to reproduce
I'm building an API with a lot of exposed services that belong to different groups.
For example, I have a group
prospecting
, with 8 different services inside it. What I want to achieve is URI structure like "prospects/persons/{id}", "prospects/companies/{id}" and so on.To archive that, I'm defining my services like so:
It works: API endpoints are available and SwaggerUI shows all endpoints.
But there are some serious problems.
Expected behaviour
What I want to do is to define docs for every of my sub-services and see them in Swagger. Also, ideally, I would like them to be displayed as different groups in SwaggerUI.
Actual behaviour
When I do so, they all appear under same tag "prospects" - this means that I can't set definitions for them (every definition is replacing the previous one) and can't group them by actual service name.
The problem is here because of automatic tags generation. It would be great to have an ability to:
System configuration
Module versions:
The text was updated successfully, but these errors were encountered: