-
Notifications
You must be signed in to change notification settings - Fork 96
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
Micronaut for Spring Boot ignores path on @RestController #144
Comments
According to https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/bind/annotation/RestController.html The value of @RestController
@RequestMapping("/api/goodbyes") |
Sorry for the terrible example code, the problem is also there when using I've changed the example code, and the path is still being ignored. |
The example uses Micronaut 1.3.1 and Spring Boot 2.2.4.RELEASE. |
From the looks of this, it seems that Micronaut Spring turns Micronaut OpenAPI only considers the So the fix would be to also consider PRs welcome. |
In fact since Probably only |
I'll give it a try. Thanks for the feedback. |
…n the element's declaring type instead of Controller.
…n the element's declaring type instead of Controller.
…n the element's declaring type instead of Controller.
PR created: #150 |
The fix worked on my example project, that's at least something. Thanks for the pointers. |
…claring type instead of Controller. (#150)
@mikaelvik you can try the just release |
The release worked perfectly, thanks. Looking forward to the next final release of Micronaut. I'm not much of a blogger, but I'd be happy to contribute with a section to the docs. The idea is to use a separate source set for the openapi stuff to avoid leaking dependencies into the classpath of the Spring Boot application. |
@mikaelvik sounds good |
I've created an example project using Micronaut to generate OpenAPI yaml for a Spring Boot application.
Micronaut seems to ignore the path specified on
@RestController
annotations when generating the yaml file.The only Swagger annotation I've used is
@OpenAPIDefinition
on the Micronaut application class (and I'd like to keep it that way).Controller:
Excerpt from openapi.gradle (applied by build.gradle):
Application class:
Output:
The text was updated successfully, but these errors were encountered: