Endpoint

zio.http.endpoint.Endpoint
See theEndpoint companion object
final case class Endpoint[PathInput, Input, Err, Output, Auth <: AuthType](route: RoutePattern[PathInput], input: HttpCodec[RequestType, Input], output: HttpCodec[ResponseType, Output], error: HttpCodec[ResponseType, Err], codecError: HttpCodec[ResponseType, HttpCodecError], documentation: Doc, authType: Auth) extends EndpointPlatformSpecific[PathInput, Input, Err, Output, Auth]

An zio.http.endpoint.Endpoint represents an API endpoint for the HTTP protocol. Every API has an input, which comes from a combination of the HTTP route, query string parameters, and headers, and an output, which is the data computed by the handler of the API.

MiddlewareInput : Example: A subset of HttpCodec[Input] that doesn't give access to Input MiddlewareOutput: Example: A subset of Out[Output] that doesn't give access to Output Input: Example: Int Output: Example: User

As zio.http.endpoint.Endpoint is a purely declarative encoding of an endpoint, it is possible to use this model to generate a zio.http.Route (by supplying a handler for the endpoint), to generate OpenAPI documentation, to generate a type-safe Scala client for the endpoint, and possibly, to generate client libraries in other programming languages.

Attributes

Companion
object
Source
Endpoint.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait EndpointPlatformSpecific[PathInput, Input, Err, Output, Auth]
class Object
trait Matchable
class Any
Show all
Self type
Endpoint[PathInput, Input, Err, Output, Auth]

Members list

Type members

Types

type AuthedInput = authCombiner.Out

Attributes

Source
Endpoint.scala

Value members

Concrete methods

def ??(that: Doc): Endpoint[PathInput, Input, Err, Output, Auth]

Returns a new API that is derived from this one, but which includes additional documentation that will be included in OpenAPI generation.

Returns a new API that is derived from this one, but which includes additional documentation that will be included in OpenAPI generation.

Attributes

Source
Endpoint.scala
def alternatives: Chunk[(Endpoint[PathInput, Input, Err, Output, Auth], Condition)]

Flattens out this endpoint to a chunk of alternatives. Each alternative is guaranteed to not have any alternatives itself.

Flattens out this endpoint to a chunk of alternatives. Each alternative is guaranteed to not have any alternatives itself.

Attributes

Source
Endpoint.scala
def apply(input: Input): Invocation[PathInput, Input, Err, Output, Auth]

Attributes

Source
Endpoint.scala
def apply[A, B](a: A, b: B)(implicit ev: (A, B) <:< Input): Invocation[PathInput, Input, Err, Output, Auth]

Attributes

Source
Endpoint.scala
def apply[A, B, C](a: A, b: B, c: C)(implicit ev: (A, B, C) <:< Input): Invocation[PathInput, Input, Err, Output, Auth]

Attributes

Source
Endpoint.scala
def apply[A, B, C, D](a: A, b: B, c: C, d: D)(implicit ev: (A, B, C, D) <:< Input): Invocation[PathInput, Input, Err, Output, Auth]

Attributes

Source
Endpoint.scala
def apply[A, B, C, D, E](a: A, b: B, c: C, d: D, e: E)(implicit ev: (A, B, C, D, E) <:< Input): Invocation[PathInput, Input, Err, Output, Auth]

Attributes

Source
Endpoint.scala
def apply[A, B, C, D, E, F](a: A, b: B, c: C, d: D, e: E, f: F)(implicit ev: (A, B, C, D, E, F) <:< Input): Invocation[PathInput, Input, Err, Output, Auth]

Attributes

Source
Endpoint.scala
def apply[A, B, C, D, E, F, G](a: A, b: B, c: C, d: D, e: E, f: F, g: G)(implicit ev: (A, B, C, D, E, F, G) <:< Input): Invocation[PathInput, Input, Err, Output, Auth]

Attributes

Source
Endpoint.scala
def apply[A, B, C, D, E, F, G, H](a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H)(implicit ev: (A, B, C, D, E, F, G, H) <:< Input): Invocation[PathInput, Input, Err, Output, Auth]

