pub struct OpenApiParser { /* private fields */ }Expand description
OpenAPI specification parser
Reads and parses OpenAPI 3.0 specifications from Kubernetes, Azure, or any OpenAPI 3.0 compliant API.
Implementations§
Source§impl OpenApiParser
impl OpenApiParser
Sourcepub fn from_file<P: AsRef<Path>>(
path: P,
service_name: &str,
api_version: &str,
) -> Result<Self>
pub fn from_file<P: AsRef<Path>>( path: P, service_name: &str, api_version: &str, ) -> Result<Self>
Sourcepub fn from_json(
json: &str,
service_name: &str,
api_version: &str,
) -> Result<Self>
pub fn from_json( json: &str, service_name: &str, api_version: &str, ) -> Result<Self>
Parse OpenAPI spec from JSON string
Sourcepub fn with_provider_hint(self, hint: ProviderHint) -> Self
pub fn with_provider_hint(self, hint: ProviderHint) -> Self
Set provider hint for better parsing
Sourcepub fn parse(&self) -> Result<ServiceDefinition>
pub fn parse(&self) -> Result<ServiceDefinition>
Parse OpenAPI spec into ServiceDefinition IR
Sourcepub fn spec(&self) -> &OpenApiSpec
pub fn spec(&self) -> &OpenApiSpec
Get reference to the underlying OpenAPI spec
Auto Trait Implementations§
impl Freeze for OpenApiParser
impl RefUnwindSafe for OpenApiParser
impl Send for OpenApiParser
impl Sync for OpenApiParser
impl Unpin for OpenApiParser
impl UnwindSafe for OpenApiParser
Blanket Implementations§
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