[][src]Struct rocket_okapi::gen::OpenApiGenerator

pub struct OpenApiGenerator { /* fields omitted */ }

A struct that visits all rocket::Routes, and aggregates information about them.

Implementations

impl OpenApiGenerator[src]

pub fn new(settings: OpenApiSettings) -> Self[src]

Create a new OpenApiGenerator from the settings provided.

pub fn add_operation(&mut self, op: OperationInfo)[src]

Add a new HTTP Method to the collection of endpoints in the OpenApiGenerator.

pub fn json_schema<T: ?Sized + JsonSchema>(&mut self) -> SchemaObject[src]

Returns a JSON Schema object for the type T.

pub fn schema_generator(&self) -> &SchemaGenerator[src]

Obtain the internal SchemaGenerator object.

pub fn json_schema_no_ref<T: ?Sized + JsonSchema>(&mut self) -> SchemaObject[src]

Return the component definition/schema of an object without any references.

pub fn into_openapi(self) -> OpenApi[src]

Generate an OpenApi specification for all added operations.

Trait Implementations

impl Clone for OpenApiGenerator[src]

impl Debug for OpenApiGenerator[src]

Auto Trait Implementations

impl !RefUnwindSafe for OpenApiGenerator

impl !Send for OpenApiGenerator

impl !Sync for OpenApiGenerator

impl Unpin for OpenApiGenerator

impl !UnwindSafe for OpenApiGenerator

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, I> AsResult<T, I> for T where
    I: Input, 

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoCollection<T> for T

impl<T> IntoSql for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,