pub trait ApiEndpoint<S> {
// Required methods
fn method(&self) -> Method;
fn path(&self) -> &'static str;
fn handler(&self) -> RouteHandler<S>;
// Provided methods
fn hidden(&self) -> bool { ... }
fn stable(&self) -> bool { ... }
fn operation(&self, _generator: &mut SchemaGenerator) -> Operation { ... }
}
Required Methods§
fn method(&self) -> Method
fn path(&self) -> &'static str
fn handler(&self) -> RouteHandler<S>
Provided Methods§
Sourcefn stable(&self) -> bool
fn stable(&self) -> bool
Indicates the stability of the API
Stable APIs are enabled in the REST service by default, unstable ones need to be explicitly configured to be enabled via config.
Both stable and unstable APIs have a badge, indicating the api’s stability, added to the top of the description field of their OpenAPI definition.
By default all apis are unstable, individual apis need to explicitly opt-in to being stable