Annotation Type Tag


@Documented @Retention(RUNTIME) public @interface Tag
Swagger tag annotation.

Allows adding meta data to a single tag that is used by the Swagger Operation Object. It is not mandatory to have a Tag Object per tag used there.

Used to populate the auto-generated Swagger documentation and UI for server-side @Rest-annotated classes.

Example:

// A response object thats a hex-encoded string @Rest( swagger=@Swagger{ tags={ @Tag( name="utility", description="Utility methods" ) } } )

See Also:
  • Element Details

    • description

      description field of the Swagger Tag Object.
      Notes:
      • The format is a Swagger object.
        Multiple lines are concatenated with newlines.
      • Supports SVL Variables (e.g. "$L{my.localized.variable}") for the swagger generator.
      Returns:
      The annotation value.
      Default:
      {}
    • externalDocs

      externalDocs field of the Swagger Tag Object.
      Notes:
      • The format is a Swagger object.
        Multiple lines are concatenated with newlines.
      Returns:
      The annotation value.
      Default:
      @org.apache.juneau.annotation.ExternalDocs
    • name

      name field of the Swagger Tag Object.
      Notes:
      • The format is plain text.
      Returns:
      The annotation value.
      Default:
      ""