pub struct SpecTransformer;Expand description
Transforms OpenAPI specifications into Aperture’s cached format
Implementations§
Source§impl SpecTransformer
impl SpecTransformer
Sourcepub fn transform(&self, name: &str, spec: &OpenAPI) -> Result<CachedSpec, Error>
pub fn transform(&self, name: &str, spec: &OpenAPI) -> Result<CachedSpec, Error>
Transforms an OpenAPI specification into a cached representation
This method converts the full OpenAPI spec into an optimized format
that can be quickly loaded and used for CLI generation.
§Errors
Returns an error if parameter reference resolution fails
Sourcepub fn transform_with_filter(
&self,
name: &str,
spec: &OpenAPI,
skip_endpoints: &[(String, String)],
) -> Result<CachedSpec, Error>
pub fn transform_with_filter( &self, name: &str, spec: &OpenAPI, skip_endpoints: &[(String, String)], ) -> Result<CachedSpec, Error>
Transforms an OpenAPI specification into a cached representation with endpoint filtering
This method converts the full OpenAPI spec into an optimized format
that can be quickly loaded and used for CLI generation, filtering out specified endpoints.
§Arguments
name- The name for the cached specspec- TheOpenAPIspecification to transformskip_endpoints- List of endpoints to skip (path, method pairs)
§Errors
Returns an error if parameter reference resolution fails
Sourcepub fn transform_with_warnings(
&self,
name: &str,
spec: &OpenAPI,
skip_endpoints: &[(String, String)],
warnings: &[ValidationWarning],
) -> Result<CachedSpec, Error>
pub fn transform_with_warnings( &self, name: &str, spec: &OpenAPI, skip_endpoints: &[(String, String)], warnings: &[ValidationWarning], ) -> Result<CachedSpec, Error>
Transforms an OpenAPI specification with full warning information
§Arguments
name- The name for the cached specspec- TheOpenAPIspecification to transformskip_endpoints- List of endpoints to skip (path, method pairs)warnings- Validation warnings to store in the cached spec
§Errors
Returns an error if parameter reference resolution fails
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpecTransformer
impl RefUnwindSafe for SpecTransformer
impl Send for SpecTransformer
impl Sync for SpecTransformer
impl Unpin for SpecTransformer
impl UnwindSafe for SpecTransformer
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