-
-
Notifications
You must be signed in to change notification settings - Fork 514
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
Add title
property to GroupedOpenApi
class for displaying a Human readable group name
#1596
Comments
There are no plans to add this property. |
@bnasslahsen As indicated in my description, I was hoping to get some feedback first if you would even consider adding this as a feature. I will happily spend the time implementing it, but if I implement it and then you simply close the PR because you are not willing to add it, then that would be a waste of my time. I don't need assurances that you will merge any PR related to this, I do would like to have an indication if you think this would be a sensible feature to add. |
I have added the enhancement you have requested, even there is not a lot of demand on it! You can use the latest snapshot to validate it. |
…ying a Human readable group name. Fixes #1596
@bnasslahsen Thank you very much. I tested it with my case and it works perfectly. |
We are migrating from using the Swagger Maven plugin to SpringDoc. We had our custom grouping solution for being able to handle multiple API definitions. In our own custom Swagger UI setup, we show these different groups in a list. This is similar to how SpringDoc does this as well for its Swagger UI implementation.
However in our solution we allow the user to define the group identifier as well as a group display title. With SpringDoc we only have the
group
property in theGroupedOpenApi
class, and we currently utilise it as both the identifier and the title, which is sub optimal as this then is both the identifier and the title. If a user would change it, because they want a nicer looking group name, they would inadvertently also change the identity of the group.I propose we add a property (e.g.
title
,displayName
or something similar) to theGroupedOpenApi
that allows defining the human title of the group.An alternative we considered is to extract the
title
from theOpenAPI
Info
object, and use it as the group title. However we believe they serve different purposes. For instance, the group title might need to be a shorter variant of the OpenAPI definition title, so that the list on the Swagger UI is easier to read, without compromising on the more extensive title of the definition itself.If you agree with adding the property, I am willing to create a PR for it.
The text was updated successfully, but these errors were encountered: