pub struct OpenApiMetadata { /* private fields */ }Expand description
Baukit document metadata and optional security conventions.
New metadata uses / as its server, allowing the same schema to describe the service at any
deployment origin. Use OpenApiMetadata::servers when a product has explicit server URLs.
Applying metadata preserves product-owned paths, schemas, contact information, license, and
existing security schemes. Call OpenApiMetadata::bearer_auth to add
Baukit’s standard bearer JWT component; unauthenticated APIs omit it by default.
Implementations§
Source§impl OpenApiMetadata
impl OpenApiMetadata
Sourcepub fn new<T, V, D>(title: T, version: V, description: D) -> Self
pub fn new<T, V, D>(title: T, version: V, description: D) -> Self
Creates metadata from a service’s display title, version, and safe public description.
Sourcepub fn servers<I>(self, servers: I) -> Selfwhere
I: IntoIterator<Item = Server>,
pub fn servers<I>(self, servers: I) -> Selfwhere
I: IntoIterator<Item = Server>,
Replaces the default relative server with the supplied server entries.
Passing an empty iterator omits the explicit server list and restores OpenAPI’s implicit
/ server behavior.
Sourcepub const fn bearer_auth(self) -> Self
pub const fn bearer_auth(self) -> Self
Adds Baukit’s standard HTTP bearer JWT security-scheme component.
This only registers the reusable component named BEARER_AUTH_SCHEME;
products still decide which operations or documents require it.