pub struct SpecValidator;Expand description
Validates OpenAPI specifications for compatibility with Aperture
Implementations§
Source§impl SpecValidator
impl SpecValidator
Sourcepub fn validate(&self, spec: &OpenAPI) -> Result<(), Error>
👎Deprecated since 0.1.2: Use validate_with_mode() instead. This method defaults to strict mode which may not be desired.
pub fn validate(&self, spec: &OpenAPI) -> Result<(), Error>
validate_with_mode() instead. This method defaults to strict mode which may not be desired.Validates an OpenAPI specification for Aperture compatibility
§Errors
Returns an error if:
- The spec contains unsupported security schemes (
OAuth2,OpenIDConnect) - The spec uses $ref references in security schemes, parameters, or request bodies
- Required x-aperture-secret extensions are missing
- Parameters use content-based serialization
- Request bodies use non-JSON content types
Sourcepub fn validate_with_mode(
&self,
spec: &OpenAPI,
strict: bool,
) -> ValidationResult
pub fn validate_with_mode( &self, spec: &OpenAPI, strict: bool, ) -> ValidationResult
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpecValidator
impl RefUnwindSafe for SpecValidator
impl Send for SpecValidator
impl Sync for SpecValidator
impl Unpin for SpecValidator
impl UnwindSafe for SpecValidator
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