Attributes

Source
Endpoint.scala
def apply[A, B, C, D, E, F, G, H, I](a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I)(implicit ev: (A, B, C, D, E, F, G, H, I) <:< Input): Invocation[PathInput, Input, Err, Output, Auth]

Attributes

Source
Endpoint.scala
def apply[A, B, C, D, E, F, G, H, I, J](a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J)(implicit ev: (A, B, C, D, E, F, G, H, I, J) <:< Input): Invocation[PathInput, Input, Err, Output, Auth]

Attributes

Source
Endpoint.scala
def apply[A, B, C, D, E, F, G, H, I, J, K](a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J, k: K)(implicit ev: (A, B, C, D, E, F, G, H, I, J, K) <:< Input): Invocation[PathInput, Input, Err, Output, Auth]

Attributes

Source
Endpoint.scala
def apply[A, B, C, D, E, F, G, H, I, J, K, L](a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J, k: K, l: L)(implicit ev: (A, B, C, D, E, F, G, H, I, J, K, L) <:< Input): Invocation[PathInput, Input, Err, Output, Auth]

Attributes

Source
Endpoint.scala
def auth[Auth0 <: AuthType](auth: Auth0): Endpoint[PathInput, Input, Err, Output, Auth0]

Sets the authentication type for this endpoint.

Sets the authentication type for this endpoint.

Attributes

Source
Endpoint.scala
def emptyErrorResponse: Endpoint[PathInput, Input, Err, Output, Auth]

Hides any details of codec errors from the user.

Hides any details of codec errors from the user.

Attributes

Source
Endpoint.scala
def examplesIn(examples: (String, Input)*): Endpoint[PathInput, Input, Err, Output, Auth]

Attributes

Source
Endpoint.scala
def examplesIn: Map[String, Input]

Attributes

Source
Endpoint.scala
def examplesOut(examples: (String, Output)*): Endpoint[PathInput, Input, Err, Output, Auth]

Attributes

Source
Endpoint.scala
def examplesOut: Map[String, Output]

Attributes

Source
Endpoint.scala
def header[A](codec: HeaderCodec[A])(implicit combiner: Combiner[Input, A]): Endpoint[PathInput, combiner.Out, Err, Output, Auth]

Returns a new endpoint that requires the specified headers to be present.

Returns a new endpoint that requires the specified headers to be present.

Attributes

Source
Endpoint.scala
def header[A](name: String)(implicit schema: Schema[A], combiner: Combiner[Input, A]): Endpoint[PathInput, combiner.Out, Err, Output, Auth]

Returns a new endpoint that requires the specified headers to be present.

Returns a new endpoint that requires the specified headers to be present.

Attributes

Source
Endpoint.scala
def header[A](implicit schema: Schema[A], combiner: Combiner[Input, A]): Endpoint[PathInput, combiner.Out, Err, Output, Auth]

Returns a new endpoint that requires the specified headers to be present.

Returns a new endpoint that requires the specified headers to be present.

Attributes

Source
Endpoint.scala
def implement[Env](f: Input => ZIO[Env, Err, Output])(implicit trace: Trace): Route[Env, Nothing]

Attributes

Source
Endpoint.scala
def implementAs(output: Output)(implicit trace: Trace): Route[Any, Nothing]

Attributes

Source
Endpoint.scala
def implementAsError(err: Err)(implicit trace: Trace): Route[Any, Nothing]

Attributes

Source
Endpoint.scala
def implementAsZIO[Env](output: ZIO[Env, Err, Output])(implicit trace: Trace): Route[Env, Nothing]

Attributes

Source
Endpoint.scala
def implementAsZIOScoped[Env, Env1](output: ZIO[Env, Err, Output])(implicit ev: Env <:< (Env1 & Scope), trace: Trace): Route[Env1, Nothing]

Attributes

Source
Endpoint.scala
def implementEither(f: Input => Either[Err, Output])(implicit trace: Trace): Route[Any, Nothing]

Attributes

Source
Endpoint.scala
def implementHandler[Env](original: Handler[Env, Err, Input, Output])(implicit trace: Trace): Route[Env, Nothing]

Attributes

Source
Endpoint.scala
def implementHandlerScoped[Env, Env1](original: Handler[Env, Err, Input, Output])(implicit ev: Env <:< (Env1 & Scope), trace: Trace): Route[Env1, Nothing]

Attributes

Source
Endpoint.scala
def implementPurely(f: Input => Output)(implicit trace: Trace): Route[Any, Nothing]

Attributes

Source
Endpoint.scala
def implementScoped[Env, Env1](f: Input => ZIO[Env, Err, Output])(implicit ev: Env <:< (Env1 & Scope), trace: Trace): Route[Env1, Nothing]

Attributes

Source
Endpoint.scala
def in[Input2 : HttpContentCodec](implicit evidence$1: HttpContentCodec[Input2], combiner: Combiner[Input, Input2]): Endpoint[PathInput, combiner.Out, Err, Output, Auth]

Returns a new endpoint derived from this one, whose request content must satisfy the specified schema.

Returns a new endpoint derived from this one, whose request content must satisfy the specified schema.

Attributes

Source
Endpoint.scala
def in[Input2 : HttpContentCodec](doc: Doc)(implicit evidence$1: HttpContentCodec[Input2], combiner: Combiner[Input, Input2]): Endpoint[PathInput, combiner.Out, Err, Output, Auth]

Returns a new endpoint derived from this one, whose request content must satisfy the specified schema and is documented.

Returns a new endpoint derived from this one, whose request content must satisfy the specified schema and is documented.

Attributes

Source
Endpoint.scala
def in[Input2 : HttpContentCodec](name: String)(implicit evidence$1: HttpContentCodec[Input2], combiner: Combiner[Input, Input2]): Endpoint[PathInput, combiner.Out, Err, Output, Auth]

Returns a new endpoint derived from this one, whose request content must satisfy the specified schema and is documented.

Returns a new endpoint derived from this one, whose request content must satisfy the specified schema and is documented.

Attributes

Source
Endpoint.scala
def in[Input2 : HttpContentCodec](name: String, doc: Doc)(implicit evidence$1: HttpContentCodec[Input2], combiner: Combiner[Input, Input2]): Endpoint[PathInput, combiner.Out, Err, Output, Auth]

Returns a new endpoint derived from this one, whose request content must satisfy the specified schema and is documented.

Returns a new endpoint derived from this one, whose request content must satisfy the specified schema and is documented.

Attributes

Source
Endpoint.scala
def in[Input2 : HttpContentCodec](mediaType: MediaType)(implicit evidence$1: HttpContentCodec[Input2], combiner: Combiner[Input, Input2]): Endpoint[PathInput, combiner.Out, Err, Output, Auth]

Attributes

Source
Endpoint.scala
def in[Input2 : HttpContentCodec](mediaType: MediaType, doc: Doc)(implicit evidence$1: HttpContentCodec[Input2], combiner: Combiner[Input, Input2]): Endpoint[PathInput, combiner.Out, Err, Output, Auth]

Attributes

Source
Endpoint.scala
def in[Input2 : HttpContentCodec](mediaType: MediaType, name: String)(implicit evidence$1: HttpContentCodec[Input2], combiner: Combiner[Input, Input2]): Endpoint[PathInput, combiner.Out, Err, Output, Auth]

Attributes

Source
Endpoint.scala
def in[Input2 : HttpContentCodec](mediaType: MediaType, name: String, doc: Doc)(implicit evidence$1: HttpContentCodec[Input2], combiner: Combiner[Input, Input2]): Endpoint[PathInput, combiner.Out, Err, Output, Auth]

Attributes

Source
Endpoint.scala
def inCodec[Input2](codec: HttpCodec[RequestType, Input2])(implicit combiner: Combiner[Input, Input2]): Endpoint[PathInput, combiner.Out, Err, Output, Auth]

Returns a new endpoint derived from this one, whose request must satisfy the specified codec.

Returns a new endpoint derived from this one, whose request must satisfy the specified codec.

Attributes

Source
Endpoint.scala
def inForm[Input2](implicit schema: Schema[Input2], combiner: Combiner[Input, Input2]): Endpoint[PathInput, combiner.Out, Err, Output, Auth]

Returns a new endpoint derived from this one, whose request content is decoded from application/x-www-form-urlencoded data using a zio-schema zio.schema.Schema.

Returns a new endpoint derived from this one, whose request content is decoded from application/x-www-form-urlencoded data using a zio-schema zio.schema.Schema.

Attributes

Source
Endpoint.scala
def inForm[Input2](doc: Doc)(implicit schema: Schema[Input2], combiner: Combiner[Input, Input2]): Endpoint[PathInput, combiner.Out, Err, Output, Auth]

Returns a new endpoint derived from this one, whose request content is decoded from application/x-www-form-urlencoded data using a zio-schema zio.schema.Schema and is documented.

Returns a new endpoint derived from this one, whose request content is decoded from application/x-www-form-urlencoded data using a zio-schema zio.schema.Schema and is documented.

Attributes

Source
Endpoint.scala
def inStream[Input2 : HttpContentCodec](implicit evidence$1: HttpContentCodec[Input2], combiner: Combiner[Input, ZStream[Any, Nothing, Input2]]): Endpoint[PathInput, combiner.Out, Err, Output, Auth]

Returns a new endpoint derived from this one, whose input type is a stream of the specified typ.

Returns a new endpoint derived from this one, whose input type is a stream of the specified typ.

Attributes

Source
Endpoint.scala
def inStream[Input2 : HttpContentCodec](doc: Doc)(implicit evidence$1: HttpContentCodec[Input2], combiner: Combiner[Input, ZStream[Any, Nothing, Input2]]): Endpoint[PathInput, combiner.Out, Err, Output, Auth]

Returns a new endpoint derived from this one, whose input type is a stream of the specified type and is documented.

Returns a new endpoint derived from this one, whose input type is a stream of the specified type and is documented.

Attributes

Source
Endpoint.scala
def inStream[Input2 : HttpContentCodec](name: String)(implicit evidence$1: HttpContentCodec[Input2], combiner: Combiner[Input, ZStream[Any, Nothing, Input2]]): Endpoint[PathInput, combiner.Out, Err, Output, Auth]

Returns a new endpoint derived from this one, whose input type is a stream of the specified type.

Returns a new endpoint derived from this one, whose input type is a stream of the specified type.

Attributes

Source
Endpoint.scala
def inStream[Input2 : HttpContentCodec](name: String, doc: Doc)(implicit evidence$1: HttpContentCodec[Input2], combiner: Combiner[Input, ZStream[Any, Nothing, Input2]]): Endpoint[PathInput, combiner.Out, Err, Output, Auth]

Returns a new endpoint derived from this one, whose input type is a stream of the specified type and is documented.

Returns a new endpoint derived from this one, whose input type is a stream of the specified type and is documented.

Attributes

Source
Endpoint.scala
transparent inline def orOut[Output2 <: Res : HttpContentCodec](implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[Output2, Output]): Endpoint[PathInput, Input, Err, Res, Auth]
Extension method from zio.http.endpoint

Attributes

Source
extensions.scala
transparent inline def orOut[Output2 <: Res : HttpContentCodec](doc: Doc)(implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[Output2, Output]): Endpoint[PathInput, Input, Err, Res, Auth]
Extension method from zio.http.endpoint

Attributes

Source
extensions.scala
transparent inline def orOut[Output2 <: Res : HttpContentCodec](mediaType: MediaType)(implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[Output2, Output]): Endpoint[PathInput, Input, Err, Res, Auth]
Extension method from zio.http.endpoint

Attributes

Source
extensions.scala
transparent inline def orOut[Output2 <: Res : HttpContentCodec](status: Status)(implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[Output2, Output]): Endpoint[PathInput, Input, Err, Res, Auth]
Extension method from zio.http.endpoint

Attributes

Source
extensions.scala
transparent inline def orOut[Output2 <: Res : HttpContentCodec](status: Status, doc: Doc)(implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[Output2, Output]): Endpoint[PathInput, Input, Err, Res, Auth]
Extension method from zio.http.endpoint

Attributes

Source
extensions.scala
transparent inline def orOut[Output2 <: Res : HttpContentCodec](mediaType: MediaType, doc: Doc)(implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[Output2, Output]): Endpoint[PathInput, Input, Err, Res, Auth]
Extension method from zio.http.endpoint

Attributes

Source
extensions.scala
transparent inline def orOut[Output2 <: Res : HttpContentCodec](status: Status, mediaType: MediaType, doc: Doc)(implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[Output2, Output]): Endpoint[PathInput, Input, Err, Res, Auth]
Extension method from zio.http.endpoint

Attributes

Source
extensions.scala
transparent inline def orOut[Output2 <: Res : HttpContentCodec](status: Status, mediaType: MediaType)(implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[Output2, Output]): Endpoint[PathInput, Input, Err, Res, Auth]
Extension method from zio.http.endpoint

Attributes

Source
extensions.scala
transparent inline def orOutCodec[Output2 <: Res](codec: HttpCodec[ResponseType, Output2])(implicit alt: Alternator[Output2, Output]): Endpoint[PathInput, Input, Err, Res, Auth]
Extension method from zio.http.endpoint

Attributes

Source
extensions.scala
transparent inline def orOutError[Err2 <: ErrorRes : HttpContentCodec](status: Status)(implicit evidence$1: HttpContentCodec[Err2], alt: Alternator[Err2, Err]): Endpoint[PathInput, Input, ErrorRes, Output, Auth]
Extension method from zio.http.endpoint

Attributes

Source
extensions.scala
transparent inline def orOutError[Err2 <: ErrorRes : HttpContentCodec](status: Status, doc: Doc)(implicit evidence$1: HttpContentCodec[Err2], alt: Alternator[Err2, Err]): Endpoint[PathInput, Input, ErrorRes, Output, Auth]
Extension method from zio.http.endpoint

Attributes

Source
extensions.scala
def out[Output2 : HttpContentCodec](implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[Output2, Output]): Endpoint[PathInput, Input, Err, alt.Out, Auth]

Returns a new endpoint derived from this one, whose output type is the specified type for the ok status code.

Returns a new endpoint derived from this one, whose output type is the specified type for the ok status code.

Attributes

Source
Endpoint.scala
def out[Output2 : HttpContentCodec](doc: Doc)(implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[Output2, Output]): Endpoint[PathInput, Input, Err, alt.Out, Auth]

Returns a new endpoint derived from this one, whose output type is the specified type for the ok status code and is documented.

Returns a new endpoint derived from this one, whose output type is the specified type for the ok status code and is documented.

Attributes

Source
Endpoint.scala
def out[Output2 : HttpContentCodec](mediaType: MediaType)(implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[Output2, Output]): Endpoint[PathInput, Input, Err, alt.Out, Auth]

Returns a new endpoint derived from this one, whose output type is the specified type for the ok status code.

Returns a new endpoint derived from this one, whose output type is the specified type for the ok status code.

Attributes

Source
Endpoint.scala
def out[Output2 : HttpContentCodec](status: Status)(implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[Output2, Output]): Endpoint[PathInput, Input, Err, alt.Out, Auth]

Returns a new endpoint derived from this one, whose output type is the specified type for the specified status code.

Returns a new endpoint derived from this one, whose output type is the specified type for the specified status code.

Attributes

Source
Endpoint.scala
def out[Output2 : HttpContentCodec](status: Status, doc: Doc)(implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[Output2, Output]): Endpoint[PathInput, Input, Err, alt.Out, Auth]

