Annotation Interface Content


@Retention(RUNTIME) @Target({TYPE,FIELD,METHOD}) public @interface Content
What a response carries: the schema, and an example of it.

The media type is not here — it is the handler's, declared with @Produces and JSON when nothing says otherwise. A response with no schema, and no return type to infer one from, is documented without a body.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
     
    One example body, shown beside the schema.
     
  • Element Details

    • schema

      Class<?> schema
      Default:
      java.lang.Void.class
    • array

      boolean array
      Default:
      false
    • example

      String example
      One example body, shown beside the schema.
      Default:
      ""