Assets

Interpreter for algebra.Assets

trait Responses
trait Requests
trait Headers
trait Methods
trait Urls
trait Assets
trait Errors
trait Responses
trait Requests
trait Methods
trait Urls
class Object
trait Matchable
class Any

Type members

Inherited classlikes

final class CallbackDocs extends Serializable
Value parameters:
entity

Contents of the callback message

method

HTTP method used for the callback

response

Expected response

Inherited from:
EndpointsWithCustomErrors
case object Delete extends Method
Inherited from:
Methods
case class DocumentedEndpoint(request: DocumentedRequest, response: List[DocumentedResponse], securityRequirements: Seq[SecurityRequirement], docs: EndpointDocs)
case class DocumentedHeader(name: String, description: Option[String], required: Boolean, schema: Schema)
Inherited from:
Headers
Value parameters:
value

List of request header names (e.g. “Authorization”)

Inherited from:
Headers
case class DocumentedParameter(name: String, required: Boolean, description: Option[String], schema: Schema)
Value parameters:
name

Name of the parameter

required

Whether this parameter is required or not (MUST be true for path parameters)

Inherited from:
Urls
Value parameters:
parameters

List of query string parameters

Inherited from:
Urls
case class DocumentedQueryStringParam[A](schema: Schema, isRequired: Boolean, encoder: Encoder[A, Option[Value]])

A query string parameter documentation description for type A

A query string parameter documentation description for type A

Value parameters:
encoder

JSON encoder for query string parameter value, primarily used for encoding of the parameter's default value. Result of the encoding is optional since the empty value of optional query string parameter should result in the empty encoded value.

isRequired

Whether the query string parameter is required

schema

Schema that corresponds to type A

Inherited from:
Urls
case class DocumentedRequest(method: Method, url: DocumentedUrl, headers: DocumentedHeaders, documentation: Documentation, entity: Map[String, MediaType])
Inherited from:
Requests
case class DocumentedResponse(status: StatusCode, documentation: String, headers: DocumentedHeaders, content: Map[String, MediaType])
Value parameters:
content

Map that associates each possible content-type (e.g. “text/html”) with a MediaType description

documentation

Human readable documentation. Not optional because its required by openapi

headers

Response headers documentation

status

Response status code (e.g. OK or NotFound)

Inherited from:
Responses
Value parameters:
path

List of path segments. Left is a static segment, right is a path parameter

queryParameters

Query string parameters

Inherited from:
Urls
final class EndpointDocs extends Serializable
Value parameters:
callbacks

Callbacks indexed by event name

deprecated

Indicates whether this endpoint is deprecated or not

description

Detailed description

operationId

A unique identifier which identifies this operation

summary

Short description

tags

OpenAPI tags

Inherited from:
EndpointsWithCustomErrors
final implicit class EndpointSyntax[A, B](endpoint: Endpoint[A, B])

Extension methods for Endpoint.

Extension methods for Endpoint.

Inherited from:
EndpointsWithCustomErrors
case object Get extends Method
Inherited from:
Methods
implicit class InvariantFunctorSyntax[A, F[_]](val fa: F[A])(implicit ev: InvariantFunctor[F])

Extension methods for values of type F[A] for which there is an implicit InvariantFunctor[F] instance.

Extension methods for values of type F[A] for which there is an implicit InvariantFunctor[F] instance.

Inherited from:
InvariantFunctorSyntax
sealed trait Method
Inherited from:
Methods
case object Options extends Method
Inherited from:
Methods
implicit class PartialInvariantFunctorSyntax[A, F[_]](val fa: F[A])(implicit ev: PartialInvariantFunctor[F])
case object Patch extends Method
Inherited from:
Methods
implicit class PathOps[A](first: Path[A])

Convenient methods for Paths.

Convenient methods for Paths.