Returns a new endpoint derived from this one, whose output type is the specified type for the specified status code and is documented.

Returns a new endpoint derived from this one, whose output type is the specified type for the specified status code and is documented.

Attributes

Source
Endpoint.scala
def out[Output2 : HttpContentCodec](mediaType: MediaType, doc: Doc)(implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[Output2, Output]): Endpoint[PathInput, Input, Err, alt.Out, Auth]

Returns a new endpoint derived from this one, whose output type is the specified type for the ok status code and is documented.

Returns a new endpoint derived from this one, whose output type is the specified type for the ok status code and is documented.

Attributes

Source
Endpoint.scala
def out[Output2 : HttpContentCodec](status: Status, mediaType: MediaType, doc: Doc)(implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[Output2, Output]): Endpoint[PathInput, Input, Err, alt.Out, Auth]

Returns a new endpoint derived from this one, whose output type is the specified type for the specified status code and is documented.

Returns a new endpoint derived from this one, whose output type is the specified type for the specified status code and is documented.

Attributes

Source
Endpoint.scala
def out[Output2 : HttpContentCodec](status: Status, mediaType: MediaType)(implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[Output2, Output]): Endpoint[PathInput, Input, Err, alt.Out, Auth]

Returns a new endpoint derived from this one, whose output type is the specified type for the specified status code.

Returns a new endpoint derived from this one, whose output type is the specified type for the specified status code.

Attributes

Source
Endpoint.scala
def outCodec[Output2](codec: HttpCodec[ResponseType, Output2])(implicit alt: Alternator[Output2, Output]): Endpoint[PathInput, Input, Err, alt.Out, Auth]

Returns a new endpoint derived from this one, whose response must satisfy the specified codec.

Returns a new endpoint derived from this one, whose response must satisfy the specified codec.

Attributes

Source
Endpoint.scala
def outCodecError(codec: HttpCodec[ResponseType, HttpCodecError]): Endpoint[PathInput, Input, Err, Output, Auth]

Converts a codec error into a specific error type. The given media types are sorted by q-factor. Beginning with the highest q-factor.

Converts a codec error into a specific error type. The given media types are sorted by q-factor. Beginning with the highest q-factor.

Attributes

Source
Endpoint.scala
def outError[Err2 : HttpContentCodec](status: Status)(implicit evidence$1: HttpContentCodec[Err2], alt: Alternator[Err2, Err]): Endpoint[PathInput, Input, alt.Out, Output, Auth]

Returns a new endpoint that can fail with the specified error type for the specified status code.

Returns a new endpoint that can fail with the specified error type for the specified status code.

Attributes

Source
Endpoint.scala
def outError[Err2 : HttpContentCodec](status: Status, doc: Doc)(implicit evidence$1: HttpContentCodec[Err2], alt: Alternator[Err2, Err]): Endpoint[PathInput, Input, alt.Out, Output, Auth]

Returns a new endpoint that can fail with the specified error type for the specified status code and is documented.

Returns a new endpoint that can fail with the specified error type for the specified status code and is documented.

Attributes

Source
Endpoint.scala
def outError[Err2 : HttpContentCodec](status: Status, mediaType: MediaType)(implicit evidence$1: HttpContentCodec[Err2], alt: Alternator[Err2, Err]): Endpoint[PathInput, Input, alt.Out, Output, Auth]

Returns a new endpoint that can fail with the specified error type for the specified status code with a custom media type.

Returns a new endpoint that can fail with the specified error type for the specified status code with a custom media type.

Attributes

Source
Endpoint.scala
def outError[Err2 : HttpContentCodec](status: Status, mediaType: MediaType, doc: Doc)(implicit evidence$1: HttpContentCodec[Err2], alt: Alternator[Err2, Err]): Endpoint[PathInput, Input, alt.Out, Output, Auth]

Returns a new endpoint that can fail with the specified error type for the specified status code with a custom media type and is documented.

Returns a new endpoint that can fail with the specified error type for the specified status code with a custom media type and is documented.

Attributes

Source
Endpoint.scala
def outErrors[Err2]: OutErrors[PathInput, Input, Err, Output, Auth, Err2]

Attributes

Source
Endpoint.scala
def outHeader[A](codec: HeaderCodec[A])(implicit combiner: Combiner[Output, A]): Endpoint[PathInput, Input, Err, combiner.Out, Auth]

Attributes

Source
Endpoint.scala
def outHeader[A](name: String)(implicit schema: Schema[A], combiner: Combiner[Output, A]): Endpoint[PathInput, Input, Err, combiner.Out, Auth]

Returns a new endpoint that requires the specified headers to be part of the response.

Returns a new endpoint that requires the specified headers to be part of the response.

Attributes

Source
Endpoint.scala
def outHeader[A](implicit schema: Schema[A], combiner: Combiner[Output, A]): Endpoint[PathInput, Input, Err, combiner.Out, Auth]

Returns a new endpoint that requires the specified headers to be part of the response.

Returns a new endpoint that requires the specified headers to be part of the response.

Attributes

Source
Endpoint.scala
def outStream[Output2 : HttpContentCodec](implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[ZStream[Any, Nothing, Output2], Output]): Endpoint[PathInput, Input, Err, alt.Out, Auth]

Returns a new endpoint derived from this one, whose output type is a stream of the specified type for the ok status code.

Returns a new endpoint derived from this one, whose output type is a stream of the specified type for the ok status code.

Attributes

Source
Endpoint.scala
def outStream[Output2 : HttpContentCodec](doc: Doc)(implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[ZStream[Any, Nothing, Output2], Output]): Endpoint[PathInput, Input, Err, alt.Out, Auth]

Returns a new endpoint derived from this one, whose output type is a stream of the specified type for the ok status code.

Returns a new endpoint derived from this one, whose output type is a stream of the specified type for the ok status code.

Attributes

Source
Endpoint.scala
def outStream[Output2 : HttpContentCodec](status: Status, doc: Doc)(implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[ZStream[Any, Nothing, Output2], Output]): Endpoint[PathInput, Input, Err, alt.Out, Auth]

Returns a new endpoint derived from this one, whose output type is a stream of the specified type for the specified status code and is documented.

Returns a new endpoint derived from this one, whose output type is a stream of the specified type for the specified status code and is documented.

Attributes

Source
Endpoint.scala
def outStream[Output2 : HttpContentCodec](mediaType: MediaType)(implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[ZStream[Any, Nothing, Output2], Output]): Endpoint[PathInput, Input, Err, alt.Out, Auth]

Attributes

Source
Endpoint.scala
def outStream[Output2 : HttpContentCodec](mediaType: MediaType, doc: Doc)(implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[ZStream[Any, Nothing, Output2], Output]): Endpoint[PathInput, Input, Err, alt.Out, Auth]

Attributes

Source
Endpoint.scala
def outStream[Output2 : HttpContentCodec](status: Status, mediaType: MediaType)(implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[ZStream[Any, Nothing, Output2], Output]): Endpoint[PathInput, Input, Err, alt.Out, Auth]

Attributes

Source
Endpoint.scala
def outStream[Output2 : HttpContentCodec](status: Status, mediaType: MediaType, doc: Doc)(implicit evidence$1: HttpContentCodec[Output2], alt: Alternator[ZStream[Any, Nothing, Output2], Output]): Endpoint[PathInput, Input, Err, alt.Out, Auth]

Attributes

Source
Endpoint.scala
def query[A](codec: QueryCodec[A])(implicit combiner: Combiner[Input, A]): Endpoint[PathInput, combiner.Out, Err, Output, Auth]

Returns a new endpoint that requires the specified query.

Returns a new endpoint that requires the specified query.

Attributes

Source
Endpoint.scala
def query[A](name: String)(implicit schema: Schema[A], combiner: Combiner[Input, A]): Endpoint[PathInput, combiner.Out, Err, Output, Auth]

Returns a new endpoint that requires the specified query.

Returns a new endpoint that requires the specified query.

Attributes

Source
Endpoint.scala
def query[A](implicit schema: Schema[A], combiner: Combiner[Input, A]): Endpoint[PathInput, combiner.Out, Err, Output, Auth]

Returns a new endpoint that requires the specified query.

Returns a new endpoint that requires the specified query.

Attributes

Source
Endpoint.scala
def renderUrl(values: PathInput): Either[String, String]

Renders the URL path for this endpoint given the path input values.

Renders the URL path for this endpoint given the path input values.

Example:

 val ep = Endpoint(Method.GET / "users" / int("id"))
 ep.renderUrl(42) // Right("/users/42")

Attributes

Source
Endpoint.scala
def renderUrl(basePath: String, values: PathInput): Either[String, String]

Renders the URL path for this endpoint with a base path prefix.

Renders the URL path for this endpoint with a base path prefix.

Attributes

Source
Endpoint.scala

Attributes

Source
Endpoint.scala
def scopes(scopes: String*): Endpoint[PathInput, Input, Err, Output, AuthType]

Attributes

Source
Endpoint.scala
def tag(tag: String, tags: String*): Endpoint[PathInput, Input, Err, Output, Auth]

Adds tags to the endpoint. They are used for documentation generation. For example to group endpoints for OpenAPI.

Adds tags to the endpoint. They are used for documentation generation. For example to group endpoints for OpenAPI.

Attributes

Source
Endpoint.scala
def tags: List[String]

A list of tags for this endpoint.

A list of tags for this endpoint.

Attributes

Source
Endpoint.scala
def transformError[Err1](f: Err => Err1)(g: Err1 => Err): Endpoint[PathInput, Input, Err1, Output, Auth]

Transforms the error of this endpoint using the specified functions.

Transforms the error of this endpoint using the specified functions.

Attributes

Source
Endpoint.scala
def transformIn[Input1](f: Input => Input1)(g: Input1 => Input): Endpoint[PathInput, Input1, Err, Output, Auth]

Transforms the input of this endpoint using the specified functions. This is useful to build from different http inputs a domain specific input.

Transforms the input of this endpoint using the specified functions. This is useful to build from different http inputs a domain specific input.

For example

 case class ChangeUserName(userId: UUID, name: String)
 val endpoint =
 Endpoint(Method.POST / "user" / uuid("userId") / "changeName").in[String]
   .transformIn { case (userId, name) => ChangeUserName(userId, name) } {
     case ChangeUserName(userId, name) => (userId, name)
   }

Attributes

Source
Endpoint.scala
def transformOut[Output1](f: Output => Output1)(g: Output1 => Output): Endpoint[PathInput, Input, Err, Output1, Auth]

Transforms the output of this endpoint using the specified functions.

Transforms the output of this endpoint using the specified functions.

Attributes

Source
Endpoint.scala
def unauthorizedStatus(status: Status): Endpoint[PathInput, Input, Err, Output, Auth]

Overrides the HTTP status returned when authentication fails. Defaults to 404 (Not Found) for security. Use Status.Unauthorized for standard 401 behavior.

Overrides the HTTP status returned when authentication fails. Defaults to 404 (Not Found) for security. Use Status.Unauthorized for standard 401 behavior.

Attributes

Source
Endpoint.scala
def url(basePath: String, values: PathInput): Either[Exception, URL]

Generates a URL for this endpoint given the base path and the path input.

Generates a URL for this endpoint given the base path and the path input.

Attributes

Source
Endpoint.scala
def urlFromRequest(values: PathInput)(request: Request): Either[Exception, URL]

Attributes

Source
Endpoint.scala
def urlRelative(values: PathInput): Either[Exception, URL]

Generates a URL for this endpoint given the path input.

Generates a URL for this endpoint given the path input.

Attributes

Source
Endpoint.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Concrete fields

Attributes

Source
Endpoint.scala
val authCombiner: Combiner[Input, authType.ClientRequirement]

Attributes

Source
Endpoint.scala