Skip to content

Possibility to put all related Microprofile-Annotations into Bundles #672

Description

@funkrusher

As seen in the following Stackoverflow-Question the Annotations could become very big and make it hard to see the REST-Endpoint-.Code:

For this reason (amon other reasons) it would be helpful to let the developer create "Bundles" where he can collect all relevant Annotations.

For many Annotations this is already possible. For example: The APIResponse and Parameter Annotation can be bundled together in a Meta-Annotation, that the developer creates himself for his project / his requirements. For example:

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@APIResponses(value = {
    @APIResponse(responseCode = "200", description = "Request Successful"),
    @APIResponse(responseCode = "500", description = "Server unavailable")
})
public @interface GetApiResponses {
}

For following Annotations this is not possible though, which makes this approach not good enough to be fully usable (for all cases):

  • @Operation
  • @RequestBody

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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