Inherited from:
Urls
case object Post extends Method
Inherited from:
Methods
case object Put extends Method
Inherited from:
Methods
implicit class QueryStringSyntax[A](first: QueryString[A])

Extension methods on QueryString.

Extension methods on QueryString.

Inherited from:
Urls
implicit class RequestEntitySyntax[A](requestEntity: RequestEntity[A])
Inherited from:
Requests
final implicit class RequestSyntax[A](request: Request[A])

Extension methods for Request.

Extension methods for Request.

Inherited from:
Requests
implicit class ResponseSyntax[A](response: Response[A])

Extension methods for Response.

Extension methods for Response.

Inherited from:
Responses
implicit class SemigroupalSyntax[A, F[_]](val f: F[A])(implicit ev: Semigroupal[F])
Inherited from:
SemigroupalSyntax

Types

type AssetPath = Nothing
type AssetRequest = Nothing
type AssetResponse = Nothing

Inherited types

Callbacks indexed by URL pattern

Callbacks indexed by URL pattern

See also:
Inherited from:
EndpointsWithCustomErrors

Errors in a request built by a client

Errors in a request built by a client

Inherited from:
Errors
Inherited from:
Urls
Inherited from:
Urls
Inherited from:
Requests
Inherited from:
Requests
Inherited from:
Requests
Inherited from:
Responses
Inherited from:
Responses
type Segment[A] = Schema
Inherited from:
Urls

Error raised by the business logic of a server

Error raised by the business logic of a server

Inherited from:
Errors
Inherited from:
StatusCodes
type Url[A] = DocumentedUrl
Inherited from:
Urls
type WithDefault[A] = A
Inherited from:
Urls

Value members

Concrete methods

def assetSegments(name: String, description: Option[String]): Path[AssetPath]

Inherited methods

Inherited from:
StatusCodes
Definition Classes
Inherited from:
StatusCodes
Inherited from:
StatusCodes
override def Conflict: StatusCode
Definition Classes
Inherited from:
StatusCodes
Inherited from:
StatusCodes
Definition Classes
Inherited from:
StatusCodes
Definition Classes
Inherited from:
StatusCodes
Inherited from:
StatusCodes
override def Gone: StatusCode
Definition Classes
Inherited from:
StatusCodes
override def IMUsed: StatusCode
Definition Classes
Inherited from:
StatusCodes
Definition Classes
Inherited from:
StatusCodes
override def Locked: StatusCode
Definition Classes
Inherited from:
StatusCodes
Definition Classes
Inherited from:
StatusCodes
Definition Classes
Inherited from:
StatusCodes
override def MultiStatus: StatusCode
Definition Classes
Inherited from:
StatusCodes
Inherited from:
StatusCodes
Definition Classes
Inherited from:
StatusCodes
Definition Classes
Inherited from:
StatusCodes
Inherited from:
StatusCodes
override def NotModified: StatusCode
Definition Classes
Inherited from:
StatusCodes
Inherited from:
StatusCodes
Definition Classes
Inherited from:
StatusCodes
Definition Classes
Inherited from:
StatusCodes
Definition Classes
Inherited from:
StatusCodes
Definition Classes
Inherited from:
StatusCodes
Definition Classes
Inherited from:
StatusCodes
Definition Classes
Inherited from:
StatusCodes
Definition Classes
Inherited from:
StatusCodes
Definition Classes
Inherited from:
StatusCodes
override def ResetContent: StatusCode
Definition Classes
Inherited from:
StatusCodes
override def TooEarly: StatusCode
Definition Classes
Inherited from:
StatusCodes
Definition Classes
Inherited from:
StatusCodes
Definition Classes
Inherited from:
StatusCodes
Definition Classes
Inherited from:
StatusCodes
Definition Classes
Inherited from:
StatusCodes
override def UriTooLong: StatusCode
Definition Classes
Inherited from:
StatusCodes
override def addRequestHeaders[A, H](request: Request[A], headers: RequestHeaders[H])(implicit tupler: Tupler[A, H]): Request[Out]
Definition Classes
Inherited from:
Requests
override def addRequestQueryString[A, Q](request: Request[A], qs: QueryString[Q])(implicit tupler: Tupler[A, Q]): Request[Out]
Definition Classes
Inherited from:
Requests
override def addResponseHeaders[A, H](response: Response[A], headers: ResponseHeaders[H])(implicit tupler: Tupler[A, H]): Response[Out]
Definition Classes
Inherited from:
Responses
final def badRequest[A, R](docs: Documentation, headers: ResponseHeaders[A])(implicit tupler: Aux[ClientErrors, A, R]): Response[R]

Bad Request (400) response, with an entity of type ClientErrors.

Bad Request (400) response, with an entity of type ClientErrors.

See also:
Inherited from:
Responses
Definition Classes
Inherited from:
Urls
def chainPaths[A, B](first: Path[A], second: Path[B])(implicit tupler: Tupler[A, B]): Path[Out]
Inherited from:
Urls
def choiceRequestEntity[A, B](requestEntityA: Map[String, MediaType], requestEntityB: Map[String, MediaType]): Map[String, MediaType]
Inherited from:
Requests
def choiceResponse[A, B](responseA: Response[A], responseB: Response[B]): Response[Either[A, B]]
Inherited from:
Responses

Format of the response entity carrying the client errors.

Format of the response entity carrying the client errors.

Inherited from:
Errors

Convert the ClientErrors type into the endpoints4s internal client error type

Convert the ClientErrors type into the endpoints4s internal client error type

Inherited from:
Errors
def combineQueryStrings[A, B](first: QueryString[A], second: QueryString[B])(implicit tupler: Tupler[A, B]): QueryString[Out]
Inherited from:
Urls
final def delete[UrlP, HeadersP, Out](url: Url[UrlP], docs: Documentation, headers: RequestHeaders[HeadersP])(implicit tuplerUH: Aux[UrlP, HeadersP, Out]): Request[Out]

Helper method to perform DELETE request

Helper method to perform DELETE request

Type parameters:
HeadersP

Payload carried by headers

UrlP

Payload carried by url

Inherited from:
Requests
Definition Classes
Inherited from:
Urls
Definition Classes
Inherited from:
Urls
def endpoint[A, B](request: Request[A], response: Response[B], docs: EndpointDocs): Endpoint[A, B]
final def get[UrlP, HeadersP, Out](url: Url[UrlP], docs: Documentation, headers: RequestHeaders[HeadersP])(implicit tuplerUH: Aux[UrlP, HeadersP, Out]): Request[Out]

Helper method to perform GET request

Helper method to perform GET request

Type parameters:
HeadersP

Payload carried by headers

UrlP

Payload carried by url

Inherited from:
Requests
Definition Classes
Inherited from:
Urls
override def intSegment: Segment[Int]
Definition Classes
Inherited from:
Urls
final def internalServerError[A, R](docs: Documentation, headers: ResponseHeaders[A])(implicit tupler: Aux[ServerError, A, R]): Response[R]

Internal Server Error (500) response, with an entity of type ServerError.

Internal Server Error (500) response, with an entity of type ServerError.

See also:
Inherited from:
Responses

Convert the endpoints4s internal client error type into the ClientErrors type

Convert the endpoints4s internal client error type into the ClientErrors type

Inherited from:
Errors
Definition Classes
Inherited from:
Urls
override def longSegment: Segment[Long]
Definition Classes
Inherited from:
Urls
override def mapEndpointDocs[A, B](currentEndpoint: Endpoint[A, B], func: EndpointDocs => EndpointDocs): Endpoint[A, B]
override def mapEndpointRequest[A, B, C](currentEndpoint: Endpoint[A, B], func: Request[A] => Request[C]): Endpoint[C, B]
override def mapEndpointResponse[A, B, C](currentEndpoint: Endpoint[A, B], func: Response[B] => Response[C]): Endpoint[A, C]
final def ok[A, B, R](entity: ResponseEntity[A], docs: Documentation, headers: ResponseHeaders[B])(implicit tupler: Aux[A, B, R]): Response[R]

OK (200) Response with the given entity

OK (200) Response with the given entity

Inherited from:
Responses
def openApi(info: Info)(endpoints: DocumentedEndpoint*): OpenApi
Value parameters:
endpoints

The endpoints to generate the documentation for

info

General information about the documentation to generate

Returns:

An OpenApi instance for the given endpoint descriptions

Inherited from:
EndpointsWithCustomErrors
override def optQsWithDefault[A](name: String, default: A, docs: Documentation)(implicit value: DocumentedQueryStringParam[A]): QueryString[WithDefault[A]]
Definition Classes
Inherited from:
Urls
final def patch[UrlP, BodyP, HeadersP, UrlAndBodyPTupled, Out](url: Url[UrlP], entity: RequestEntity[BodyP], docs: Documentation, headers: RequestHeaders[HeadersP])(implicit tuplerUB: Aux[UrlP, BodyP, UrlAndBodyPTupled], tuplerUBH: Aux[UrlAndBodyPTupled, HeadersP, Out]): Request[Out]

Helper method to perform PATCH request

Helper method to perform PATCH request

Type parameters:
BodyP

Payload carried by body

HeadersP

Payload carried by headers

UrlAndBodyPTupled

Payloads of Url and Body tupled together by Tupler

UrlP

Payload carried by url

Value parameters:
docs

Request documentation

Inherited from:
Requests
final def post[UrlP, BodyP, HeadersP, UrlAndBodyPTupled, Out](url: Url[UrlP], entity: RequestEntity[BodyP], docs: Documentation, headers: RequestHeaders[HeadersP])(implicit tuplerUB: Aux[UrlP, BodyP, UrlAndBodyPTupled], tuplerUBH: Aux[UrlAndBodyPTupled, HeadersP, Out]): Request[Out]

Helper method to perform POST request

Helper method to perform POST request

Type parameters:
BodyP

Payload carried by body

HeadersP

Payload carried by headers

UrlAndBodyPTupled

Payloads of Url and Body tupled together by Tupler

UrlP

Payload carried by url

Value parameters:
docs

Request documentation

Inherited from:
Requests
final def put[UrlP, BodyP, HeadersP, UrlAndBodyPTupled, Out](url: Url[UrlP], entity: RequestEntity[BodyP], docs: Documentation, headers: RequestHeaders[HeadersP])(implicit tuplerUB: Aux[UrlP, BodyP, UrlAndBodyPTupled], tuplerUBH: Aux[UrlAndBodyPTupled, HeadersP, Out]): Request[Out]

Helper method to perform PUT request

Helper method to perform PUT request

Type parameters:
BodyP

Payload carried by body

HeadersP

Payload carried by headers

UrlAndBodyPTupled

Payloads of Url and Body tupled together by Tupler

UrlP

Payload carried by url

Inherited from:
Requests
def qs[A](name: String, docs: Documentation)(implicit value: DocumentedQueryStringParam[A]): QueryString[A]
Inherited from:
Urls
Inherited from:
Urls
def request[A, B, C, AB, Out](method: Method, url: Url[A], entity: RequestEntity[B], docs: Documentation, headers: RequestHeaders[C])(implicit tuplerAB: Aux[A, B, AB], tuplerABC: Aux[AB, C, Out]): Request[Out]
Inherited from:
Requests
def response[A, B, R](statusCode: StatusCode, entity: ResponseEntity[A], docs: Documentation, headers: ResponseHeaders[B])(implicit tupler: Aux[A, B, R]): Response[R]
Inherited from:
Responses
def segment[A](name: String, docs: Documentation)(implicit A: Segment[A]): Path[A]
Inherited from:
Urls

Format of the response entity carrying the server error.

Format of the response entity carrying the server error.

Inherited from:
Errors

Convert the ServerError type into the endpoints4s internal server error type

Convert the ServerError type into the endpoints4s internal server error type

Inherited from:
Errors
Inherited from:
Urls
Inherited from:
Urls

Convert the endpoints4s internal server error type into the ServerError type

Convert the endpoints4s internal server error type into the ServerError type

Inherited from:
Errors
def urlWithQueryString[A, B](path: Path[A], qs: QueryString[B])(implicit tupler: Tupler[A, B]): Url[Out]
Inherited from:
Urls
Definition Classes
Inherited from:
Urls
override def uuidSegment: Segment[UUID]
Definition Classes
Inherited from:
Urls
final def wheneverFound[A](responseA: Response[A], notFoundDocs: Documentation): Response[Option[A]]

Turns a Response[A] into a Response[Option[A]].

Turns a Response[A] into a Response[Option[A]].

Interpreters represent None with an empty HTTP response whose status code is 404 (Not Found).

Inherited from:
Responses

Inherited fields

Response used by endpoints4s when decoding a request fails.

Response used by endpoints4s when decoding a request fails.

The provided implementation forwards to badRequest.

Inherited from:
Errors
Inherited from:
Requests
val path: Path[Unit]

An empty path.

An empty path.

Useful to begin a path definition:

 path / "foo" / segment[Int] /? qs[String]("bar")
Inherited from:
Urls

Response used by endpoints4s when the business logic of an endpoint fails.

Response used by endpoints4s when the business logic of an endpoint fails.

The provided implementation forwards to internalServerError

Inherited from:
Errors
Inherited from:
Requests

Implicits

Inherited implicits

final implicit def EndpointSyntax[A, B](endpoint: Endpoint[A, B]): EndpointSyntax[A, B]

Extension methods for Endpoint.

Extension methods for Endpoint.

Inherited from:
EndpointsWithCustomErrors
final implicit def InvariantFunctorSyntax[A, F[_]](fa: F[A])(implicit ev: InvariantFunctor[F]): InvariantFunctorSyntax[A, F]

Extension methods for values of type F[A] for which there is an implicit InvariantFunctor[F] instance.

Extension methods for values of type F[A] for which there is an implicit InvariantFunctor[F] instance.

Inherited from:
InvariantFunctorSyntax
final implicit def PartialInvariantFunctorSyntax[A, F[_]](fa: F[A])(implicit ev: PartialInvariantFunctor[F]): PartialInvariantFunctorSyntax[A, F]
final implicit def PathOps[A](first: Path[A]): PathOps[A]

Convenient methods for Paths.

Convenient methods for Paths.

Inherited from:
Urls
final implicit def QueryStringSyntax[A](first: QueryString[A]): QueryStringSyntax[A]

Extension methods on QueryString.

Extension methods on QueryString.

Inherited from:
Urls
final implicit def RequestEntitySyntax[A](requestEntity: RequestEntity[A]): RequestEntitySyntax[A]
Inherited from:
Requests
final implicit def RequestSyntax[A](request: Request[A]): RequestSyntax[A]

Extension methods for Request.

Extension methods for Request.

Inherited from:
Requests
final implicit def ResponseSyntax[A](response: Response[A]): ResponseSyntax[A]

Extension methods for Response.

Extension methods for Response.

Inherited from:
Responses
final implicit def SemigroupalSyntax[A, F[_]](f: F[A])(implicit ev: Semigroupal[F]): SemigroupalSyntax[A, F]
Inherited from:
SemigroupalSyntax
Inherited from:
Urls
implicit def repeatedQueryStringParam[A, CC <: (Iterable)](implicit param: DocumentedQueryStringParam[A], factory: Factory[A, CC[A]]): DocumentedQueryStringParam[CC[A]]
Inherited from:
Urls