Closed johnellinwood closed 1 year ago
To further clarify this. I'm just trying to add openapi details programmatically. I currently have annotations on my RouterFunctions and HandlerFunctions. But a lot of these are exactly the same except for operationId and return types, so I'm trying to create some generic functions to apply the openapi information to them. To do this, I need to use the programmatic openapi interface. The only way I can see to do this is with the org.springdoc.core.fn.builders.apiresponse.Builder api and somehow attach it to the RouterFunction. But i don't see any way to do that, since the methods in the examples don't exist in the latest spring webflux.
Hey, so I think this is a documentation issue. On the main springdoc page for the programmatic openapi feature, you should point out that the route()
method in your example is not the normal route()
method from functional spring webflux routing. Looking more closely at the example code and javadocs, I see you have a [SpringdocRouteBuilder.route()](https://javadoc.io/static/org.springdoc/springdoc-openapi-webflux-core/1.6.6/org/springdoc/webflux/core/fn/SpringdocRouteBuilder.html#route()) that is completely different than the normal spring RouterFunctions.route() method that people are used to calling.
The fact these are different methods isn't mentioned in your documentation, and since you do a static import in the example code, it was really easy to miss.
@johnellinwood,
If you have bugs in the documentation, please feel free to update directly the related .adoc
files.
closed as no activity
Edit: This is just a documentation fix. On the main springdoc page for the programmatic openapi feature, you should point out that the route() method in your example is not the normal route() method from functional spring webflux routing. Looking more closely at the example code and javadocs, I see you have a [SpringdocRouteBuilder.route()](https://javadoc.io/static/org.springdoc/springdoc-openapi-webflux-core/1.6.6/org/springdoc/webflux/core/fn/SpringdocRouteBuilder.html#route()) that is completely different than the normal spring RouterFunctions.route() method that people are used to calling.
The fact these are different methods isn't mentioned in your documentation, and since you do a static import in the example code, it was really easy to miss.
Original:
Describe the bug You can't create a RouterFunction with programmatic openapi details
like the documentation says here.
To Reproduce Steps to reproduce the behavior:
Expected behavior
Additional context