Annotation Type Items


@Documented @Retention(RUNTIME) public @interface Items
Swagger items annotation.

A limited subset of JSON-Schema's items object.

Used to populate the auto-generated Swagger documentation and UI for server-side @Rest-annotated classes.
Also used to define OpenAPI schema information for POJOs serialized through OpenApiSerializer and parsed through OpenApiParser.

Examples:

// Items have a specific set of enumerated string values @Query( name="status", schema=@Schema( type="array", collectionFormat="csv", items=@Items( type="string", _enum="AVAILABLE,PENDING,SOLD", _default="AVAILABLE" ) ) )

// An array of arrays, the internal array being of type integer, numbers must be between 0 and 63 (inclusive) @Query( name="status", schema=@Schema( type="array", collectionFormat="csv", items=@Items( type="array", items=@SubItems( type="integer", minimum="0", maximum="63" ) ) ) )

See Also: