Annotation Interface Operation


@Target(METHOD) @Retention(RUNTIME) @Inherited public @interface Operation
Describes a single API operation on a path.
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Allows an operation to be marked as deprecated.
    A verbose description of the operation behaviour.
    List of extensions to be added to the Operation model corresponding to the containing annotation.
    boolean
    Allows this operation to be marked as hidden
    Unique string used to identify the operation.
    Provides a brief description of what this operation does.
  • Element Details

    • summary

      String summary
      Provides a brief description of what this operation does.
      Returns:
      a summary of this operation
      Default:
      ""
    • description

      String description
      A verbose description of the operation behaviour. CommonMark syntax MAY be used for rich text representation.
      Returns:
      a description of this operation
      Default:
      ""
    • operationId

      String operationId
      Unique string used to identify the operation. The id MUST be unique among all operations described in the API.

      Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.

      Returns:
      the ID of this operation
      Default:
      ""
    • deprecated

      boolean deprecated
      Allows an operation to be marked as deprecated. Alternatively use the @Deprecated annotation.

      Consumers SHOULD refrain from usage of a deprecated operation.

      Returns:
      whether or not this operation is deprecated
      Default:
      false
    • hidden

      boolean hidden
      Allows this operation to be marked as hidden
      Returns:
      whether or not this operation is hidden
      Default:
      false
    • extensions

      Extension[] extensions
      List of extensions to be added to the Operation model corresponding to the containing annotation.
      Returns:
      array of extensions
      Since:
      3.1
      Default:
      {}