A pair of functions, one to encode a value of type T
to a raw value of type R
,
and another one to decode.
A pair of functions, one to encode a value of type T
to a raw value of type R
,
and another one to decode.
Also contains meta-data on the schema
of the value, the media type and the raw value type.
Type of the values which can be encoded / to which raw values can be decoded.
The media type of encoded values.
Type of the raw value to which values are encoded.
A codec which can encode to multiple (0..n) raw values / decode from multiple raw values.
A codec which can encode to multiple (0..n) raw values / decode from multiple raw values. An multiple raw value specifies that the raw values should be included in the output multiple times. Depending on the codec, decoding from a multiple value might yield DecodeResult.Missing or DecodeResult.Multiple.
Should be used for inputs/outputs which allow multiple values.
A codec which can encode to optional raw values / decode from optional raw values.
A codec which can encode to optional raw values / decode from optional raw values. An optional raw value specifies if the raw value should be included in the output, or not. Depending on the codec, decoding from an optional value might yield DecodeResult.Missing.
Should be used for inputs/outputs which allow optional values.
Input parameter types.
Error output parameter types.
Output parameter types.
The type of streams that are used by this endpoint's inputs/outputs. Nothing
, if no streams are used.
Mixin containing aliases for top-level types and modules in the tapir package.
An empty output.
An empty output. Useful if one of oneOf
branches should be mapped to the status code only.
Extract a value from a server request.
Extract a value from a server request. This input is only used by server interpreters, it is ignored by documentation interpreters and the provided value is discarded by client interpreters.
Maps status codes to outputs.
Maps status codes to outputs. All outputs must have a common supertype (I
). Typically, the supertype is a sealed
trait, and the mappings are implementing cases classes.
Note that exhaustiveness of the mappings is not checked (that all subtypes of I
are covered).