Responses

zio.blocks.openapi.Responses
See theResponses companion object
final case class Responses(responses: ChunkMap[String, ReferenceOr[Response]] = ..., default: Option[ReferenceOr[Response]] = ..., extensions: ChunkMap[String, Json] = ...)

A container for the expected responses of an operation. The container maps a HTTP response code to the expected response.

The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors.

The default MAY be used as a default response object for all HTTP codes that are not covered individually by the Responses Object.

Value parameters

default

The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses.

extensions

Specification extensions (x-* fields). These allow adding additional properties beyond the standard OpenAPI fields.

responses

A map of HTTP status codes to Response objects. The key is the HTTP status code as a string (e.g. "200", "404", "4XX"). The value is a Response or Reference.

Attributes

Companion
object
Source
OpenAPI.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala