All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rust-server.mimetypes.mustache Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc1
Show newest version
/// mime types for requests and responses

pub mod responses {
    use hyper::mime::*;

    // The macro is called per-operation to beat the recursion limit
{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}{{#responses}}{{#produces}}{{#-first}}{{#dataType}}    /// Create Mime objects for the response content types for {{operationId}}
    lazy_static! {
        pub static ref {{#vendorExtensions}}{{uppercase_operation_id}}_{{x-uppercaseResponseId}}{{/vendorExtensions}}: Mime = mime!({{{mediaType}}});
    }
{{/dataType}}{{/-first}}{{/produces}}{{/responses}}{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
}

pub mod requests {
    use hyper::mime::*;
{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}{{#bodyParam}}   /// Create Mime objects for the request content types for {{operationId}}
    lazy_static! {
        pub static ref {{#vendorExtensions}}{{uppercase_operation_id}}{{/vendorExtensions}}: Mime = mime!({{#consumes}}{{#-first}}{{{mediaType}}}{{/-first}}{{/consumes}}{{^consumes}}Application/Json{{/consumes}});
    }
{{/bodyParam}}{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy