Multiplatform Ktor schema declaration • opensavvy.spine.api • Resource
Resource¶
sealed class Resource
Common parent for all resource types.
Users of the library cannot directly subclass this. Instead, they should subclass one of its subtypes.
Inheritors¶
Properties¶
children¶
Returns resources that are direct children of the current resource.
directEndpoints¶
Returns all endpoints that are declared on this resource.
endpoints¶
val Resource.endpoints: Sequence<AnyEndpoint>
Returns all endpoints that are declared on this resource or any of its children.
fullSlug¶
The complete URL of this resource, starting from the RootResource, to this resource.
hierarchy¶
Returns the hierarchy of this resource: following the parent chain.
parent¶
The parent resource of this resource.
slug¶
The URL segment relating to this specific resource.