You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After running ./gradlew compileJava Swagger yaml has path as /{userId} instead of /user/{userId}.
This can be fixed in OpenAPI with: asodja/micronaut-openapi@3d69c56.
From this fix it seems that @Controller is correctly applied by JaxRsTypeElementVisitor but UriMapping is not accesible. So this looks to me like it is micronaut-core issue.
Task List
Steps to reproduce provided
Stacktrace (if present) provided
Example that reproduces the problem uploaded to Github
Full description of the issue provided (see below)
When mapping annotations with custom TypeElementVisitor
AliasFor
annotations are not seen to other Visitors.For example JaxRsTypeElementVisitor maps
@javax.ws.rs.Path
to@Controller
.@Controller
has AliasFor(annotation = UriMapping.class, member = "value"). But this UriMapping is then not visible to OpenAPI Visitor. Example project is provided in https://github.com/asodja/micronaut-type-visitor-issue.In example we have TestController.java:
@Path("/user")
on class@Path("/{userId}")
on methodAfter running
./gradlew compileJava
Swagger yaml has path as/{userId}
instead of/user/{userId}
.This can be fixed in OpenAPI with:
asodja/micronaut-openapi@3d69c56.
From this fix it seems that
@Controller
is correctly applied by JaxRsTypeElementVisitor but UriMapping is not accesible. So this looks to me like it is micronaut-core issue.Task List
Steps to Reproduce
Expected Behaviour
Swagger yaml contains path
/user/{userId}
Actual Behaviour
Swagger yaml contains path
/{userId}
Environment Information
Example Application
https://github.com/asodja/micronaut-type-visitor-issue
The text was updated successfully, but these errors were encountered: