paperclip_core::v2::schema

Trait Apiv2Operation

source
pub trait Apiv2Operation {
    // Required methods
    fn operation() -> DefaultOperationRaw;
    fn security_definitions() -> BTreeMap<String, SecurityScheme>;
    fn definitions() -> BTreeMap<String, DefaultSchemaRaw>;

    // Provided method
    fn is_visible() -> bool { ... }
}
Expand description

Represents a OpenAPI v2 operation convertible. This is auto-implemented by framework-specific macros:

NOTE: The type parameters specified here aren’t used by the trait itself, but can be used for constraining stuff in framework-related impls.

Required Methods§

source

fn operation() -> DefaultOperationRaw

Returns the definition for this operation.

source

fn security_definitions() -> BTreeMap<String, SecurityScheme>

Returns a map of security definitions that will be merged globally.

source

fn definitions() -> BTreeMap<String, DefaultSchemaRaw>

Returns the definitions used by this operation.

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

source§

impl<F> Apiv2Operation for F
where F: Future<Output = HttpResponseWrapper>,

source§

impl<F, T, H> Apiv2Operation for ResponseWrapper<F, H>
where F: Future<Output = T>, T: OperationModifier + Responder, H: Apiv2Operation,