ServiceRouteManifest

class ServiceRouteManifest @InternalWowApi constructor(val name: String, val route: RouteManifest, val parameters: List<RouteParameterManifest> = emptyList(), val request: Map<String, Any?>? = null, val response: Map<String, Any?>? = null, val responseOptional: Boolean = false, val errors: List<String> = emptyList(), val description: String? = null, val deprecated: Boolean = false)

A service route of a context (@ServiceRoute): a route whose handler is the service's own code. Its name is its identity within the context, for compatibility and for its generated client; route is where the edge serves it, below the context; parameters are its path variables and query parameters; request and response are the inline JSON Schemas of its body and its answer, null when it takes none or answers 204 No Content: a reference into $defs ({"$ref": "#/$defs/<key>"}), or an array of one ({"type": "array", "items": {"$ref": ...}}, "uniqueItems": true for a set), a nullable one, the body or an item, written with a null alternative (Manifest.nullableSchema). A null answer is 204 No Content, no body, so an answer's schema is never nullable itself: responseOptional says the route may answer 204 No Content instead of its response (its function returns a nullable value), where a route of no response always answers it (its function returns Unit). errors are the codes it refuses with, entries of the context's error table.

Fields may be added: pass the constructor's arguments by name.

Constructors

Link copied to clipboard
constructor(name: String, route: RouteManifest, parameters: List<RouteParameterManifest> = emptyList(), request: Map<String, Any?>? = null, response: Map<String, Any?>? = null, responseOptional: Boolean = false, errors: List<String> = emptyList(), description: String? = null, deprecated: Boolean = false)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun ServiceRouteManifest.copyWith(name: String = this.name, route: RouteManifest = this.route, parameters: List<RouteParameterManifest> = this.parameters, request: Map<String, Any?>? = this.request, response: Map<String, Any?>? = this.response, responseOptional: Boolean = this.responseOptional, errors: List<String> = this.errors, description: String? = this.description, deprecated: Boolean = this.deprecated): ServiceRouteManifest
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String