-
Notifications
You must be signed in to change notification settings - Fork 940
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
Unable to group #1609
Comments
Must be a feature of the specific library. |
It is a common scenario that there are multiple system interfaces for the same Laravel. Generally, we provide different interfaces to third-party partners, apps, operation backgrounds, etc., and there will be different prefix routes depending on the situation. How should we provide documents for this scenario? Putting them directly in one document will be bloated because they do not need interfaces with different routes. In spring, we will directly use the grouping method. |
Fair enough, that is roughly what I thought the reason might be. Ah, I missed that dropdown - never seen that before. So far the only way I knew of is using tags. So, my question again - how does this grouping look like in the actual generated Yaml/Json if it is not tags? I just checked out the latest swagger-ui and I cannot see the dropdown at all...? |
If you use tags, they will still be displayed on the same page, so that no matter which system's APIs are, they will be displayed together, which is not appropriate. At present, I have simply checked the source code, and it seems that multiple documents can be generated, but they cannot be switched like groups, and there is no relevant document that mentions how to generate multiple documents. |
Could you please post a sample of a document that contains that grouping you want? I think we need to work backwards from that. Maybe this is a custom extension of the Spring library? |
He generates multiple json files based on the group name, and then when switching in the UI, it will jump to different json. As I mentioned earlier, l5-swagger also has this implementation, but it seems not perfect? |
For example, if there are these two configuration methods in spring, two api-docs will be generated. GroupedOpenApi.builder().group("starcore-partner").pathsToMatch("/api/**") GroupedOpenApi.builder().group("starcore-partner2").pathsToMatch("/api/**") |
Ok, I think I have it:
I guess the selector is out of scope (good) 😄, the grouping could be a feature (also good). |
Well, for example, if there are multiple configurations, multiple docs can be generated by default, and when there are multiple, the top bar becomes a selector or something like that. We usually create different routes based on different API systems, and different routes have their own prefixes. It is very useful to be able to generate different documents based on prefixes, and I am looking forward to seeing such a feature in future versions. |
I searched through the documentation but couldn't find a way to implement the method shown in the figure. In Java, you can add groups by
The text was updated successfully, but these errors were encountered: