Hi all, I can't seem to wrap my head around gettin...
# spring
a
Hi all, I can't seem to wrap my head around getting Springdoc to work with my Kotlin Spring Boot app that uses the function DSL to register beans and routes. (There are no Bean, Service, etc annotations) Does anyone have an example on how to get this to work? I have tried putting the RouterOperation annotation on the handler methods, but the swagger ui still comes up empty.
t
Are you bringing in the
springdoc-openapi-kotlin
dependency?
a
yes, as well as the
springdoc-openapi-security
dependency
t
and
springdoc-openapi-ui
?
or
springdoc-openapi-webmvc-core
if you don’t want swagger-ui
a
yes, the
springdoc-openapi-ui
is added (3 packages altogether)
t
What does your RouterFunction with the @RouterOperation look like? I’m not super familiar with this, but here are a bunch of caveats: https://springdoc.org/#spring-webfluxwebmvc-fn-with-functional-endpoints
Like if it’s not a single route or not, is it using the beanClass and beanMethod, if using @Operation is the operationId set
It’s using the @Bean annotation, which it sounds like you are not using in favor of the Kotlin DSL bean functional stuff
a
correct, I'm not using the annotations, which is what I'm struggling with...
t
right
so maybe you’ll have to use GroupedOpenApi
a
I did try and add that at one point, and it created a group for me, but wouldn't add any endpoints
t
a
essentially, yes