pub struct SpecTransformer;Expand description
Transforms OpenAPI specifications into Aperture’s cached format
Implementations§
Source§impl SpecTransformer
impl SpecTransformer
Sourcepub fn transform_with_options(
&self,
spec: &OpenAPI,
options: &TransformOptions,
) -> Result<CachedSpec, Error>
pub fn transform_with_options( &self, spec: &OpenAPI, options: &TransformOptions, ) -> Result<CachedSpec, Error>
Transforms an OpenAPI specification into a cached representation using options
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(&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