Package-level declarations
Types
Link copied to clipboard
abstract class ApiContract<Req, Res, ReqH, ResH, PathP, QueryP, CookieP>(val path: String, val httpMethod: HttpMethod = HttpMethod.POST, val requestHeaderDecoder: HeaderField<ReqH> = Empty as HeaderField<ReqH>, val responseHeaderDecoder: HeaderField<ResH> = Empty as HeaderField<ResH>, val pathDecoder: PathField<PathP> = Empty as PathField<PathP>, val queryDecoder: QueryField<QueryP> = Empty as QueryField<QueryP>, val cookieDecoder: CookieField<CookieP> = Empty as CookieField<CookieP>, val requestFormat: BodyFormat<Req>, val responseFormat: BodyFormat<Res>, val isProtected: Boolean = false)
A contract for an API endpoint shared between the client and server.
Link copied to clipboard
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.
Link copied to clipboard
Link copied to clipboard
A BodyFormat for binary bodies.
Link copied to clipboard
Defines how a type T is transformed for transmission.
Link copied to clipboard
A BodyFormat for application/x-www-form-urlencoded bodies.
Link copied to clipboard
A BodyFormat for HTML bodies.
Link copied to clipboard
Common HTTP methods for API contracts.
Link copied to clipboard
A BodyFormat that uses JsonSerializer to encode and decode values.
Link copied to clipboard
A BodyFormat for plain text bodies.
Link copied to clipboard
A BodyFormat that uses ProtoBufSerializer to encode and decode values.
Link copied to clipboard
A BodyFormat for Unit bodies.
Link copied to clipboard
A BodyFormat for XML bodies.
Properties
Functions
Link copied to clipboard
inline fun <Req, Res> apiContract(path: String): ApiContractBuilder<Req, Res, Empty, Empty, Empty, Empty, Empty>
Entry point for creating an ApiContract via builder.
Link copied to clipboard