Skip to content

Allow scanning of non-annotated JAX-RS Resources #489

Closed
@fehguy

Description

@fehguy

Some people want to enable resources for any JAX-RS resource, even if not annotated with Swagger-specific annotations. This can be done, but has some notable limitations:

  • The Response type is extremely hard to interpret. For instance, many users will return a Response object which is not bound to a specific type. In these cases, it's impossible to introspect the return value. In addition, because of type erasure, it may not be possible to detect the correct response even if set in the method
  • The notes, description, apiResponses, and enum fields on params are not possible
  • It will need to be made explicit to exclude scanning paths when generating the json
  • It may not be possible to detect the api-docs (Listing Resource) and exclude it manually. Thus it will probably need to be excluded manually (above)

There are more limitations, but the benefits outweigh these, so it should be a configuration to enable non-annotated scanning of resources.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions