1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! Auto-schema registration using linkme distributed slices
//!
//! **Implementation detail**: Companion to `auto_route`.
//! Provides link-time registration of types that should appear in the generated
//! OpenAPI spec (via `#[rustapi_rs::schema]` and implicit schema derivation).
//!
//! This is an internal detail. The only stable surface is that schemas referenced
//! by auto-registered routes (and explicitly annotated types) end up in the
//! OpenAPI document when using `RustApi::auto()`.
//!
//! This module enables zero-config OpenAPI schema registration.
//! Route macros can register schemas at link-time, and `RustApi::auto()`
//! will collect and apply them before serving docs.
use distributed_slice;
/// Distributed slice containing all auto-registered schema registration functions.
///
/// Each element is a function that takes a mutable reference to the current
/// [`rustapi_openapi::OpenApiSpec`] and registers one or more schemas.
pub static AUTO_SCHEMAS: ;
/// Apply all auto-registered schemas into the given OpenAPI spec.
/// Get the count of auto-registered schema registration functions.