-
Notifications
You must be signed in to change notification settings - Fork 78
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
Allow for declaration of multiple co-existing AsyncAPIs #805
Comments
Welcome to Springwolf. Thanks a lot for reporting your first issue. Please check out our contributors guide and feel free to join us on discord. |
Hi @Sheldoras, Great suggestion. A couple questions for understanding:
|
Hi @timonback, thanks for considering this!
If you have any other question I'm happy to answer them! |
The change is staged for release and will be part of the next release. If you want to try and verify it in your application today, Thank you for the report/contribution! |
Hi @Sheldoras , The group can be configured in More details about the configuration at https://github.com/springwolf/springwolf-core/blob/master/springwolf-core/src/main/java/io/github/springwolf/core/configuration/properties/SpringwolfConfigProperties.java#L202 (only one of the filters (regex pattern) can be used) Also, the group can be selected as part of the ui via settings button in the header. Does this address your use-case? What is still missing? We are looking forward to your feedback. |
Hi @timonback, One very prominent question from our specific use-case would be: Is it also possible to define those groups programmatically (as I did it in the Springdoc example in my initial post)? I currently did it via properties as it was done in your example and it works!
Springdoc offers this generic customizer hook here. Have you thought about adding something like this? Thanks again for looking into this! I'll be sure to try it out some more! |
Hi @Sheldoras, awesome! Grouping is a feature that can develop a high complexity quickly while requiring stable apis. This is the reason we went with property based configuration first. To understand further, do you declare group dynamically or dynamically modify a grouped AsyncApi? I could imagine a group specific AsyncAPI customizer as a public interface - in addition to the current interface. |
Hello @timonback ! What the current solution lacks that we would need is the ability to make these "arbitrary" changes to the spec (add extension fields, change the version field etc). So any possibility, as the one you already mentioned, to make group-specific adjustments to the spec would work for us! Thanks! |
Hi @Sheldoras, We are still working on it (#1093), but here is the preview: springwolf.docket.group-configs[0].group=Only Vehicles
springwolf.docket.group-configs[0].info.description=This group only contains endpoints that are related to vehicles.
springwolf.docket.group-configs[0].info.extension-fields.x-apitype=internal Does this solve your request:
|
Describe the feature request
Currently Springwolf only allows for one AsyncAPI document to be provided by a service. The only limiting option about 'which' channels/operations etc go into said AsyncAPI specification is the
base-package
property.Looking at other tools (Springdoc for OpenAPI spec generation for example) they allow for multiple OpenAPI specs to be declared in parallel (say one spec for version 1.0.0 and one for 2.0.0 which are simultaneously supported by a service). It is also possible to filter more finely which endpoints (in the case of OpenAPI) go into which OpenAPI specification.
Motivation
If a service wants to support different AsyncAPI versions in parallel, it would be beneficial if two (or more) distinct specifications could be configured, each including only its relevant channels/operations/schemas.
Technical details
With Springdoc and OpenAPI this declaration can look like so:
Something equivalent for providing multiple AsyncAPI specifications per service would be fantastic
The text was updated successfully, but these errors were encountered: