ApiContractBuilder

class ApiContractBuilder<Req, Res, ReqH, ResH, PathP, QueryP, CookieP>(path: String, httpMethod: HttpMethod = HttpMethod.POST, requestHeaderDecoder: HeaderField<ReqH>, responseHeaderDecoder: HeaderField<ResH>, pathDecoder: PathField<PathP>, queryDecoder: QueryField<QueryP>, cookieDecoder: CookieField<CookieP>, requestFormat: BodyFormat<Req>, responseFormat: BodyFormat<Res>, isProtected: Boolean = false)

A builder for ApiContract types.

Constructors

Link copied to clipboard
constructor(path: String, httpMethod: HttpMethod = HttpMethod.POST, requestHeaderDecoder: HeaderField<ReqH>, responseHeaderDecoder: HeaderField<ResH>, pathDecoder: PathField<PathP>, queryDecoder: QueryField<QueryP>, cookieDecoder: CookieField<CookieP>, requestFormat: BodyFormat<Req>, responseFormat: BodyFormat<Res>, isProtected: Boolean = false)

Functions

Link copied to clipboard

Builds the ApiContract instance.

Link copied to clipboard

Sets the cookie parameter decoder.

Link copied to clipboard

Sets the HTTP method to GET.

Link copied to clipboard

Sets the HTTP method.

Link copied to clipboard

Sets the path parameter decoder.

Link copied to clipboard

Sets the HTTP method to POST.

Link copied to clipboard

Marks the endpoint as requiring authentication.

Link copied to clipboard

Sets the query parameter decoder.

Link copied to clipboard

Sets the request body format.

Link copied to clipboard

Sets the request header decoder.

Link copied to clipboard

Sets the response body format.

Link copied to clipboard

Sets the response header decoder.