Skip to content

[BUG] Breaking change in v7.17.0: missing RestApplication class #22543

@chromey

Description

@chromey

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
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
  1. Use jaxrs-spec generator with interfaceOnly=true
  2. Generate code with v7.17.0
  3. Try to use generated interfaces in RESTEasy Quarkus application
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions