Multiplatform Ktor schema declaration • opensavvy.spine.api • AnyEndpoint • Builder
Builder¶
sealed interface Builder
The super-type for the endpoint declaration syntax.
See AnyEndpoint to learn more about the syntax.
This interface uses the same trick as AnyEndpoint to avoid source-incompatible breaking changes. See its documentation for details.
Functions¶
failure¶
abstract fun <S : FailureSpec> failure(spec: S): AnyEndpoint.Builder
Declares a possible failure that can happen when calling this endpoint.
abstract fun <F> failure(statusCode: HttpStatusCode): AnyEndpoint.Builder
Declares a possible failure that can happen when calling this endpoint.
parameters¶
abstract fun <P : Parameters> parameters(build: ParameterConstructor<P>): AnyEndpoint.Builder
Declares query parameters that the client will need to provide to the server.
request¶
Declares the request body type.
response¶
Declares the response body type.