forked from loafle/openapi-generator-original
[Rust-Server] use status codes as the variants of the response enums instead of descriptions (#7125)
* use status codes in the variants of the responses instead of message * samples * add missing {{code}} * use human friendly idents if possible * generate samples * salvage an oversight
This commit is contained in:
parent
dc69138de5
commit
7d96f61e5d
@ -622,9 +622,18 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
param.vendorExtensions.put("typeName", toModelName(param.baseName));
|
param.vendorExtensions.put("typeName", toModelName(param.baseName));
|
||||||
}
|
}
|
||||||
for (CodegenResponse rsp : op.responses) {
|
for (CodegenResponse rsp : op.responses) {
|
||||||
rsp.message = camelize(rsp.message.split("[^A-Za-z ]")[0].replace(" ", "_"));
|
String[] words = rsp.message.split("[^A-Za-z ]");
|
||||||
|
String responseId;
|
||||||
|
if (rsp.vendorExtensions.containsKey("x-responseId")) {
|
||||||
|
responseId = (String)rsp.vendorExtensions.get("x-responseId");
|
||||||
|
} else if (words.length != 0) {
|
||||||
|
responseId = camelize(words[0].replace(" ", "_"));
|
||||||
|
} else {
|
||||||
|
responseId = "Status" + rsp.code;
|
||||||
|
}
|
||||||
|
rsp.vendorExtensions.put("x-responseId", responseId);
|
||||||
|
rsp.vendorExtensions.put("x-uppercaseResponseId", underscore(responseId).toUpperCase());
|
||||||
rsp.vendorExtensions.put("uppercase_operation_id", underscore(op.operationId).toUpperCase());
|
rsp.vendorExtensions.put("uppercase_operation_id", underscore(op.operationId).toUpperCase());
|
||||||
rsp.vendorExtensions.put("uppercase_message", underscore(rsp.message).toUpperCase());
|
|
||||||
if (rsp.dataType != null) {
|
if (rsp.dataType != null) {
|
||||||
rsp.vendorExtensions.put("uppercase_data_type", (rsp.dataType.replace("models::", "")).toUpperCase());
|
rsp.vendorExtensions.put("uppercase_data_type", (rsp.dataType.replace("models::", "")).toUpperCase());
|
||||||
|
|
||||||
|
@ -269,8 +269,8 @@ impl Api for Client {
|
|||||||
let response_{{name}} = response.headers.get::<Response{{nameInCamelCase}}>().ok_or_else(|| "Required response header {{baseName}} for response {{code}} was not found.")?;
|
let response_{{name}} = response.headers.get::<Response{{nameInCamelCase}}>().ok_or_else(|| "Required response header {{baseName}} for response {{code}} was not found.")?;
|
||||||
{{/headers}}
|
{{/headers}}
|
||||||
|
|
||||||
{{#dataType}} Ok({{operationId}}Response::{{message}}{{^headers}}(body){{/headers}}{{#headers}}{{#-first}}{ body: body, {{/-first}}{{name}}: response_{{name}}.0.clone(){{^-last}}, {{/-last}}{{#-last}} }{{/-last}}{{/headers}})
|
{{#dataType}} Ok({{operationId}}Response::{{#vendorExtensions}}{{x-responseId}}{{/vendorExtensions}}{{^headers}}(body){{/headers}}{{#headers}}{{#-first}}{ body: body, {{/-first}}{{name}}: response_{{name}}.0.clone(){{^-last}}, {{/-last}}{{#-last}} }{{/-last}}{{/headers}})
|
||||||
{{/dataType}}{{^dataType}} Ok({{operationId}}Response::{{message}}{{#headers}}{{#-first}}{ {{/-first}}{{^-first}}, {{/-first}}{{name}}: response_{{name}}.0.clone(){{#-last}} }{{/-last}}{{/headers}})
|
{{/dataType}}{{^dataType}} Ok({{operationId}}Response::{{#vendorExtensions}}{{x-responseId}}{{/vendorExtensions}}{{#headers}}{{#-first}}{ {{/-first}}{{^-first}}, {{/-first}}{{name}}: response_{{name}}.0.clone(){{#-last}} }{{/-last}}{{/headers}})
|
||||||
{{/dataType}}
|
{{/dataType}}
|
||||||
},
|
},
|
||||||
{{/responses}}
|
{{/responses}}
|
||||||
|
@ -37,7 +37,9 @@ pub use swagger::{ApiError, Context, ContextWrapper};
|
|||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
{{/isResponseFile}}
|
{{/isResponseFile}}
|
||||||
pub enum {{operationId}}Response {
|
pub enum {{operationId}}Response {
|
||||||
{{#responses}} {{message}} {{#dataType}}{{^headers}}( {{{dataType}}} ) {{/headers}}{{#headers}}{{#-first}}{ body: {{{dataType}}}{{/-first}}{{/headers}}{{/dataType}}{{#headers}}{{#-first}}{{^dataType}} { {{/dataType}}{{#dataType}}, {{/dataType}}{{/-first}}{{^-first}}, {{/-first}}{{name}}: {{{datatype}}}{{#-last}} } {{/-last}}{{/headers}},
|
{{#responses}}
|
||||||
|
{{#message}} /// {{message}}{{/message}}
|
||||||
|
{{#vendorExtensions}}{{x-responseId}}{{/vendorExtensions}} {{#dataType}}{{^headers}}( {{{dataType}}} ) {{/headers}}{{#headers}}{{#-first}}{ body: {{{dataType}}}{{/-first}}{{/headers}}{{/dataType}}{{#headers}}{{#-first}}{{^dataType}} { {{/dataType}}{{#dataType}}, {{/dataType}}{{/-first}}{{^-first}}, {{/-first}}{{name}}: {{{datatype}}}{{#-last}} } {{/-last}}{{/headers}},
|
||||||
{{/responses}}
|
{{/responses}}
|
||||||
}
|
}
|
||||||
{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
|
{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
|
||||||
|
@ -6,7 +6,7 @@ pub mod responses {
|
|||||||
// The macro is called per-operation to beat the recursion limit
|
// 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}}
|
{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}{{#responses}}{{#produces}}{{#-first}}{{#dataType}} /// Create Mime objects for the response content types for {{operationId}}
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
pub static ref {{#vendorExtensions}}{{uppercase_operation_id}}_{{uppercase_message}}{{/vendorExtensions}}: Mime = mime!({{{mediaType}}});
|
pub static ref {{#vendorExtensions}}{{uppercase_operation_id}}_{{x-uppercaseResponseId}}{{/vendorExtensions}}: Mime = mime!({{{mediaType}}});
|
||||||
}
|
}
|
||||||
{{/dataType}}{{/-first}}{{/produces}}{{/responses}}{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
|
{{/dataType}}{{/-first}}{{/produces}}{{/responses}}{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
|
||||||
}
|
}
|
||||||
|
@ -224,7 +224,7 @@ fn add_routes<T>(router: &mut Router, api: T) where T: Api + Send + Sync + Clone
|
|||||||
match api.{{#vendorExtensions}}{{operation_id}}{{/vendorExtensions}}({{#allParams}}param_{{paramName}}{{#isListContainer}}.as_ref(){{/isListContainer}}, {{/allParams}}context).wait() {
|
match api.{{#vendorExtensions}}{{operation_id}}{{/vendorExtensions}}({{#allParams}}param_{{paramName}}{{#isListContainer}}.as_ref(){{/isListContainer}}, {{/allParams}}context).wait() {
|
||||||
Ok(rsp) => match rsp {
|
Ok(rsp) => match rsp {
|
||||||
{{#responses}}
|
{{#responses}}
|
||||||
{{operationId}}Response::{{message}}{{#dataType}}{{^headers}}(body){{/headers}}{{#headers}}{{#-first}}{ body{{/-first}}{{/headers}}{{/dataType}}{{#headers}}{{#-first}}{{^dataType}}{ {{/dataType}}{{#dataType}}, {{/dataType}}{{/-first}}{{^-first}}, {{/-first}}{{name}}{{#-last}} }{{/-last}}{{/headers}} => {
|
{{operationId}}Response::{{#vendorExtensions}}{{x-responseId}}{{/vendorExtensions}}{{#dataType}}{{^headers}}(body){{/headers}}{{#headers}}{{#-first}}{ body{{/-first}}{{/headers}}{{/dataType}}{{#headers}}{{#-first}}{{^dataType}}{ {{/dataType}}{{#dataType}}, {{/dataType}}{{/-first}}{{^-first}}, {{/-first}}{{name}}{{#-last}} }{{/-last}}{{/headers}} => {
|
||||||
{{^isFile}}
|
{{^isFile}}
|
||||||
{{#dataType}}{{#vendorExtensions}}{{#producesPlainText}} let body_string = body;
|
{{#dataType}}{{#vendorExtensions}}{{#producesPlainText}} let body_string = body;
|
||||||
{{/producesPlainText}}{{#producesXml}}
|
{{/producesPlainText}}{{#producesXml}}
|
||||||
@ -256,7 +256,7 @@ fn add_routes<T>(router: &mut Router, api: T) where T: Api + Send + Sync + Clone
|
|||||||
{{#isFile}} {{/isFile}} response.headers.set(Response{{nameInCamelCase}}({{name}}));
|
{{#isFile}} {{/isFile}} response.headers.set(Response{{nameInCamelCase}}({{name}}));
|
||||||
{{/headers}}
|
{{/headers}}
|
||||||
{{#produces}}{{#-first}}
|
{{#produces}}{{#-first}}
|
||||||
{{#dataType}}{{#isFile}} {{/isFile}} response.headers.set(ContentType(mimetypes::responses::{{#vendorExtensions}}{{uppercase_operation_id}}_{{uppercase_message}}{{/vendorExtensions}}.clone()));{{/dataType}}
|
{{#dataType}}{{#isFile}} {{/isFile}} response.headers.set(ContentType(mimetypes::responses::{{#vendorExtensions}}{{uppercase_operation_id}}_{{x-uppercaseResponseId}}{{/vendorExtensions}}.clone()));{{/dataType}}
|
||||||
{{/-first}}{{/produces}}
|
{{/-first}}{{/produces}}
|
||||||
{{#isFile}} {{/isFile}} context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
|
{{#isFile}} {{/isFile}} context.x_span_id.as_ref().map(|header| response.headers.set(XSpanId(header.clone())));
|
||||||
{{#bodyParams}}{{#vendorExtensions}}{{^consumesPlainText}} if !unused_elements.is_empty() {
|
{{#bodyParams}}{{#vendorExtensions}}{{^consumesPlainText}} if !unused_elements.is_empty() {
|
||||||
|
@ -13,7 +13,7 @@ To see how to make this your own, look here:
|
|||||||
[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md)
|
[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md)
|
||||||
|
|
||||||
- API version: 1.0.0
|
- API version: 1.0.0
|
||||||
- Build date: 2017-12-07T17:18:10.454Z
|
- Build date: 2017-12-14T14:31:31.219+09:00
|
||||||
|
|
||||||
This autogenerated project defines an API crate `petstore_api` which contains:
|
This autogenerated project defines an API crate `petstore_api` which contains:
|
||||||
* An `Api` trait defining the API in Rust.
|
* An `Api` trait defining the API in Rust.
|
||||||
|
@ -60,8 +60,9 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
405:
|
405:
|
||||||
description: "Invalid input"
|
description: "Invalid input"
|
||||||
|
x-responseId: "InvalidInput"
|
||||||
|
x-uppercaseResponseId: "INVALID_INPUT"
|
||||||
uppercase_operation_id: "ADD_PET"
|
uppercase_operation_id: "ADD_PET"
|
||||||
uppercase_message: "INVALID_INPUT"
|
|
||||||
security:
|
security:
|
||||||
- petstore_auth:
|
- petstore_auth:
|
||||||
- "write:pets"
|
- "write:pets"
|
||||||
@ -101,16 +102,19 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
400:
|
400:
|
||||||
description: "Invalid ID supplied"
|
description: "Invalid ID supplied"
|
||||||
|
x-responseId: "InvalidIDSupplied"
|
||||||
|
x-uppercaseResponseId: "INVALID_ID_SUPPLIED"
|
||||||
uppercase_operation_id: "UPDATE_PET"
|
uppercase_operation_id: "UPDATE_PET"
|
||||||
uppercase_message: "INVALID_ID_SUPPLIED"
|
|
||||||
404:
|
404:
|
||||||
description: "Pet not found"
|
description: "Pet not found"
|
||||||
|
x-responseId: "PetNotFound"
|
||||||
|
x-uppercaseResponseId: "PET_NOT_FOUND"
|
||||||
uppercase_operation_id: "UPDATE_PET"
|
uppercase_operation_id: "UPDATE_PET"
|
||||||
uppercase_message: "PET_NOT_FOUND"
|
|
||||||
405:
|
405:
|
||||||
description: "Validation exception"
|
description: "Validation exception"
|
||||||
|
x-responseId: "ValidationException"
|
||||||
|
x-uppercaseResponseId: "VALIDATION_EXCEPTION"
|
||||||
uppercase_operation_id: "UPDATE_PET"
|
uppercase_operation_id: "UPDATE_PET"
|
||||||
uppercase_message: "VALIDATION_EXCEPTION"
|
|
||||||
security:
|
security:
|
||||||
- petstore_auth:
|
- petstore_auth:
|
||||||
- "write:pets"
|
- "write:pets"
|
||||||
@ -154,14 +158,16 @@ paths:
|
|||||||
type: "array"
|
type: "array"
|
||||||
items:
|
items:
|
||||||
$ref: "#/definitions/Pet"
|
$ref: "#/definitions/Pet"
|
||||||
|
x-responseId: "SuccessfulOperation"
|
||||||
|
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
|
||||||
uppercase_operation_id: "FIND_PETS_BY_STATUS"
|
uppercase_operation_id: "FIND_PETS_BY_STATUS"
|
||||||
uppercase_message: "SUCCESSFUL_OPERATION"
|
|
||||||
uppercase_data_type: "VEC<PET>"
|
uppercase_data_type: "VEC<PET>"
|
||||||
producesXml: true
|
producesXml: true
|
||||||
400:
|
400:
|
||||||
description: "Invalid status value"
|
description: "Invalid status value"
|
||||||
|
x-responseId: "InvalidStatusValue"
|
||||||
|
x-uppercaseResponseId: "INVALID_STATUS_VALUE"
|
||||||
uppercase_operation_id: "FIND_PETS_BY_STATUS"
|
uppercase_operation_id: "FIND_PETS_BY_STATUS"
|
||||||
uppercase_message: "INVALID_STATUS_VALUE"
|
|
||||||
security:
|
security:
|
||||||
- petstore_auth:
|
- petstore_auth:
|
||||||
- "write:pets"
|
- "write:pets"
|
||||||
@ -200,14 +206,16 @@ paths:
|
|||||||
type: "array"
|
type: "array"
|
||||||
items:
|
items:
|
||||||
$ref: "#/definitions/Pet"
|
$ref: "#/definitions/Pet"
|
||||||
|
x-responseId: "SuccessfulOperation"
|
||||||
|
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
|
||||||
uppercase_operation_id: "FIND_PETS_BY_TAGS"
|
uppercase_operation_id: "FIND_PETS_BY_TAGS"
|
||||||
uppercase_message: "SUCCESSFUL_OPERATION"
|
|
||||||
uppercase_data_type: "VEC<PET>"
|
uppercase_data_type: "VEC<PET>"
|
||||||
producesXml: true
|
producesXml: true
|
||||||
400:
|
400:
|
||||||
description: "Invalid tag value"
|
description: "Invalid tag value"
|
||||||
|
x-responseId: "InvalidTagValue"
|
||||||
|
x-uppercaseResponseId: "INVALID_TAG_VALUE"
|
||||||
uppercase_operation_id: "FIND_PETS_BY_TAGS"
|
uppercase_operation_id: "FIND_PETS_BY_TAGS"
|
||||||
uppercase_message: "INVALID_TAG_VALUE"
|
|
||||||
security:
|
security:
|
||||||
- petstore_auth:
|
- petstore_auth:
|
||||||
- "write:pets"
|
- "write:pets"
|
||||||
@ -242,18 +250,21 @@ paths:
|
|||||||
description: "successful operation"
|
description: "successful operation"
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/Pet"
|
$ref: "#/definitions/Pet"
|
||||||
|
x-responseId: "SuccessfulOperation"
|
||||||
|
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
|
||||||
uppercase_operation_id: "GET_PET_BY_ID"
|
uppercase_operation_id: "GET_PET_BY_ID"
|
||||||
uppercase_message: "SUCCESSFUL_OPERATION"
|
|
||||||
uppercase_data_type: "PET"
|
uppercase_data_type: "PET"
|
||||||
producesXml: true
|
producesXml: true
|
||||||
400:
|
400:
|
||||||
description: "Invalid ID supplied"
|
description: "Invalid ID supplied"
|
||||||
|
x-responseId: "InvalidIDSupplied"
|
||||||
|
x-uppercaseResponseId: "INVALID_ID_SUPPLIED"
|
||||||
uppercase_operation_id: "GET_PET_BY_ID"
|
uppercase_operation_id: "GET_PET_BY_ID"
|
||||||
uppercase_message: "INVALID_ID_SUPPLIED"
|
|
||||||
404:
|
404:
|
||||||
description: "Pet not found"
|
description: "Pet not found"
|
||||||
|
x-responseId: "PetNotFound"
|
||||||
|
x-uppercaseResponseId: "PET_NOT_FOUND"
|
||||||
uppercase_operation_id: "GET_PET_BY_ID"
|
uppercase_operation_id: "GET_PET_BY_ID"
|
||||||
uppercase_message: "PET_NOT_FOUND"
|
|
||||||
security:
|
security:
|
||||||
- api_key: []
|
- api_key: []
|
||||||
operation_id: "get_pet_by_id"
|
operation_id: "get_pet_by_id"
|
||||||
@ -298,8 +309,9 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
405:
|
405:
|
||||||
description: "Invalid input"
|
description: "Invalid input"
|
||||||
|
x-responseId: "InvalidInput"
|
||||||
|
x-uppercaseResponseId: "INVALID_INPUT"
|
||||||
uppercase_operation_id: "UPDATE_PET_WITH_FORM"
|
uppercase_operation_id: "UPDATE_PET_WITH_FORM"
|
||||||
uppercase_message: "INVALID_INPUT"
|
|
||||||
security:
|
security:
|
||||||
- petstore_auth:
|
- petstore_auth:
|
||||||
- "write:pets"
|
- "write:pets"
|
||||||
@ -336,8 +348,9 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
400:
|
400:
|
||||||
description: "Invalid pet value"
|
description: "Invalid pet value"
|
||||||
|
x-responseId: "InvalidPetValue"
|
||||||
|
x-uppercaseResponseId: "INVALID_PET_VALUE"
|
||||||
uppercase_operation_id: "DELETE_PET"
|
uppercase_operation_id: "DELETE_PET"
|
||||||
uppercase_message: "INVALID_PET_VALUE"
|
|
||||||
security:
|
security:
|
||||||
- petstore_auth:
|
- petstore_auth:
|
||||||
- "write:pets"
|
- "write:pets"
|
||||||
@ -388,8 +401,9 @@ paths:
|
|||||||
description: "successful operation"
|
description: "successful operation"
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/ApiResponse"
|
$ref: "#/definitions/ApiResponse"
|
||||||
|
x-responseId: "SuccessfulOperation"
|
||||||
|
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
|
||||||
uppercase_operation_id: "UPLOAD_FILE"
|
uppercase_operation_id: "UPLOAD_FILE"
|
||||||
uppercase_message: "SUCCESSFUL_OPERATION"
|
|
||||||
uppercase_data_type: "APIRESPONSE"
|
uppercase_data_type: "APIRESPONSE"
|
||||||
producesJson: true
|
producesJson: true
|
||||||
security:
|
security:
|
||||||
@ -420,8 +434,9 @@ paths:
|
|||||||
additionalProperties:
|
additionalProperties:
|
||||||
type: "integer"
|
type: "integer"
|
||||||
format: "int32"
|
format: "int32"
|
||||||
|
x-responseId: "SuccessfulOperation"
|
||||||
|
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
|
||||||
uppercase_operation_id: "GET_INVENTORY"
|
uppercase_operation_id: "GET_INVENTORY"
|
||||||
uppercase_message: "SUCCESSFUL_OPERATION"
|
|
||||||
uppercase_data_type: "HASHMAP<STRING, I32>"
|
uppercase_data_type: "HASHMAP<STRING, I32>"
|
||||||
producesJson: true
|
producesJson: true
|
||||||
security:
|
security:
|
||||||
@ -460,14 +475,16 @@ paths:
|
|||||||
description: "successful operation"
|
description: "successful operation"
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/Order"
|
$ref: "#/definitions/Order"
|
||||||
|
x-responseId: "SuccessfulOperation"
|
||||||
|
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
|
||||||
uppercase_operation_id: "PLACE_ORDER"
|
uppercase_operation_id: "PLACE_ORDER"
|
||||||
uppercase_message: "SUCCESSFUL_OPERATION"
|
|
||||||
uppercase_data_type: "ORDER"
|
uppercase_data_type: "ORDER"
|
||||||
producesXml: true
|
producesXml: true
|
||||||
400:
|
400:
|
||||||
description: "Invalid Order"
|
description: "Invalid Order"
|
||||||
|
x-responseId: "InvalidOrder"
|
||||||
|
x-uppercaseResponseId: "INVALID_ORDER"
|
||||||
uppercase_operation_id: "PLACE_ORDER"
|
uppercase_operation_id: "PLACE_ORDER"
|
||||||
uppercase_message: "INVALID_ORDER"
|
|
||||||
operation_id: "place_order"
|
operation_id: "place_order"
|
||||||
uppercase_operation_id: "PLACE_ORDER"
|
uppercase_operation_id: "PLACE_ORDER"
|
||||||
path: "/store/order"
|
path: "/store/order"
|
||||||
@ -501,18 +518,21 @@ paths:
|
|||||||
description: "successful operation"
|
description: "successful operation"
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/Order"
|
$ref: "#/definitions/Order"
|
||||||
|
x-responseId: "SuccessfulOperation"
|
||||||
|
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
|
||||||
uppercase_operation_id: "GET_ORDER_BY_ID"
|
uppercase_operation_id: "GET_ORDER_BY_ID"
|
||||||
uppercase_message: "SUCCESSFUL_OPERATION"
|
|
||||||
uppercase_data_type: "ORDER"
|
uppercase_data_type: "ORDER"
|
||||||
producesXml: true
|
producesXml: true
|
||||||
400:
|
400:
|
||||||
description: "Invalid ID supplied"
|
description: "Invalid ID supplied"
|
||||||
|
x-responseId: "InvalidIDSupplied"
|
||||||
|
x-uppercaseResponseId: "INVALID_ID_SUPPLIED"
|
||||||
uppercase_operation_id: "GET_ORDER_BY_ID"
|
uppercase_operation_id: "GET_ORDER_BY_ID"
|
||||||
uppercase_message: "INVALID_ID_SUPPLIED"
|
|
||||||
404:
|
404:
|
||||||
description: "Order not found"
|
description: "Order not found"
|
||||||
|
x-responseId: "OrderNotFound"
|
||||||
|
x-uppercaseResponseId: "ORDER_NOT_FOUND"
|
||||||
uppercase_operation_id: "GET_ORDER_BY_ID"
|
uppercase_operation_id: "GET_ORDER_BY_ID"
|
||||||
uppercase_message: "ORDER_NOT_FOUND"
|
|
||||||
operation_id: "get_order_by_id"
|
operation_id: "get_order_by_id"
|
||||||
uppercase_operation_id: "GET_ORDER_BY_ID"
|
uppercase_operation_id: "GET_ORDER_BY_ID"
|
||||||
path: "/store/order/:order_id"
|
path: "/store/order/:order_id"
|
||||||
@ -539,12 +559,14 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
400:
|
400:
|
||||||
description: "Invalid ID supplied"
|
description: "Invalid ID supplied"
|
||||||
|
x-responseId: "InvalidIDSupplied"
|
||||||
|
x-uppercaseResponseId: "INVALID_ID_SUPPLIED"
|
||||||
uppercase_operation_id: "DELETE_ORDER"
|
uppercase_operation_id: "DELETE_ORDER"
|
||||||
uppercase_message: "INVALID_ID_SUPPLIED"
|
|
||||||
404:
|
404:
|
||||||
description: "Order not found"
|
description: "Order not found"
|
||||||
|
x-responseId: "OrderNotFound"
|
||||||
|
x-uppercaseResponseId: "ORDER_NOT_FOUND"
|
||||||
uppercase_operation_id: "DELETE_ORDER"
|
uppercase_operation_id: "DELETE_ORDER"
|
||||||
uppercase_message: "ORDER_NOT_FOUND"
|
|
||||||
operation_id: "delete_order"
|
operation_id: "delete_order"
|
||||||
uppercase_operation_id: "DELETE_ORDER"
|
uppercase_operation_id: "DELETE_ORDER"
|
||||||
path: "/store/order/:order_id"
|
path: "/store/order/:order_id"
|
||||||
@ -577,8 +599,9 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
default:
|
default:
|
||||||
description: "successful operation"
|
description: "successful operation"
|
||||||
|
x-responseId: "SuccessfulOperation"
|
||||||
|
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
|
||||||
uppercase_operation_id: "CREATE_USER"
|
uppercase_operation_id: "CREATE_USER"
|
||||||
uppercase_message: "SUCCESSFUL_OPERATION"
|
|
||||||
operation_id: "create_user"
|
operation_id: "create_user"
|
||||||
uppercase_operation_id: "CREATE_USER"
|
uppercase_operation_id: "CREATE_USER"
|
||||||
path: "/user"
|
path: "/user"
|
||||||
@ -612,8 +635,9 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
default:
|
default:
|
||||||
description: "successful operation"
|
description: "successful operation"
|
||||||
|
x-responseId: "SuccessfulOperation"
|
||||||
|
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
|
||||||
uppercase_operation_id: "CREATE_USERS_WITH_ARRAY_INPUT"
|
uppercase_operation_id: "CREATE_USERS_WITH_ARRAY_INPUT"
|
||||||
uppercase_message: "SUCCESSFUL_OPERATION"
|
|
||||||
operation_id: "create_users_with_array_input"
|
operation_id: "create_users_with_array_input"
|
||||||
uppercase_operation_id: "CREATE_USERS_WITH_ARRAY_INPUT"
|
uppercase_operation_id: "CREATE_USERS_WITH_ARRAY_INPUT"
|
||||||
path: "/user/createWithArray"
|
path: "/user/createWithArray"
|
||||||
@ -646,8 +670,9 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
default:
|
default:
|
||||||
description: "successful operation"
|
description: "successful operation"
|
||||||
|
x-responseId: "SuccessfulOperation"
|
||||||
|
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
|
||||||
uppercase_operation_id: "CREATE_USERS_WITH_LIST_INPUT"
|
uppercase_operation_id: "CREATE_USERS_WITH_LIST_INPUT"
|
||||||
uppercase_message: "SUCCESSFUL_OPERATION"
|
|
||||||
operation_id: "create_users_with_list_input"
|
operation_id: "create_users_with_list_input"
|
||||||
uppercase_operation_id: "CREATE_USERS_WITH_LIST_INPUT"
|
uppercase_operation_id: "CREATE_USERS_WITH_LIST_INPUT"
|
||||||
path: "/user/createWithList"
|
path: "/user/createWithList"
|
||||||
@ -692,14 +717,16 @@ paths:
|
|||||||
type: "string"
|
type: "string"
|
||||||
format: "date-time"
|
format: "date-time"
|
||||||
description: "date in UTC when toekn expires"
|
description: "date in UTC when toekn expires"
|
||||||
|
x-responseId: "SuccessfulOperation"
|
||||||
|
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
|
||||||
uppercase_operation_id: "LOGIN_USER"
|
uppercase_operation_id: "LOGIN_USER"
|
||||||
uppercase_message: "SUCCESSFUL_OPERATION"
|
|
||||||
uppercase_data_type: "STRING"
|
uppercase_data_type: "STRING"
|
||||||
producesXml: true
|
producesXml: true
|
||||||
400:
|
400:
|
||||||
description: "Invalid username/password supplied"
|
description: "Invalid username/password supplied"
|
||||||
|
x-responseId: "InvalidUsername"
|
||||||
|
x-uppercaseResponseId: "INVALID_USERNAME"
|
||||||
uppercase_operation_id: "LOGIN_USER"
|
uppercase_operation_id: "LOGIN_USER"
|
||||||
uppercase_message: "INVALID_USERNAME"
|
|
||||||
operation_id: "login_user"
|
operation_id: "login_user"
|
||||||
uppercase_operation_id: "LOGIN_USER"
|
uppercase_operation_id: "LOGIN_USER"
|
||||||
path: "/user/login"
|
path: "/user/login"
|
||||||
@ -719,8 +746,9 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
default:
|
default:
|
||||||
description: "successful operation"
|
description: "successful operation"
|
||||||
|
x-responseId: "SuccessfulOperation"
|
||||||
|
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
|
||||||
uppercase_operation_id: "LOGOUT_USER"
|
uppercase_operation_id: "LOGOUT_USER"
|
||||||
uppercase_message: "SUCCESSFUL_OPERATION"
|
|
||||||
operation_id: "logout_user"
|
operation_id: "logout_user"
|
||||||
uppercase_operation_id: "LOGOUT_USER"
|
uppercase_operation_id: "LOGOUT_USER"
|
||||||
path: "/user/logout"
|
path: "/user/logout"
|
||||||
@ -749,18 +777,21 @@ paths:
|
|||||||
description: "successful operation"
|
description: "successful operation"
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/User"
|
$ref: "#/definitions/User"
|
||||||
|
x-responseId: "SuccessfulOperation"
|
||||||
|
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
|
||||||
uppercase_operation_id: "GET_USER_BY_NAME"
|
uppercase_operation_id: "GET_USER_BY_NAME"
|
||||||
uppercase_message: "SUCCESSFUL_OPERATION"
|
|
||||||
uppercase_data_type: "USER"
|
uppercase_data_type: "USER"
|
||||||
producesXml: true
|
producesXml: true
|
||||||
400:
|
400:
|
||||||
description: "Invalid username supplied"
|
description: "Invalid username supplied"
|
||||||
|
x-responseId: "InvalidUsernameSupplied"
|
||||||
|
x-uppercaseResponseId: "INVALID_USERNAME_SUPPLIED"
|
||||||
uppercase_operation_id: "GET_USER_BY_NAME"
|
uppercase_operation_id: "GET_USER_BY_NAME"
|
||||||
uppercase_message: "INVALID_USERNAME_SUPPLIED"
|
|
||||||
404:
|
404:
|
||||||
description: "User not found"
|
description: "User not found"
|
||||||
|
x-responseId: "UserNotFound"
|
||||||
|
x-uppercaseResponseId: "USER_NOT_FOUND"
|
||||||
uppercase_operation_id: "GET_USER_BY_NAME"
|
uppercase_operation_id: "GET_USER_BY_NAME"
|
||||||
uppercase_message: "USER_NOT_FOUND"
|
|
||||||
operation_id: "get_user_by_name"
|
operation_id: "get_user_by_name"
|
||||||
uppercase_operation_id: "GET_USER_BY_NAME"
|
uppercase_operation_id: "GET_USER_BY_NAME"
|
||||||
path: "/user/:username"
|
path: "/user/:username"
|
||||||
@ -799,12 +830,14 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
400:
|
400:
|
||||||
description: "Invalid user supplied"
|
description: "Invalid user supplied"
|
||||||
|
x-responseId: "InvalidUserSupplied"
|
||||||
|
x-uppercaseResponseId: "INVALID_USER_SUPPLIED"
|
||||||
uppercase_operation_id: "UPDATE_USER"
|
uppercase_operation_id: "UPDATE_USER"
|
||||||
uppercase_message: "INVALID_USER_SUPPLIED"
|
|
||||||
404:
|
404:
|
||||||
description: "User not found"
|
description: "User not found"
|
||||||
|
x-responseId: "UserNotFound"
|
||||||
|
x-uppercaseResponseId: "USER_NOT_FOUND"
|
||||||
uppercase_operation_id: "UPDATE_USER"
|
uppercase_operation_id: "UPDATE_USER"
|
||||||
uppercase_message: "USER_NOT_FOUND"
|
|
||||||
operation_id: "update_user"
|
operation_id: "update_user"
|
||||||
uppercase_operation_id: "UPDATE_USER"
|
uppercase_operation_id: "UPDATE_USER"
|
||||||
path: "/user/:username"
|
path: "/user/:username"
|
||||||
@ -831,12 +864,14 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
400:
|
400:
|
||||||
description: "Invalid username supplied"
|
description: "Invalid username supplied"
|
||||||
|
x-responseId: "InvalidUsernameSupplied"
|
||||||
|
x-uppercaseResponseId: "INVALID_USERNAME_SUPPLIED"
|
||||||
uppercase_operation_id: "DELETE_USER"
|
uppercase_operation_id: "DELETE_USER"
|
||||||
uppercase_message: "INVALID_USERNAME_SUPPLIED"
|
|
||||||
404:
|
404:
|
||||||
description: "User not found"
|
description: "User not found"
|
||||||
|
x-responseId: "UserNotFound"
|
||||||
|
x-uppercaseResponseId: "USER_NOT_FOUND"
|
||||||
uppercase_operation_id: "DELETE_USER"
|
uppercase_operation_id: "DELETE_USER"
|
||||||
uppercase_message: "USER_NOT_FOUND"
|
|
||||||
operation_id: "delete_user"
|
operation_id: "delete_user"
|
||||||
uppercase_operation_id: "DELETE_USER"
|
uppercase_operation_id: "DELETE_USER"
|
||||||
path: "/user/:username"
|
path: "/user/:username"
|
||||||
@ -871,8 +906,9 @@ paths:
|
|||||||
description: "successful operation"
|
description: "successful operation"
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/Client"
|
$ref: "#/definitions/Client"
|
||||||
|
x-responseId: "SuccessfulOperation"
|
||||||
|
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
|
||||||
uppercase_operation_id: "TEST_CLASSNAME"
|
uppercase_operation_id: "TEST_CLASSNAME"
|
||||||
uppercase_message: "SUCCESSFUL_OPERATION"
|
|
||||||
uppercase_data_type: "CLIENT"
|
uppercase_data_type: "CLIENT"
|
||||||
producesJson: true
|
producesJson: true
|
||||||
security:
|
security:
|
||||||
@ -995,12 +1031,14 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
400:
|
400:
|
||||||
description: "Invalid request"
|
description: "Invalid request"
|
||||||
|
x-responseId: "InvalidRequest"
|
||||||
|
x-uppercaseResponseId: "INVALID_REQUEST"
|
||||||
uppercase_operation_id: "TEST_ENUM_PARAMETERS"
|
uppercase_operation_id: "TEST_ENUM_PARAMETERS"
|
||||||
uppercase_message: "INVALID_REQUEST"
|
|
||||||
404:
|
404:
|
||||||
description: "Not found"
|
description: "Not found"
|
||||||
|
x-responseId: "NotFound"
|
||||||
|
x-uppercaseResponseId: "NOT_FOUND"
|
||||||
uppercase_operation_id: "TEST_ENUM_PARAMETERS"
|
uppercase_operation_id: "TEST_ENUM_PARAMETERS"
|
||||||
uppercase_message: "NOT_FOUND"
|
|
||||||
operation_id: "test_enum_parameters"
|
operation_id: "test_enum_parameters"
|
||||||
uppercase_operation_id: "TEST_ENUM_PARAMETERS"
|
uppercase_operation_id: "TEST_ENUM_PARAMETERS"
|
||||||
path: "/fake"
|
path: "/fake"
|
||||||
@ -1144,12 +1182,14 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
400:
|
400:
|
||||||
description: "Invalid username supplied"
|
description: "Invalid username supplied"
|
||||||
|
x-responseId: "InvalidUsernameSupplied"
|
||||||
|
x-uppercaseResponseId: "INVALID_USERNAME_SUPPLIED"
|
||||||
uppercase_operation_id: "TEST_ENDPOINT_PARAMETERS"
|
uppercase_operation_id: "TEST_ENDPOINT_PARAMETERS"
|
||||||
uppercase_message: "INVALID_USERNAME_SUPPLIED"
|
|
||||||
404:
|
404:
|
||||||
description: "User not found"
|
description: "User not found"
|
||||||
|
x-responseId: "UserNotFound"
|
||||||
|
x-uppercaseResponseId: "USER_NOT_FOUND"
|
||||||
uppercase_operation_id: "TEST_ENDPOINT_PARAMETERS"
|
uppercase_operation_id: "TEST_ENDPOINT_PARAMETERS"
|
||||||
uppercase_message: "USER_NOT_FOUND"
|
|
||||||
security:
|
security:
|
||||||
- http_basic_test: []
|
- http_basic_test: []
|
||||||
operation_id: "test_endpoint_parameters"
|
operation_id: "test_endpoint_parameters"
|
||||||
@ -1186,8 +1226,9 @@ paths:
|
|||||||
description: "successful operation"
|
description: "successful operation"
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/Client"
|
$ref: "#/definitions/Client"
|
||||||
|
x-responseId: "SuccessfulOperation"
|
||||||
|
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
|
||||||
uppercase_operation_id: "TEST_CLIENT_MODEL"
|
uppercase_operation_id: "TEST_CLIENT_MODEL"
|
||||||
uppercase_message: "SUCCESSFUL_OPERATION"
|
|
||||||
uppercase_data_type: "CLIENT"
|
uppercase_data_type: "CLIENT"
|
||||||
producesJson: true
|
producesJson: true
|
||||||
operation_id: "test_client_model"
|
operation_id: "test_client_model"
|
||||||
@ -1221,8 +1262,9 @@ paths:
|
|||||||
description: "Output number"
|
description: "Output number"
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/OuterNumber"
|
$ref: "#/definitions/OuterNumber"
|
||||||
|
x-responseId: "OutputNumber"
|
||||||
|
x-uppercaseResponseId: "OUTPUT_NUMBER"
|
||||||
uppercase_operation_id: "FAKE_OUTER_NUMBER_SERIALIZE"
|
uppercase_operation_id: "FAKE_OUTER_NUMBER_SERIALIZE"
|
||||||
uppercase_message: "OUTPUT_NUMBER"
|
|
||||||
uppercase_data_type: "OUTERNUMBER"
|
uppercase_data_type: "OUTERNUMBER"
|
||||||
producesJson: true
|
producesJson: true
|
||||||
operation_id: "fake_outer_number_serialize"
|
operation_id: "fake_outer_number_serialize"
|
||||||
@ -1255,8 +1297,9 @@ paths:
|
|||||||
description: "Output string"
|
description: "Output string"
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/OuterString"
|
$ref: "#/definitions/OuterString"
|
||||||
|
x-responseId: "OutputString"
|
||||||
|
x-uppercaseResponseId: "OUTPUT_STRING"
|
||||||
uppercase_operation_id: "FAKE_OUTER_STRING_SERIALIZE"
|
uppercase_operation_id: "FAKE_OUTER_STRING_SERIALIZE"
|
||||||
uppercase_message: "OUTPUT_STRING"
|
|
||||||
uppercase_data_type: "OUTERSTRING"
|
uppercase_data_type: "OUTERSTRING"
|
||||||
producesJson: true
|
producesJson: true
|
||||||
operation_id: "fake_outer_string_serialize"
|
operation_id: "fake_outer_string_serialize"
|
||||||
@ -1289,8 +1332,9 @@ paths:
|
|||||||
description: "Output boolean"
|
description: "Output boolean"
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/OuterBoolean"
|
$ref: "#/definitions/OuterBoolean"
|
||||||
|
x-responseId: "OutputBoolean"
|
||||||
|
x-uppercaseResponseId: "OUTPUT_BOOLEAN"
|
||||||
uppercase_operation_id: "FAKE_OUTER_BOOLEAN_SERIALIZE"
|
uppercase_operation_id: "FAKE_OUTER_BOOLEAN_SERIALIZE"
|
||||||
uppercase_message: "OUTPUT_BOOLEAN"
|
|
||||||
uppercase_data_type: "OUTERBOOLEAN"
|
uppercase_data_type: "OUTERBOOLEAN"
|
||||||
producesJson: true
|
producesJson: true
|
||||||
operation_id: "fake_outer_boolean_serialize"
|
operation_id: "fake_outer_boolean_serialize"
|
||||||
@ -1323,8 +1367,9 @@ paths:
|
|||||||
description: "Output composite"
|
description: "Output composite"
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/OuterComposite"
|
$ref: "#/definitions/OuterComposite"
|
||||||
|
x-responseId: "OutputComposite"
|
||||||
|
x-uppercaseResponseId: "OUTPUT_COMPOSITE"
|
||||||
uppercase_operation_id: "FAKE_OUTER_COMPOSITE_SERIALIZE"
|
uppercase_operation_id: "FAKE_OUTER_COMPOSITE_SERIALIZE"
|
||||||
uppercase_message: "OUTPUT_COMPOSITE"
|
|
||||||
uppercase_data_type: "OUTERCOMPOSITE"
|
uppercase_data_type: "OUTERCOMPOSITE"
|
||||||
producesJson: true
|
producesJson: true
|
||||||
operation_id: "fake_outer_composite_serialize"
|
operation_id: "fake_outer_composite_serialize"
|
||||||
@ -1359,8 +1404,9 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: "successful operation"
|
description: "successful operation"
|
||||||
|
x-responseId: "SuccessfulOperation"
|
||||||
|
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
|
||||||
uppercase_operation_id: "TEST_JSON_FORM_DATA"
|
uppercase_operation_id: "TEST_JSON_FORM_DATA"
|
||||||
uppercase_message: "SUCCESSFUL_OPERATION"
|
|
||||||
operation_id: "test_json_form_data"
|
operation_id: "test_json_form_data"
|
||||||
uppercase_operation_id: "TEST_JSON_FORM_DATA"
|
uppercase_operation_id: "TEST_JSON_FORM_DATA"
|
||||||
path: "/fake/jsonFormData"
|
path: "/fake/jsonFormData"
|
||||||
@ -1394,8 +1440,9 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: "successful operation"
|
description: "successful operation"
|
||||||
|
x-responseId: "SuccessfulOperation"
|
||||||
|
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
|
||||||
uppercase_operation_id: "TEST_INLINE_ADDITIONAL_PROPERTIES"
|
uppercase_operation_id: "TEST_INLINE_ADDITIONAL_PROPERTIES"
|
||||||
uppercase_message: "SUCCESSFUL_OPERATION"
|
|
||||||
operation_id: "test_inline_additional_properties"
|
operation_id: "test_inline_additional_properties"
|
||||||
uppercase_operation_id: "TEST_INLINE_ADDITIONAL_PROPERTIES"
|
uppercase_operation_id: "TEST_INLINE_ADDITIONAL_PROPERTIES"
|
||||||
path: "/fake/inline-additionalProperties"
|
path: "/fake/inline-additionalProperties"
|
||||||
@ -1432,8 +1479,9 @@ paths:
|
|||||||
description: "successful operation"
|
description: "successful operation"
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/Client"
|
$ref: "#/definitions/Client"
|
||||||
|
x-responseId: "SuccessfulOperation"
|
||||||
|
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
|
||||||
uppercase_operation_id: "TEST_SPECIAL_TAGS"
|
uppercase_operation_id: "TEST_SPECIAL_TAGS"
|
||||||
uppercase_message: "SUCCESSFUL_OPERATION"
|
|
||||||
uppercase_data_type: "CLIENT"
|
uppercase_data_type: "CLIENT"
|
||||||
producesJson: true
|
producesJson: true
|
||||||
operation_id: "test_special_tags"
|
operation_id: "test_special_tags"
|
||||||
@ -1487,12 +1535,12 @@ definitions:
|
|||||||
type: "boolean"
|
type: "boolean"
|
||||||
default: false
|
default: false
|
||||||
example:
|
example:
|
||||||
id: 0
|
|
||||||
petId: 6
|
petId: 6
|
||||||
|
quantity: 1
|
||||||
|
id: 0
|
||||||
|
shipDate: "2000-01-23T04:56:07.000+00:00"
|
||||||
complete: false
|
complete: false
|
||||||
status: "placed"
|
status: "placed"
|
||||||
quantity: 1
|
|
||||||
shipDate: "2000-01-23T04:56:07.000+00:00"
|
|
||||||
xml:
|
xml:
|
||||||
name: "Order"
|
name: "Order"
|
||||||
upperCaseName: "ORDER"
|
upperCaseName: "ORDER"
|
||||||
@ -1505,8 +1553,8 @@ definitions:
|
|||||||
name:
|
name:
|
||||||
type: "string"
|
type: "string"
|
||||||
example:
|
example:
|
||||||
id: 6
|
|
||||||
name: "name"
|
name: "name"
|
||||||
|
id: 6
|
||||||
xml:
|
xml:
|
||||||
name: "Category"
|
name: "Category"
|
||||||
upperCaseName: "CATEGORY"
|
upperCaseName: "CATEGORY"
|
||||||
@ -1534,14 +1582,14 @@ definitions:
|
|||||||
format: "int32"
|
format: "int32"
|
||||||
description: "User Status"
|
description: "User Status"
|
||||||
example:
|
example:
|
||||||
id: 0
|
|
||||||
lastName: "lastName"
|
|
||||||
phone: "phone"
|
|
||||||
username: "username"
|
|
||||||
email: "email"
|
|
||||||
userStatus: 6
|
|
||||||
firstName: "firstName"
|
firstName: "firstName"
|
||||||
|
lastName: "lastName"
|
||||||
password: "password"
|
password: "password"
|
||||||
|
userStatus: 6
|
||||||
|
phone: "phone"
|
||||||
|
id: 0
|
||||||
|
email: "email"
|
||||||
|
username: "username"
|
||||||
xml:
|
xml:
|
||||||
name: "User"
|
name: "User"
|
||||||
upperCaseName: "USER"
|
upperCaseName: "USER"
|
||||||
@ -1554,8 +1602,8 @@ definitions:
|
|||||||
name:
|
name:
|
||||||
type: "string"
|
type: "string"
|
||||||
example:
|
example:
|
||||||
id: 1
|
|
||||||
name: "name"
|
name: "name"
|
||||||
|
id: 1
|
||||||
xml:
|
xml:
|
||||||
name: "Tag"
|
name: "Tag"
|
||||||
upperCaseName: "TAG"
|
upperCaseName: "TAG"
|
||||||
@ -1596,20 +1644,20 @@ definitions:
|
|||||||
- "pending"
|
- "pending"
|
||||||
- "sold"
|
- "sold"
|
||||||
example:
|
example:
|
||||||
tags:
|
|
||||||
- id: 1
|
|
||||||
name: "name"
|
|
||||||
- id: 1
|
|
||||||
name: "name"
|
|
||||||
id: 0
|
|
||||||
category:
|
|
||||||
id: 6
|
|
||||||
name: "name"
|
|
||||||
status: "available"
|
|
||||||
name: "doggie"
|
|
||||||
photoUrls:
|
photoUrls:
|
||||||
- "photoUrls"
|
- "photoUrls"
|
||||||
- "photoUrls"
|
- "photoUrls"
|
||||||
|
name: "doggie"
|
||||||
|
id: 0
|
||||||
|
category:
|
||||||
|
name: "name"
|
||||||
|
id: 6
|
||||||
|
tags:
|
||||||
|
- name: "name"
|
||||||
|
id: 1
|
||||||
|
- name: "name"
|
||||||
|
id: 1
|
||||||
|
status: "available"
|
||||||
xml:
|
xml:
|
||||||
name: "Pet"
|
name: "Pet"
|
||||||
upperCaseName: "PET"
|
upperCaseName: "PET"
|
||||||
@ -1624,9 +1672,9 @@ definitions:
|
|||||||
message:
|
message:
|
||||||
type: "string"
|
type: "string"
|
||||||
example:
|
example:
|
||||||
message: "message"
|
|
||||||
code: 0
|
code: 0
|
||||||
type: "type"
|
type: "type"
|
||||||
|
message: "message"
|
||||||
upperCaseName: "APIRESPONSE"
|
upperCaseName: "APIRESPONSE"
|
||||||
$special[model.name]:
|
$special[model.name]:
|
||||||
properties:
|
properties:
|
||||||
@ -1979,8 +2027,8 @@ definitions:
|
|||||||
my_boolean:
|
my_boolean:
|
||||||
$ref: "#/definitions/OuterBoolean"
|
$ref: "#/definitions/OuterBoolean"
|
||||||
example:
|
example:
|
||||||
my_number: {}
|
|
||||||
my_string: {}
|
my_string: {}
|
||||||
|
my_number: {}
|
||||||
my_boolean: {}
|
my_boolean: {}
|
||||||
upperCaseName: "OUTERCOMPOSITE"
|
upperCaseName: "OUTERCOMPOSITE"
|
||||||
OuterNumber:
|
OuterNumber:
|
||||||
|
@ -35,173 +35,221 @@ pub use swagger::{ApiError, Context, ContextWrapper};
|
|||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum TestSpecialTagsResponse {
|
pub enum TestSpecialTagsResponse {
|
||||||
|
/// successful operation
|
||||||
SuccessfulOperation ( models::Client ) ,
|
SuccessfulOperation ( models::Client ) ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum FakeOuterBooleanSerializeResponse {
|
pub enum FakeOuterBooleanSerializeResponse {
|
||||||
|
/// Output boolean
|
||||||
OutputBoolean ( models::OuterBoolean ) ,
|
OutputBoolean ( models::OuterBoolean ) ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum FakeOuterCompositeSerializeResponse {
|
pub enum FakeOuterCompositeSerializeResponse {
|
||||||
|
/// Output composite
|
||||||
OutputComposite ( models::OuterComposite ) ,
|
OutputComposite ( models::OuterComposite ) ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum FakeOuterNumberSerializeResponse {
|
pub enum FakeOuterNumberSerializeResponse {
|
||||||
|
/// Output number
|
||||||
OutputNumber ( models::OuterNumber ) ,
|
OutputNumber ( models::OuterNumber ) ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum FakeOuterStringSerializeResponse {
|
pub enum FakeOuterStringSerializeResponse {
|
||||||
|
/// Output string
|
||||||
OutputString ( models::OuterString ) ,
|
OutputString ( models::OuterString ) ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum TestClientModelResponse {
|
pub enum TestClientModelResponse {
|
||||||
|
/// successful operation
|
||||||
SuccessfulOperation ( models::Client ) ,
|
SuccessfulOperation ( models::Client ) ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum TestEndpointParametersResponse {
|
pub enum TestEndpointParametersResponse {
|
||||||
|
/// Invalid username supplied
|
||||||
InvalidUsernameSupplied ,
|
InvalidUsernameSupplied ,
|
||||||
|
/// User not found
|
||||||
UserNotFound ,
|
UserNotFound ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum TestEnumParametersResponse {
|
pub enum TestEnumParametersResponse {
|
||||||
|
/// Invalid request
|
||||||
InvalidRequest ,
|
InvalidRequest ,
|
||||||
|
/// Not found
|
||||||
NotFound ,
|
NotFound ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum TestInlineAdditionalPropertiesResponse {
|
pub enum TestInlineAdditionalPropertiesResponse {
|
||||||
|
/// successful operation
|
||||||
SuccessfulOperation ,
|
SuccessfulOperation ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum TestJsonFormDataResponse {
|
pub enum TestJsonFormDataResponse {
|
||||||
|
/// successful operation
|
||||||
SuccessfulOperation ,
|
SuccessfulOperation ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum TestClassnameResponse {
|
pub enum TestClassnameResponse {
|
||||||
|
/// successful operation
|
||||||
SuccessfulOperation ( models::Client ) ,
|
SuccessfulOperation ( models::Client ) ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum AddPetResponse {
|
pub enum AddPetResponse {
|
||||||
|
/// Invalid input
|
||||||
InvalidInput ,
|
InvalidInput ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum DeletePetResponse {
|
pub enum DeletePetResponse {
|
||||||
|
/// Invalid pet value
|
||||||
InvalidPetValue ,
|
InvalidPetValue ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum FindPetsByStatusResponse {
|
pub enum FindPetsByStatusResponse {
|
||||||
|
/// successful operation
|
||||||
SuccessfulOperation ( Vec<models::Pet> ) ,
|
SuccessfulOperation ( Vec<models::Pet> ) ,
|
||||||
|
/// Invalid status value
|
||||||
InvalidStatusValue ,
|
InvalidStatusValue ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum FindPetsByTagsResponse {
|
pub enum FindPetsByTagsResponse {
|
||||||
|
/// successful operation
|
||||||
SuccessfulOperation ( Vec<models::Pet> ) ,
|
SuccessfulOperation ( Vec<models::Pet> ) ,
|
||||||
|
/// Invalid tag value
|
||||||
InvalidTagValue ,
|
InvalidTagValue ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum GetPetByIdResponse {
|
pub enum GetPetByIdResponse {
|
||||||
|
/// successful operation
|
||||||
SuccessfulOperation ( models::Pet ) ,
|
SuccessfulOperation ( models::Pet ) ,
|
||||||
|
/// Invalid ID supplied
|
||||||
InvalidIDSupplied ,
|
InvalidIDSupplied ,
|
||||||
|
/// Pet not found
|
||||||
PetNotFound ,
|
PetNotFound ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum UpdatePetResponse {
|
pub enum UpdatePetResponse {
|
||||||
|
/// Invalid ID supplied
|
||||||
InvalidIDSupplied ,
|
InvalidIDSupplied ,
|
||||||
|
/// Pet not found
|
||||||
PetNotFound ,
|
PetNotFound ,
|
||||||
|
/// Validation exception
|
||||||
ValidationException ,
|
ValidationException ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum UpdatePetWithFormResponse {
|
pub enum UpdatePetWithFormResponse {
|
||||||
|
/// Invalid input
|
||||||
InvalidInput ,
|
InvalidInput ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum UploadFileResponse {
|
pub enum UploadFileResponse {
|
||||||
|
/// successful operation
|
||||||
SuccessfulOperation ( models::ApiResponse ) ,
|
SuccessfulOperation ( models::ApiResponse ) ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum DeleteOrderResponse {
|
pub enum DeleteOrderResponse {
|
||||||
|
/// Invalid ID supplied
|
||||||
InvalidIDSupplied ,
|
InvalidIDSupplied ,
|
||||||
|
/// Order not found
|
||||||
OrderNotFound ,
|
OrderNotFound ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum GetInventoryResponse {
|
pub enum GetInventoryResponse {
|
||||||
|
/// successful operation
|
||||||
SuccessfulOperation ( HashMap<String, i32> ) ,
|
SuccessfulOperation ( HashMap<String, i32> ) ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum GetOrderByIdResponse {
|
pub enum GetOrderByIdResponse {
|
||||||
|
/// successful operation
|
||||||
SuccessfulOperation ( models::Order ) ,
|
SuccessfulOperation ( models::Order ) ,
|
||||||
|
/// Invalid ID supplied
|
||||||
InvalidIDSupplied ,
|
InvalidIDSupplied ,
|
||||||
|
/// Order not found
|
||||||
OrderNotFound ,
|
OrderNotFound ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum PlaceOrderResponse {
|
pub enum PlaceOrderResponse {
|
||||||
|
/// successful operation
|
||||||
SuccessfulOperation ( models::Order ) ,
|
SuccessfulOperation ( models::Order ) ,
|
||||||
|
/// Invalid Order
|
||||||
InvalidOrder ,
|
InvalidOrder ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum CreateUserResponse {
|
pub enum CreateUserResponse {
|
||||||
|
/// successful operation
|
||||||
SuccessfulOperation ,
|
SuccessfulOperation ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum CreateUsersWithArrayInputResponse {
|
pub enum CreateUsersWithArrayInputResponse {
|
||||||
|
/// successful operation
|
||||||
SuccessfulOperation ,
|
SuccessfulOperation ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum CreateUsersWithListInputResponse {
|
pub enum CreateUsersWithListInputResponse {
|
||||||
|
/// successful operation
|
||||||
SuccessfulOperation ,
|
SuccessfulOperation ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum DeleteUserResponse {
|
pub enum DeleteUserResponse {
|
||||||
|
/// Invalid username supplied
|
||||||
InvalidUsernameSupplied ,
|
InvalidUsernameSupplied ,
|
||||||
|
/// User not found
|
||||||
UserNotFound ,
|
UserNotFound ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum GetUserByNameResponse {
|
pub enum GetUserByNameResponse {
|
||||||
|
/// successful operation
|
||||||
SuccessfulOperation ( models::User ) ,
|
SuccessfulOperation ( models::User ) ,
|
||||||
|
/// Invalid username supplied
|
||||||
InvalidUsernameSupplied ,
|
InvalidUsernameSupplied ,
|
||||||
|
/// User not found
|
||||||
UserNotFound ,
|
UserNotFound ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum LoginUserResponse {
|
pub enum LoginUserResponse {
|
||||||
|
/// successful operation
|
||||||
SuccessfulOperation { body: String, x_rate_limit: i32, x_expires_after: chrono::DateTime<chrono::Utc> } ,
|
SuccessfulOperation { body: String, x_rate_limit: i32, x_expires_after: chrono::DateTime<chrono::Utc> } ,
|
||||||
|
/// Invalid username/password supplied
|
||||||
InvalidUsername ,
|
InvalidUsername ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum LogoutUserResponse {
|
pub enum LogoutUserResponse {
|
||||||
|
/// successful operation
|
||||||
SuccessfulOperation ,
|
SuccessfulOperation ,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum UpdateUserResponse {
|
pub enum UpdateUserResponse {
|
||||||
|
/// Invalid user supplied
|
||||||
InvalidUserSupplied ,
|
InvalidUserSupplied ,
|
||||||
|
/// User not found
|
||||||
UserNotFound ,
|
UserNotFound ,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -392,11 +392,11 @@ impl EnumTest {
|
|||||||
pub struct FormatTest {
|
pub struct FormatTest {
|
||||||
#[serde(rename = "integer")]
|
#[serde(rename = "integer")]
|
||||||
#[serde(skip_serializing_if="Option::is_none")]
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
pub integer: Option<i32>,
|
pub integer: Option<u8>,
|
||||||
|
|
||||||
#[serde(rename = "int32")]
|
#[serde(rename = "int32")]
|
||||||
#[serde(skip_serializing_if="Option::is_none")]
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
pub int32: Option<i32>,
|
pub int32: Option<u32>,
|
||||||
|
|
||||||
#[serde(rename = "int64")]
|
#[serde(rename = "int64")]
|
||||||
#[serde(skip_serializing_if="Option::is_none")]
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
@ -603,7 +603,7 @@ pub struct Name {
|
|||||||
|
|
||||||
#[serde(rename = "123Number")]
|
#[serde(rename = "123Number")]
|
||||||
#[serde(skip_serializing_if="Option::is_none")]
|
#[serde(skip_serializing_if="Option::is_none")]
|
||||||
pub _123_number: Option<i32>,
|
pub _123_number: Option<isize>,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user