rust-server.response.mustache Maven / Gradle / Ivy
#[derive(Debug, PartialEq, Serialize, Deserialize)]
{{#vendorExtensions.x-must-use-response}}
#[must_use]
{{/vendorExtensions.x-must-use-response}}
pub enum {{{operationId}}}Response {
{{#responses}}
{{#message}}
/// {{{.}}}{{/message}}
{{#vendorExtensions}}
{{{x-response-id}}}
{{/vendorExtensions}}
{{^dataType}}
{{#hasHeaders}}
{
{{/hasHeaders}}
{{/dataType}}
{{#dataType}}
{{^hasHeaders}}
{{#vendorExtensions}}
{{#x-produces-plain-text}}
(String)
{{/x-produces-plain-text}}
{{^x-produces-plain-text}}
({{{dataType}}})
{{/x-produces-plain-text}}
{{/vendorExtensions}}
{{/hasHeaders}}
{{#hasHeaders}}
{
{{#vendorExtensions}}
{{#x-produces-plain-text}}
body: String,
{{/x-produces-plain-text}}
{{^x-produces-plain-text}}
body: {{{dataType}}},
{{/x-produces-plain-text}}
{{/vendorExtensions}}
{{/hasHeaders}}
{{/dataType}}
{{#headers}}
{{{name}}}:
{{^required}}
Option<
{{/required}}
{{{dataType}}}
{{^required}}
>
{{/required}}
{{^-last}}
,
{{/-last}}
{{#-last}}
}
{{/-last}}
{{/headers}}
{{^-last}}
,
{{/-last}}
{{/responses}}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy