Bug Report Checklist
Description
v7.17.0 includes #22169 for the jaxrs-spec generator which "disable[s] generating RootResource and RootApplication if generating interfaces, since these files make no sense in the context of generating interface". However I would argue that they do, because while I am using interfaceOnly and providing my own API implementations, those could still take advantage of the @ApplicationPath annotation on the RestApplication class to provide a common base path for the @Path annotations on the interfaces. In fact, when this feature was originally introduced in #13377, a similar setup was explicitly discussed.
In v7.17.0 when using interfaceOnly, the context path is no longer prepended to resources (or even available for programmatic access), causing 404 errors.
openapi-generator version
v7.17.0
Steps to reproduce
- Use jaxrs-spec generator with
interfaceOnly=true
- Generate code with v7.17.0
- Try to use generated interfaces in RESTEasy Quarkus application
- Observe 404 errors for endpoints
Related issues/PRs
Suggest a fix
Either bring back RestApplication and RestResourceRoot, or provide an option to prepend the context path to the interfaces' @Path annotation.
Bug Report Checklist
Description
v7.17.0 includes #22169 for the
jaxrs-specgenerator which "disable[s] generating RootResource and RootApplication if generating interfaces, since these files make no sense in the context of generating interface". However I would argue that they do, because while I am usinginterfaceOnlyand providing my own API implementations, those could still take advantage of the@ApplicationPathannotation on theRestApplicationclass to provide a common base path for the@Pathannotations on the interfaces. In fact, when this feature was originally introduced in #13377, a similar setup was explicitly discussed.In v7.17.0 when using
interfaceOnly, the context path is no longer prepended to resources (or even available for programmatic access), causing 404 errors.openapi-generator version
v7.17.0
Steps to reproduce
interfaceOnly=trueRelated issues/PRs
Suggest a fix
Either bring back
RestApplicationandRestResourceRoot, or provide an option to prepend the context path to the interfaces'@Pathannotation.