pub struct OpenApiConverter { /* private fields */ }Expand description
Converts OpenAPI v2/v3 documents into UTCP tool definitions.
Implementations§
Source§impl OpenApiConverter
impl OpenApiConverter
Sourcepub fn new(
openapi_spec: Value,
spec_url: Option<String>,
provider_name: Option<String>,
) -> Self
pub fn new( openapi_spec: Value, spec_url: Option<String>, provider_name: Option<String>, ) -> Self
Build a converter from an already loaded spec value.
Sourcepub async fn new_from_url(
spec_url: &str,
provider_name: Option<String>,
) -> Result<Self>
pub async fn new_from_url( spec_url: &str, provider_name: Option<String>, ) -> Result<Self>
Fetch and parse a remote OpenAPI document, inferring a provider name when missing.
Sourcepub fn convert(&self) -> UtcpManual
pub fn convert(&self) -> UtcpManual
Convert the OpenAPI document into a UTCP manual containing tools and metadata.
Auto Trait Implementations§
impl Freeze for OpenApiConverter
impl RefUnwindSafe for OpenApiConverter
impl Send for OpenApiConverter
impl Sync for OpenApiConverter
impl Unpin for OpenApiConverter
impl UnwindSafe for OpenApiConverter
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Mutably borrows from an owned value. Read more
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request