MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / build_openapi_doc

Function build_openapi_doc

ra-rpc/src/openapi.rs:312–319  ·  view source on GitHub ↗

Convenience helper that returns a ready-to-serve [`OpenApiDoc`].

(
    sources: &[DescriptorSource<'_>],
    info: &DocumentInfo<'_>,
    ui: SwaggerUiConfig,
)

Source from the content-addressed store, hash-verified

310
311/// Convenience helper that returns a ready-to-serve [`OpenApiDoc`].
312pub fn build_openapi_doc(
313 sources: &[DescriptorSource<'_>],
314 info: &DocumentInfo<'_>,
315 ui: SwaggerUiConfig,
316) -> Result<OpenApiDoc> {
317 let spec = generate_document(sources, info)?;
318 Ok(OpenApiDoc::new(spec, ui))
319}
320
321fn build_operation(
322 service: &ServiceInfo,

Callers

nothing calls this directly

Calls 1

generate_documentFunction · 0.85

Tested by

no test coverage detected