pub struct ApiDoc {Show 21 fields
pub method: &'static str,
pub path: &'static str,
pub operation_id: &'static str,
pub summary: Option<&'static str>,
pub description: Option<&'static str>,
pub tags: &'static [&'static str],
pub path_params: &'static [&'static str],
pub request_body: Option<SchemaEntry>,
pub response: Option<SchemaEntry>,
pub success_status: u16,
pub hidden: bool,
pub query_schema: Option<SchemaEntry>,
pub secured: bool,
pub required_roles: &'static [&'static str],
pub register_schemas: Option<fn(&mut SchemaRegistry)>,
pub api_version: Option<&'static str>,
pub sunset_opt_out: bool,
pub has_policy: bool,
pub mcp_tool: bool,
pub mcp_exclude: bool,
pub mcp_stream: bool,
}Expand description
OpenAPI metadata emitted alongside every annotated route.
Populated by the route macros (get,
post, etc.) from the handler’s path, signature, and
any #[api_doc(...)] overrides.
Fields§
§method: &'static strHTTP method as an uppercase string (e.g. "GET").
path: &'static strRaw route path with {param} placeholders (e.g. "/users/{id}").
operation_id: &'static strHandler function name — used as the default operationId.
summary: Option<&'static str>Short human-readable summary (from #[api_doc(summary = ...)]).
description: Option<&'static str>Longer free-form description.
Grouping tags. Defaults to the first path segment when unset.
path_params: &'static [&'static str]Path parameter names extracted from the URL template.
Built at compile time from {...} segments in the route path.
request_body: Option<SchemaEntry>Optional schema for the request body (typically the inner type of
a Json<T> extractor).
response: Option<SchemaEntry>Optional schema for the success response (typically the inner type
of a Json<T> return value).
success_status: u16Success HTTP status code, defaults to 200.
When true, the route is excluded from the generated spec.
query_schema: Option<SchemaEntry>Optional query-parameter schema inferred from Query<T> extractors.
secured: boolTrue when the route requires authentication (#[secured]).
required_roles: &'static [&'static str]Roles required by #[secured("role1")]. Empty means any authenticated user.
register_schemas: Option<fn(&mut SchemaRegistry)>Optional runtime hook that lets a handler register any extra component schemas with the generator.
api_version: Option<&'static str>Optional API version associated with this route.
sunset_opt_out: boolWhether this route opts out of sunset 410 responses.
has_policy: boolWhether this route uses dynamic policy authorization.
mcp_tool: boolTrue when the endpoint opts in to MCP tool exposure via
#[api_doc(mcp)]. Opt-in is per-endpoint and never implicit.
mcp_exclude: boolTrue when the endpoint explicitly opts out of MCP exposure via
#[api_doc(mcp = false)]. Honored even under the whole-API hatch
(AppBuilder::expose_all_as_mcp). Not an intra-doc link: this field is
always compiled, but the builder method is gated behind the mcp
feature, so a hard link would break docs built without it.
mcp_stream: boolTrue when the endpoint opts in to streaming MCP exposure via
#[api_doc(mcp, stream)]. A streaming tool returns an Autumn Sse
stream that the MCP endpoint projects onto the Streamable-HTTP SSE
channel as notifications/progress messages terminated by the final
tools/call result. Because an Sse handler has no JSON response
schema, this flag also exempts the tool from the JSON-out eligibility
gate that otherwise excludes schema-less routes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ApiDoc
impl RefUnwindSafe for ApiDoc
impl Send for ApiDoc
impl Sync for ApiDoc
impl Unpin for ApiDoc
impl UnsafeUnpin for ApiDoc
impl UnwindSafe for ApiDoc
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self to an expression for Diesel’s query builder. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> RepositoryHooksClone for Twhere
T: Clone,
impl<T> RepositoryHooksClone for Twhere
T: Clone,
Source§fn autumn_clone(&self) -> T
fn autumn_clone(&self) -> T
Source§impl<T> RepositoryHooksDefault for Twhere
T: Default,
impl<T> RepositoryHooksDefault for Twhere
T: Default,
Source§fn autumn_default() -> T
fn autumn_default() -> T
Source§impl<T, Conn> RunQueryDsl<Conn> for T
impl<T, Conn> RunQueryDsl<Conn> for T
Source§fn execute<'conn, 'query>(
self,
conn: &'conn mut Conn,
) -> <Conn as AsyncConnectionCore>::ExecuteFuture<'conn, 'query>
fn execute<'conn, 'query>( self, conn: &'conn mut Conn, ) -> <Conn as AsyncConnectionCore>::ExecuteFuture<'conn, 'query>
Source§fn load<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>>
fn load<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>>
Source§fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnectionCore,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnectionCore,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
Stream] with the returned rows. Read moreSource§fn get_result<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, LoadNext<Pin<Box<Self::Stream<'conn>>>>>
fn get_result<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, LoadNext<Pin<Box<Self::Stream<'conn>>>>>
Source§fn get_results<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>>
fn get_results<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>>
Vec with the affected rows. Read moreSource§impl<T> Scoped for T
impl<T> Scoped for T
Source§fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
ScopeQuery for this type. Resolves the
registered scope at .load() time, not here.