JsonOpenApiResponse: {
    cls?: Newable<unknown>;
    description?: string;
    isArray?: boolean;
    status?: HttpStatus;
    type: "json";
}

Descriptor for a JSON response in OpenAPI:

  • type: 'json'
  • optional HTTP status, description
  • cls: constructor for response payload mapping
  • isArray: indicates array payload.

Type declaration

  • Optionalcls?: Newable<unknown>

    Constructor function to map the JSON payload to a class instance.

  • Optionaldescription?: string

    Human-readable description of the JSON response.

  • OptionalisArray?: boolean

    If true, indicates the response payload is an array of items.

  • Optionalstatus?: HttpStatus

    HTTP status code to use for the JSON response.

  • type: "json"

    Constant identifier for a JSON response.