Jeremie Bresson 53597764c3 Add OpenAPI spec 3.0 support (beta)
Co-authored-by: Akihito Nakano <sora.akatsuki@gmail.com>
Co-authored-by: Jeremie Bresson <dev@jmini.fr>
Co-authored-by: Jim Schubert <james.schubert@gmail.com>
Co-authored-by: Martin Delille <martin@phonations.com>
Co-authored-by: Tomasz Prus <tomasz.prus@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2018-04-17 09:19:10 +02:00

2123 lines
58 KiB
YAML

---
swagger: "2.0"
info:
description: "This spec is mainly for testing Petstore server and contains fake\
\ endpoints, models. Please do not use this for any other purpose. Special characters:\
\ \" \\"
version: "1.0.0"
title: "Swagger Petstore"
termsOfService: "http://swagger.io/terms/"
contact:
email: "apiteam@swagger.io"
license:
name: "Apache-2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
host: "petstore.swagger.io:80"
basePath: "/v2"
tags:
- name: "pet"
description: "Everything about your Pets"
externalDocs:
description: "Find out more"
url: "http://swagger.io"
- name: "store"
description: "Access to Petstore orders"
- name: "user"
description: "Operations about user"
externalDocs:
description: "Find out more about our store"
url: "http://swagger.io"
schemes:
- "http"
paths:
/pet:
post:
tags:
- "pet"
summary: "Add a new pet to the store"
description: ""
operationId: "addPet"
consumes:
- "application/json"
- "application/xml"
produces:
- "application/xml"
- "application/json"
parameters:
- in: "body"
name: "body"
description: "Pet object that needs to be added to the store"
required: true
schema:
$ref: "#/definitions/Pet"
uppercase_data_type: "PET"
refName: "Pet"
formatString: "{:?}"
example: "???"
model_key: "OuterBoolean"
uppercase_operation_id: "ADD_PET"
consumesXml: true
responses:
405:
description: "Invalid input"
x-responseId: "InvalidInput"
x-uppercaseResponseId: "INVALID_INPUT"
uppercase_operation_id: "ADD_PET"
security:
- petstore_auth:
- "write:pets"
- "read:pets"
operation_id: "add_pet"
uppercase_operation_id: "ADD_PET"
path: "/pet"
PATH_ID: "PET"
hasPathParams: false
HttpMethod: "Post"
noClientExample: true
put:
tags:
- "pet"
summary: "Update an existing pet"
description: ""
operationId: "updatePet"
consumes:
- "application/json"
- "application/xml"
produces:
- "application/xml"
- "application/json"
parameters:
- in: "body"
name: "body"
description: "Pet object that needs to be added to the store"
required: true
schema:
$ref: "#/definitions/Pet"
uppercase_data_type: "PET"
refName: "Pet"
formatString: "{:?}"
example: "???"
model_key: "OuterBoolean"
uppercase_operation_id: "UPDATE_PET"
consumesXml: true
responses:
400:
description: "Invalid ID supplied"
x-responseId: "InvalidIDSupplied"
x-uppercaseResponseId: "INVALID_ID_SUPPLIED"
uppercase_operation_id: "UPDATE_PET"
404:
description: "Pet not found"
x-responseId: "PetNotFound"
x-uppercaseResponseId: "PET_NOT_FOUND"
uppercase_operation_id: "UPDATE_PET"
405:
description: "Validation exception"
x-responseId: "ValidationException"
x-uppercaseResponseId: "VALIDATION_EXCEPTION"
uppercase_operation_id: "UPDATE_PET"
security:
- petstore_auth:
- "write:pets"
- "read:pets"
operation_id: "update_pet"
uppercase_operation_id: "UPDATE_PET"
path: "/pet"
PATH_ID: "PET"
hasPathParams: false
HttpMethod: "Put"
noClientExample: true
/pet/findByStatus:
get:
tags:
- "pet"
summary: "Finds Pets by status"
description: "Multiple status values can be provided with comma separated strings"
operationId: "findPetsByStatus"
produces:
- "application/xml"
- "application/json"
parameters:
- name: "status"
in: "query"
description: "Status values that need to be considered for filter"
required: true
type: "array"
items:
type: "string"
default: "available"
enum:
- "available"
- "pending"
- "sold"
collectionFormat: "csv"
formatString: "{:?}"
example: "&Vec::new()"
responses:
200:
description: "successful operation"
schema:
type: "array"
items:
$ref: "#/definitions/Pet"
x-responseId: "SuccessfulOperation"
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
uppercase_operation_id: "FIND_PETS_BY_STATUS"
uppercase_data_type: "VEC<PET>"
producesXml: true
400:
description: "Invalid status value"
x-responseId: "InvalidStatusValue"
x-uppercaseResponseId: "INVALID_STATUS_VALUE"
uppercase_operation_id: "FIND_PETS_BY_STATUS"
security:
- petstore_auth:
- "write:pets"
- "read:pets"
operation_id: "find_pets_by_status"
uppercase_operation_id: "FIND_PETS_BY_STATUS"
path: "/pet/findByStatus"
PATH_ID: "PET_FINDBYSTATUS"
hasPathParams: false
HttpMethod: "Get"
/pet/findByTags:
get:
tags:
- "pet"
summary: "Finds Pets by tags"
description: "Multiple tags can be provided with comma separated strings. Use\
\ tag1, tag2, tag3 for testing."
operationId: "findPetsByTags"
produces:
- "application/xml"
- "application/json"
parameters:
- name: "tags"
in: "query"
description: "Tags to filter by"
required: true
type: "array"
items:
type: "string"
collectionFormat: "csv"
formatString: "{:?}"
example: "&Vec::new()"
responses:
200:
description: "successful operation"
schema:
type: "array"
items:
$ref: "#/definitions/Pet"
x-responseId: "SuccessfulOperation"
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
uppercase_operation_id: "FIND_PETS_BY_TAGS"
uppercase_data_type: "VEC<PET>"
producesXml: true
400:
description: "Invalid tag value"
x-responseId: "InvalidTagValue"
x-uppercaseResponseId: "INVALID_TAG_VALUE"
uppercase_operation_id: "FIND_PETS_BY_TAGS"
security:
- petstore_auth:
- "write:pets"
- "read:pets"
deprecated: true
operation_id: "find_pets_by_tags"
uppercase_operation_id: "FIND_PETS_BY_TAGS"
path: "/pet/findByTags"
PATH_ID: "PET_FINDBYTAGS"
hasPathParams: false
HttpMethod: "Get"
/pet/{petId}:
get:
tags:
- "pet"
summary: "Find pet by ID"
description: "Returns a single pet"
operationId: "getPetById"
produces:
- "application/xml"
- "application/json"
parameters:
- name: "petId"
in: "path"
description: "ID of pet to return"
required: true
type: "integer"
format: "int64"
formatString: "{}"
example: "789"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/Pet"
x-responseId: "SuccessfulOperation"
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
uppercase_operation_id: "GET_PET_BY_ID"
uppercase_data_type: "PET"
producesXml: true
400:
description: "Invalid ID supplied"
x-responseId: "InvalidIDSupplied"
x-uppercaseResponseId: "INVALID_ID_SUPPLIED"
uppercase_operation_id: "GET_PET_BY_ID"
404:
description: "Pet not found"
x-responseId: "PetNotFound"
x-uppercaseResponseId: "PET_NOT_FOUND"
uppercase_operation_id: "GET_PET_BY_ID"
security:
- api_key: []
operation_id: "get_pet_by_id"
uppercase_operation_id: "GET_PET_BY_ID"
path: "/pet/:petId"
PATH_ID: "PET_PETID"
hasPathParams: true
HttpMethod: "Get"
post:
tags:
- "pet"
summary: "Updates a pet in the store with form data"
description: ""
operationId: "updatePetWithForm"
consumes:
- "application/x-www-form-urlencoded"
produces:
- "application/xml"
- "application/json"
parameters:
- name: "petId"
in: "path"
description: "ID of pet that needs to be updated"
required: true
type: "integer"
format: "int64"
formatString: "{}"
example: "789"
- name: "name"
in: "formData"
description: "Updated name of the pet"
required: false
type: "string"
formatString: "{:?}"
example: "Some(\"name_example\".to_string())"
- name: "status"
in: "formData"
description: "Updated status of the pet"
required: false
type: "string"
formatString: "{:?}"
example: "Some(\"status_example\".to_string())"
responses:
405:
description: "Invalid input"
x-responseId: "InvalidInput"
x-uppercaseResponseId: "INVALID_INPUT"
uppercase_operation_id: "UPDATE_PET_WITH_FORM"
security:
- petstore_auth:
- "write:pets"
- "read:pets"
operation_id: "update_pet_with_form"
uppercase_operation_id: "UPDATE_PET_WITH_FORM"
path: "/pet/:petId"
PATH_ID: "PET_PETID"
hasPathParams: true
HttpMethod: "Post"
delete:
tags:
- "pet"
summary: "Deletes a pet"
description: ""
operationId: "deletePet"
produces:
- "application/xml"
- "application/json"
parameters:
- name: "api_key"
in: "header"
required: false
type: "string"
formatString: "{:?}"
example: "Some(\"api_key_example\".to_string())"
- name: "petId"
in: "path"
description: "Pet id to delete"
required: true
type: "integer"
format: "int64"
formatString: "{}"
example: "789"
responses:
400:
description: "Invalid pet value"
x-responseId: "InvalidPetValue"
x-uppercaseResponseId: "INVALID_PET_VALUE"
uppercase_operation_id: "DELETE_PET"
security:
- petstore_auth:
- "write:pets"
- "read:pets"
operation_id: "delete_pet"
uppercase_operation_id: "DELETE_PET"
path: "/pet/:petId"
PATH_ID: "PET_PETID"
hasPathParams: true
HttpMethod: "Delete"
/pet/{petId}/uploadImage:
post:
tags:
- "pet"
summary: "uploads an image"
description: ""
operationId: "uploadFile"
consumes:
- "multipart/form-data"
produces:
- "application/json"
parameters:
- name: "petId"
in: "path"
description: "ID of pet to update"
required: true
type: "integer"
format: "int64"
formatString: "{}"
example: "789"
- name: "additionalMetadata"
in: "formData"
description: "Additional data to pass to server"
required: false
type: "string"
formatString: "{:?}"
example: "Some(\"additional_metadata_example\".to_string())"
- name: "file"
in: "formData"
description: "file to upload"
required: false
type: "file"
formatString: "{:?}"
example: "Box::new(future::ok(Some(Box::new(stream::once(Ok(b\"hello\".to_vec())))\
\ as Box<Stream<Item=_, Error=_> + Send>))) as Box<Future<Item=_, Error=_>\
\ + Send>"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/ApiResponse"
x-responseId: "SuccessfulOperation"
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
uppercase_operation_id: "UPLOAD_FILE"
uppercase_data_type: "APIRESPONSE"
producesJson: true
security:
- petstore_auth:
- "write:pets"
- "read:pets"
operation_id: "upload_file"
uppercase_operation_id: "UPLOAD_FILE"
path: "/pet/:petId/uploadImage"
PATH_ID: "PET_PETID_UPLOADIMAGE"
hasPathParams: true
HttpMethod: "Post"
hasFile: true
/store/inventory:
get:
tags:
- "store"
summary: "Returns pet inventories by status"
description: "Returns a map of status codes to quantities"
operationId: "getInventory"
produces:
- "application/json"
parameters: []
responses:
200:
description: "successful operation"
schema:
type: "object"
additionalProperties:
type: "integer"
format: "int32"
x-responseId: "SuccessfulOperation"
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
uppercase_operation_id: "GET_INVENTORY"
uppercase_data_type: "HASHMAP<STRING, I32>"
producesJson: true
security:
- api_key: []
operation_id: "get_inventory"
uppercase_operation_id: "GET_INVENTORY"
path: "/store/inventory"
PATH_ID: "STORE_INVENTORY"
hasPathParams: false
HttpMethod: "Get"
/store/order:
post:
tags:
- "store"
summary: "Place an order for a pet"
description: ""
operationId: "placeOrder"
produces:
- "application/xml"
- "application/json"
parameters:
- in: "body"
name: "body"
description: "order placed for purchasing the pet"
required: true
schema:
$ref: "#/definitions/Order"
uppercase_data_type: "ORDER"
refName: "Order"
formatString: "{:?}"
example: "???"
model_key: "OuterBoolean"
uppercase_operation_id: "PLACE_ORDER"
consumesJson: true
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/Order"
x-responseId: "SuccessfulOperation"
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
uppercase_operation_id: "PLACE_ORDER"
uppercase_data_type: "ORDER"
producesXml: true
400:
description: "Invalid Order"
x-responseId: "InvalidOrder"
x-uppercaseResponseId: "INVALID_ORDER"
uppercase_operation_id: "PLACE_ORDER"
operation_id: "place_order"
uppercase_operation_id: "PLACE_ORDER"
path: "/store/order"
PATH_ID: "STORE_ORDER"
hasPathParams: false
HttpMethod: "Post"
noClientExample: true
/store/order/{order_id}:
get:
tags:
- "store"
summary: "Find purchase order by ID"
description: "For valid response try integer IDs with value <= 5 or > 10. Other\
\ values will generated exceptions"
operationId: "getOrderById"
produces:
- "application/xml"
- "application/json"
parameters:
- name: "order_id"
in: "path"
description: "ID of pet that needs to be fetched"
required: true
type: "integer"
maximum: 5
minimum: 1
format: "int64"
formatString: "{}"
example: "789"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/Order"
x-responseId: "SuccessfulOperation"
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
uppercase_operation_id: "GET_ORDER_BY_ID"
uppercase_data_type: "ORDER"
producesXml: true
400:
description: "Invalid ID supplied"
x-responseId: "InvalidIDSupplied"
x-uppercaseResponseId: "INVALID_ID_SUPPLIED"
uppercase_operation_id: "GET_ORDER_BY_ID"
404:
description: "Order not found"
x-responseId: "OrderNotFound"
x-uppercaseResponseId: "ORDER_NOT_FOUND"
uppercase_operation_id: "GET_ORDER_BY_ID"
operation_id: "get_order_by_id"
uppercase_operation_id: "GET_ORDER_BY_ID"
path: "/store/order/:order_id"
PATH_ID: "STORE_ORDER_ORDER_ID"
hasPathParams: true
HttpMethod: "Get"
delete:
tags:
- "store"
summary: "Delete purchase order by ID"
description: "For valid response try integer IDs with value < 1000. Anything\
\ above 1000 or nonintegers will generate API errors"
operationId: "deleteOrder"
produces:
- "application/xml"
- "application/json"
parameters:
- name: "order_id"
in: "path"
description: "ID of the order that needs to be deleted"
required: true
type: "string"
formatString: "\\\"{}\\\""
example: "\"order_id_example\".to_string()"
responses:
400:
description: "Invalid ID supplied"
x-responseId: "InvalidIDSupplied"
x-uppercaseResponseId: "INVALID_ID_SUPPLIED"
uppercase_operation_id: "DELETE_ORDER"
404:
description: "Order not found"
x-responseId: "OrderNotFound"
x-uppercaseResponseId: "ORDER_NOT_FOUND"
uppercase_operation_id: "DELETE_ORDER"
operation_id: "delete_order"
uppercase_operation_id: "DELETE_ORDER"
path: "/store/order/:order_id"
PATH_ID: "STORE_ORDER_ORDER_ID"
hasPathParams: true
HttpMethod: "Delete"
/user:
post:
tags:
- "user"
summary: "Create user"
description: "This can only be done by the logged in user."
operationId: "createUser"
produces:
- "application/xml"
- "application/json"
parameters:
- in: "body"
name: "body"
description: "Created user object"
required: true
schema:
$ref: "#/definitions/User"
uppercase_data_type: "USER"
refName: "User"
formatString: "{:?}"
example: "???"
model_key: "OuterBoolean"
uppercase_operation_id: "CREATE_USER"
consumesJson: true
responses:
default:
description: "successful operation"
x-responseId: "SuccessfulOperation"
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
uppercase_operation_id: "CREATE_USER"
operation_id: "create_user"
uppercase_operation_id: "CREATE_USER"
path: "/user"
PATH_ID: "USER"
hasPathParams: false
HttpMethod: "Post"
noClientExample: true
/user/createWithArray:
post:
tags:
- "user"
summary: "Creates list of users with given input array"
description: ""
operationId: "createUsersWithArrayInput"
produces:
- "application/xml"
- "application/json"
parameters:
- in: "body"
name: "body"
description: "List of user object"
required: true
schema:
type: "array"
items:
$ref: "#/definitions/User"
formatString: "{:?}"
example: "&Vec::new()"
model_key: "OuterBoolean"
uppercase_operation_id: "CREATE_USERS_WITH_ARRAY_INPUT"
consumesJson: true
responses:
default:
description: "successful operation"
x-responseId: "SuccessfulOperation"
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
uppercase_operation_id: "CREATE_USERS_WITH_ARRAY_INPUT"
operation_id: "create_users_with_array_input"
uppercase_operation_id: "CREATE_USERS_WITH_ARRAY_INPUT"
path: "/user/createWithArray"
PATH_ID: "USER_CREATEWITHARRAY"
hasPathParams: false
HttpMethod: "Post"
/user/createWithList:
post:
tags:
- "user"
summary: "Creates list of users with given input array"
description: ""
operationId: "createUsersWithListInput"
produces:
- "application/xml"
- "application/json"
parameters:
- in: "body"
name: "body"
description: "List of user object"
required: true
schema:
type: "array"
items:
$ref: "#/definitions/User"
formatString: "{:?}"
example: "&Vec::new()"
model_key: "OuterBoolean"
uppercase_operation_id: "CREATE_USERS_WITH_LIST_INPUT"
consumesJson: true
responses:
default:
description: "successful operation"
x-responseId: "SuccessfulOperation"
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
uppercase_operation_id: "CREATE_USERS_WITH_LIST_INPUT"
operation_id: "create_users_with_list_input"
uppercase_operation_id: "CREATE_USERS_WITH_LIST_INPUT"
path: "/user/createWithList"
PATH_ID: "USER_CREATEWITHLIST"
hasPathParams: false
HttpMethod: "Post"
/user/login:
get:
tags:
- "user"
summary: "Logs user into the system"
description: ""
operationId: "loginUser"
produces:
- "application/xml"
- "application/json"
parameters:
- name: "username"
in: "query"
description: "The user name for login"
required: true
type: "string"
formatString: "\\\"{}\\\""
example: "\"username_example\".to_string()"
- name: "password"
in: "query"
description: "The password for login in clear text"
required: true
type: "string"
formatString: "\\\"{}\\\""
example: "\"password_example\".to_string()"
responses:
200:
description: "successful operation"
schema:
type: "string"
headers:
X-Rate-Limit:
type: "integer"
format: "int32"
description: "calls per hour allowed by the user"
X-Expires-After:
type: "string"
format: "date-time"
description: "date in UTC when token expires"
x-responseId: "SuccessfulOperation"
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
uppercase_operation_id: "LOGIN_USER"
uppercase_data_type: "STRING"
producesXml: true
400:
description: "Invalid username/password supplied"
x-responseId: "InvalidUsername"
x-uppercaseResponseId: "INVALID_USERNAME"
uppercase_operation_id: "LOGIN_USER"
operation_id: "login_user"
uppercase_operation_id: "LOGIN_USER"
path: "/user/login"
PATH_ID: "USER_LOGIN"
hasPathParams: false
HttpMethod: "Get"
/user/logout:
get:
tags:
- "user"
summary: "Logs out current logged in user session"
description: ""
operationId: "logoutUser"
produces:
- "application/xml"
- "application/json"
parameters: []
responses:
default:
description: "successful operation"
x-responseId: "SuccessfulOperation"
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
uppercase_operation_id: "LOGOUT_USER"
operation_id: "logout_user"
uppercase_operation_id: "LOGOUT_USER"
path: "/user/logout"
PATH_ID: "USER_LOGOUT"
hasPathParams: false
HttpMethod: "Get"
/user/{username}:
get:
tags:
- "user"
summary: "Get user by user name"
description: ""
operationId: "getUserByName"
produces:
- "application/xml"
- "application/json"
parameters:
- name: "username"
in: "path"
description: "The name that needs to be fetched. Use user1 for testing."
required: true
type: "string"
formatString: "\\\"{}\\\""
example: "\"username_example\".to_string()"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/User"
x-responseId: "SuccessfulOperation"
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
uppercase_operation_id: "GET_USER_BY_NAME"
uppercase_data_type: "USER"
producesXml: true
400:
description: "Invalid username supplied"
x-responseId: "InvalidUsernameSupplied"
x-uppercaseResponseId: "INVALID_USERNAME_SUPPLIED"
uppercase_operation_id: "GET_USER_BY_NAME"
404:
description: "User not found"
x-responseId: "UserNotFound"
x-uppercaseResponseId: "USER_NOT_FOUND"
uppercase_operation_id: "GET_USER_BY_NAME"
operation_id: "get_user_by_name"
uppercase_operation_id: "GET_USER_BY_NAME"
path: "/user/:username"
PATH_ID: "USER_USERNAME"
hasPathParams: true
HttpMethod: "Get"
put:
tags:
- "user"
summary: "Updated user"
description: "This can only be done by the logged in user."
operationId: "updateUser"
produces:
- "application/xml"
- "application/json"
parameters:
- name: "username"
in: "path"
description: "name that need to be deleted"
required: true
type: "string"
formatString: "\\\"{}\\\""
example: "\"username_example\".to_string()"
- in: "body"
name: "body"
description: "Updated user object"
required: true
schema:
$ref: "#/definitions/User"
uppercase_data_type: "USER"
refName: "User"
formatString: "{:?}"
example: "???"
model_key: "OuterBoolean"
uppercase_operation_id: "UPDATE_USER"
consumesJson: true
responses:
400:
description: "Invalid user supplied"
x-responseId: "InvalidUserSupplied"
x-uppercaseResponseId: "INVALID_USER_SUPPLIED"
uppercase_operation_id: "UPDATE_USER"
404:
description: "User not found"
x-responseId: "UserNotFound"
x-uppercaseResponseId: "USER_NOT_FOUND"
uppercase_operation_id: "UPDATE_USER"
operation_id: "update_user"
uppercase_operation_id: "UPDATE_USER"
path: "/user/:username"
PATH_ID: "USER_USERNAME"
hasPathParams: true
HttpMethod: "Put"
noClientExample: true
delete:
tags:
- "user"
summary: "Delete user"
description: "This can only be done by the logged in user."
operationId: "deleteUser"
produces:
- "application/xml"
- "application/json"
parameters:
- name: "username"
in: "path"
description: "The name that needs to be deleted"
required: true
type: "string"
formatString: "\\\"{}\\\""
example: "\"username_example\".to_string()"
responses:
400:
description: "Invalid username supplied"
x-responseId: "InvalidUsernameSupplied"
x-uppercaseResponseId: "INVALID_USERNAME_SUPPLIED"
uppercase_operation_id: "DELETE_USER"
404:
description: "User not found"
x-responseId: "UserNotFound"
x-uppercaseResponseId: "USER_NOT_FOUND"
uppercase_operation_id: "DELETE_USER"
operation_id: "delete_user"
uppercase_operation_id: "DELETE_USER"
path: "/user/:username"
PATH_ID: "USER_USERNAME"
hasPathParams: true
HttpMethod: "Delete"
/fake_classname_test:
patch:
tags:
- "fake_classname_tags 123#$%^"
summary: "To test class name in snake case"
description: "To test class name in snake case"
operationId: "testClassname"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "body"
description: "client model"
required: true
schema:
$ref: "#/definitions/Client"
uppercase_data_type: "CLIENT"
refName: "Client"
formatString: "{:?}"
example: "???"
model_key: "OuterBoolean"
uppercase_operation_id: "TEST_CLASSNAME"
consumesJson: true
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/Client"
x-responseId: "SuccessfulOperation"
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
uppercase_operation_id: "TEST_CLASSNAME"
uppercase_data_type: "CLIENT"
producesJson: true
security:
- api_key_query: []
operation_id: "test_classname"
uppercase_operation_id: "TEST_CLASSNAME"
path: "/fake_classname_test"
PATH_ID: "FAKE_CLASSNAME_TEST"
hasPathParams: false
HttpMethod: "Patch"
noClientExample: true
/fake:
get:
tags:
- "fake"
summary: "To test enum parameters"
description: "To test enum parameters"
operationId: "testEnumParameters"
consumes:
- "*/*"
produces:
- "*/*"
parameters:
- name: "enum_form_string_array"
in: "formData"
description: "Form parameter enum test (string array)"
required: false
type: "array"
items:
type: "string"
default: "$"
enum:
- ">"
- "$"
formatString: "{:?}"
example: "Some(&Vec::new())"
- name: "enum_form_string"
in: "formData"
description: "Form parameter enum test (string)"
required: false
type: "string"
default: "-efg"
enum:
- "_abc"
- "-efg"
- "(xyz)"
formatString: "{:?}"
example: "Some(\"enum_form_string_example\".to_string())"
- name: "enum_header_string_array"
in: "header"
description: "Header parameter enum test (string array)"
required: false
type: "array"
items:
type: "string"
default: "$"
enum:
- ">"
- "$"
formatString: "{:?}"
example: "Some(&Vec::new())"
- name: "enum_header_string"
in: "header"
description: "Header parameter enum test (string)"
required: false
type: "string"
default: "-efg"
enum:
- "_abc"
- "-efg"
- "(xyz)"
formatString: "{:?}"
example: "Some(\"enum_header_string_example\".to_string())"
- name: "enum_query_string_array"
in: "query"
description: "Query parameter enum test (string array)"
required: false
type: "array"
items:
type: "string"
default: "$"
enum:
- ">"
- "$"
formatString: "{:?}"
example: "Some(&Vec::new())"
- name: "enum_query_string"
in: "query"
description: "Query parameter enum test (string)"
required: false
type: "string"
default: "-efg"
enum:
- "_abc"
- "-efg"
- "(xyz)"
formatString: "{:?}"
example: "Some(\"enum_query_string_example\".to_string())"
- name: "enum_query_integer"
in: "query"
description: "Query parameter enum test (double)"
required: false
type: "integer"
format: "int32"
enum:
- 1
- -2
formatString: "{:?}"
example: "Some(56)"
- name: "enum_query_double"
in: "formData"
description: "Query parameter enum test (double)"
required: false
type: "number"
format: "double"
enum:
- 1.1
- -1.2
formatString: "{:?}"
example: "Some(1.2)"
responses:
400:
description: "Invalid request"
x-responseId: "InvalidRequest"
x-uppercaseResponseId: "INVALID_REQUEST"
uppercase_operation_id: "TEST_ENUM_PARAMETERS"
404:
description: "Not found"
x-responseId: "NotFound"
x-uppercaseResponseId: "NOT_FOUND"
uppercase_operation_id: "TEST_ENUM_PARAMETERS"
operation_id: "test_enum_parameters"
uppercase_operation_id: "TEST_ENUM_PARAMETERS"
path: "/fake"
PATH_ID: "FAKE"
hasPathParams: false
HttpMethod: "Get"
post:
tags:
- "fake"
summary: "Fake endpoint for testing various parameters\n假端點\n偽のエンドポイント\n가짜 엔\
드 포인트\n"
description: "Fake endpoint for testing various parameters\n假端點\n偽のエンドポイント\n\
가짜 엔드 포인트\n"
operationId: "testEndpointParameters"
consumes:
- "application/xml; charset=utf-8"
- "application/json; charset=utf-8"
produces:
- "application/xml; charset=utf-8"
- "application/json; charset=utf-8"
parameters:
- name: "integer"
in: "formData"
description: "None"
required: false
type: "integer"
maximum: 100
minimum: 10
formatString: "{:?}"
example: "Some(56)"
- name: "int32"
in: "formData"
description: "None"
required: false
type: "integer"
maximum: 200
minimum: 20
format: "int32"
formatString: "{:?}"
example: "Some(56)"
- name: "int64"
in: "formData"
description: "None"
required: false
type: "integer"
format: "int64"
formatString: "{:?}"
example: "Some(789)"
- name: "number"
in: "formData"
description: "None"
required: true
type: "number"
maximum: 543.2
minimum: 32.1
formatString: "{}"
example: "8.14"
- name: "float"
in: "formData"
description: "None"
required: false
type: "number"
maximum: 987.6
format: "float"
formatString: "{:?}"
example: "Some(3.4)"
- name: "double"
in: "formData"
description: "None"
required: true
type: "number"
maximum: 123.4
minimum: 67.8
format: "double"
formatString: "{}"
example: "1.2"
- name: "string"
in: "formData"
description: "None"
required: false
type: "string"
pattern: "/[a-z]/i"
formatString: "{:?}"
example: "Some(\"string_example\".to_string())"
- name: "pattern_without_delimiter"
in: "formData"
description: "None"
required: true
type: "string"
pattern: "^[A-Z].*"
formatString: "\\\"{}\\\""
example: "\"pattern_without_delimiter_example\".to_string()"
- name: "byte"
in: "formData"
description: "None"
required: true
type: "string"
format: "byte"
formatString: "{:?}"
example: "swagger::ByteArray(Vec::from(\"B\"))"
- name: "binary"
in: "formData"
description: "None"
required: false
type: "string"
format: "binary"
formatString: "{:?}"
example: "Some(swagger::ByteArray(Vec::from(\"B\")))"
- name: "date"
in: "formData"
description: "None"
required: false
type: "string"
format: "date"
formatString: "{:?}"
example: "None"
- name: "dateTime"
in: "formData"
description: "None"
required: false
type: "string"
format: "date-time"
formatString: "{:?}"
example: "None"
- name: "password"
in: "formData"
description: "None"
required: false
type: "string"
maxLength: 64
minLength: 10
format: "password"
formatString: "{:?}"
example: "Some(\"password_example\".to_string())"
- name: "callback"
in: "formData"
description: "None"
required: false
type: "string"
formatString: "{:?}"
example: "Some(\"callback_example\".to_string())"
responses:
400:
description: "Invalid username supplied"
x-responseId: "InvalidUsernameSupplied"
x-uppercaseResponseId: "INVALID_USERNAME_SUPPLIED"
uppercase_operation_id: "TEST_ENDPOINT_PARAMETERS"
404:
description: "User not found"
x-responseId: "UserNotFound"
x-uppercaseResponseId: "USER_NOT_FOUND"
uppercase_operation_id: "TEST_ENDPOINT_PARAMETERS"
security:
- http_basic_test: []
operation_id: "test_endpoint_parameters"
uppercase_operation_id: "TEST_ENDPOINT_PARAMETERS"
path: "/fake"
PATH_ID: "FAKE"
hasPathParams: false
HttpMethod: "Post"
patch:
tags:
- "fake"
summary: "To test \"client\" model"
description: "To test \"client\" model"
operationId: "testClientModel"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "body"
description: "client model"
required: true
schema:
$ref: "#/definitions/Client"
uppercase_data_type: "CLIENT"
refName: "Client"
formatString: "{:?}"
example: "???"
model_key: "OuterBoolean"
uppercase_operation_id: "TEST_CLIENT_MODEL"
consumesJson: true
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/Client"
x-responseId: "SuccessfulOperation"
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
uppercase_operation_id: "TEST_CLIENT_MODEL"
uppercase_data_type: "CLIENT"
producesJson: true
operation_id: "test_client_model"
uppercase_operation_id: "TEST_CLIENT_MODEL"
path: "/fake"
PATH_ID: "FAKE"
hasPathParams: false
HttpMethod: "Patch"
noClientExample: true
/fake/outer/number:
post:
tags:
- "fake"
description: "Test serialization of outer number types"
operationId: "fakeOuterNumberSerialize"
parameters:
- in: "body"
name: "body"
description: "Input number as post body"
required: false
schema:
$ref: "#/definitions/OuterNumber"
uppercase_data_type: "OUTERNUMBER"
refName: "OuterNumber"
formatString: "{:?}"
example: "None"
model_key: "OuterBoolean"
uppercase_operation_id: "FAKE_OUTER_NUMBER_SERIALIZE"
consumesJson: true
responses:
200:
description: "Output number"
schema:
$ref: "#/definitions/OuterNumber"
x-responseId: "OutputNumber"
x-uppercaseResponseId: "OUTPUT_NUMBER"
uppercase_operation_id: "FAKE_OUTER_NUMBER_SERIALIZE"
uppercase_data_type: "OUTERNUMBER"
producesJson: true
operation_id: "fake_outer_number_serialize"
uppercase_operation_id: "FAKE_OUTER_NUMBER_SERIALIZE"
path: "/fake/outer/number"
PATH_ID: "FAKE_OUTER_NUMBER"
hasPathParams: false
HttpMethod: "Post"
/fake/outer/string:
post:
tags:
- "fake"
description: "Test serialization of outer string types"
operationId: "fakeOuterStringSerialize"
parameters:
- in: "body"
name: "body"
description: "Input string as post body"
required: false
schema:
$ref: "#/definitions/OuterString"
uppercase_data_type: "OUTERSTRING"
refName: "OuterString"
formatString: "{:?}"
example: "None"
model_key: "OuterBoolean"
uppercase_operation_id: "FAKE_OUTER_STRING_SERIALIZE"
consumesJson: true
responses:
200:
description: "Output string"
schema:
$ref: "#/definitions/OuterString"
x-responseId: "OutputString"
x-uppercaseResponseId: "OUTPUT_STRING"
uppercase_operation_id: "FAKE_OUTER_STRING_SERIALIZE"
uppercase_data_type: "OUTERSTRING"
producesJson: true
operation_id: "fake_outer_string_serialize"
uppercase_operation_id: "FAKE_OUTER_STRING_SERIALIZE"
path: "/fake/outer/string"
PATH_ID: "FAKE_OUTER_STRING"
hasPathParams: false
HttpMethod: "Post"
/fake/outer/boolean:
post:
tags:
- "fake"
description: "Test serialization of outer boolean types"
operationId: "fakeOuterBooleanSerialize"
parameters:
- in: "body"
name: "body"
description: "Input boolean as post body"
required: false
schema:
$ref: "#/definitions/OuterBoolean"
uppercase_data_type: "OUTERBOOLEAN"
refName: "OuterBoolean"
formatString: "{:?}"
example: "None"
model_key: "OuterBoolean"
uppercase_operation_id: "FAKE_OUTER_BOOLEAN_SERIALIZE"
consumesJson: true
responses:
200:
description: "Output boolean"
schema:
$ref: "#/definitions/OuterBoolean"
x-responseId: "OutputBoolean"
x-uppercaseResponseId: "OUTPUT_BOOLEAN"
uppercase_operation_id: "FAKE_OUTER_BOOLEAN_SERIALIZE"
uppercase_data_type: "OUTERBOOLEAN"
producesJson: true
operation_id: "fake_outer_boolean_serialize"
uppercase_operation_id: "FAKE_OUTER_BOOLEAN_SERIALIZE"
path: "/fake/outer/boolean"
PATH_ID: "FAKE_OUTER_BOOLEAN"
hasPathParams: false
HttpMethod: "Post"
/fake/outer/composite:
post:
tags:
- "fake"
description: "Test serialization of object with outer number type"
operationId: "fakeOuterCompositeSerialize"
parameters:
- in: "body"
name: "body"
description: "Input composite as post body"
required: false
schema:
$ref: "#/definitions/OuterComposite"
uppercase_data_type: "OUTERCOMPOSITE"
refName: "OuterComposite"
formatString: "{:?}"
example: "None"
model_key: "OuterBoolean"
uppercase_operation_id: "FAKE_OUTER_COMPOSITE_SERIALIZE"
consumesJson: true
responses:
200:
description: "Output composite"
schema:
$ref: "#/definitions/OuterComposite"
x-responseId: "OutputComposite"
x-uppercaseResponseId: "OUTPUT_COMPOSITE"
uppercase_operation_id: "FAKE_OUTER_COMPOSITE_SERIALIZE"
uppercase_data_type: "OUTERCOMPOSITE"
producesJson: true
operation_id: "fake_outer_composite_serialize"
uppercase_operation_id: "FAKE_OUTER_COMPOSITE_SERIALIZE"
path: "/fake/outer/composite"
PATH_ID: "FAKE_OUTER_COMPOSITE"
hasPathParams: false
HttpMethod: "Post"
/fake/jsonFormData:
get:
tags:
- "fake"
summary: "test json serialization of form data"
description: ""
operationId: "testJsonFormData"
consumes:
- "application/json"
parameters:
- name: "param"
in: "formData"
description: "field1"
required: true
type: "string"
formatString: "\\\"{}\\\""
example: "\"param_example\".to_string()"
- name: "param2"
in: "formData"
description: "field2"
required: true
type: "string"
formatString: "\\\"{}\\\""
example: "\"param2_example\".to_string()"
responses:
200:
description: "successful operation"
x-responseId: "SuccessfulOperation"
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
uppercase_operation_id: "TEST_JSON_FORM_DATA"
operation_id: "test_json_form_data"
uppercase_operation_id: "TEST_JSON_FORM_DATA"
path: "/fake/jsonFormData"
PATH_ID: "FAKE_JSONFORMDATA"
hasPathParams: false
HttpMethod: "Get"
/fake/inline-additionalProperties:
post:
tags:
- "fake"
summary: "test inline additionalProperties"
description: ""
operationId: "testInlineAdditionalProperties"
consumes:
- "application/json"
parameters:
- in: "body"
name: "param"
description: "request body"
required: true
schema:
type: "object"
additionalProperties:
type: "string"
upperCaseName: "PARAM"
refName: null
formatString: "{:?}"
example: "???"
model_key: "OuterBoolean"
uppercase_operation_id: "TEST_INLINE_ADDITIONAL_PROPERTIES"
consumesJson: true
responses:
200:
description: "successful operation"
x-responseId: "SuccessfulOperation"
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
uppercase_operation_id: "TEST_INLINE_ADDITIONAL_PROPERTIES"
operation_id: "test_inline_additional_properties"
uppercase_operation_id: "TEST_INLINE_ADDITIONAL_PROPERTIES"
path: "/fake/inline-additionalProperties"
PATH_ID: "FAKE_INLINE_ADDITIONALPROPERTIES"
hasPathParams: false
HttpMethod: "Post"
noClientExample: true
/fake/body-with-query-params:
put:
operationId: "testBodyWithQueryParams"
consumes:
- "application/json"
parameters:
- in: "body"
name: "body"
required: true
schema:
$ref: "#/definitions/User"
uppercase_data_type: "USER"
refName: "User"
formatString: "{:?}"
example: "???"
model_key: "OuterBoolean"
uppercase_operation_id: "TEST_BODY_WITH_QUERY_PARAMS"
consumesJson: true
- name: "query"
in: "query"
required: true
type: "string"
formatString: "\\\"{}\\\""
example: "\"query_example\".to_string()"
responses:
200:
description: "Success"
x-responseId: "Success"
x-uppercaseResponseId: "SUCCESS"
uppercase_operation_id: "TEST_BODY_WITH_QUERY_PARAMS"
operation_id: "test_body_with_query_params"
uppercase_operation_id: "TEST_BODY_WITH_QUERY_PARAMS"
path: "/fake/body-with-query-params"
PATH_ID: "FAKE_BODY_WITH_QUERY_PARAMS"
hasPathParams: false
HttpMethod: "Put"
noClientExample: true
/another-fake/dummy:
patch:
tags:
- "$another-fake?"
summary: "To test special tags"
description: "To test special tags"
operationId: "test_special_tags"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "body"
description: "client model"
required: true
schema:
$ref: "#/definitions/Client"
uppercase_data_type: "CLIENT"
refName: "Client"
formatString: "{:?}"
example: "???"
model_key: "OuterBoolean"
uppercase_operation_id: "TEST_SPECIAL_TAGS"
consumesJson: true
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/Client"
x-responseId: "SuccessfulOperation"
x-uppercaseResponseId: "SUCCESSFUL_OPERATION"
uppercase_operation_id: "TEST_SPECIAL_TAGS"
uppercase_data_type: "CLIENT"
producesJson: true
operation_id: "test_special_tags"
uppercase_operation_id: "TEST_SPECIAL_TAGS"
path: "/another-fake/dummy"
PATH_ID: "ANOTHER_FAKE_DUMMY"
hasPathParams: false
HttpMethod: "Patch"
noClientExample: true
securityDefinitions:
petstore_auth:
type: "oauth2"
authorizationUrl: "http://petstore.swagger.io/api/oauth/dialog"
flow: "implicit"
scopes:
write:pets: "modify pets in your account"
read:pets: "read your pets"
api_key:
type: "apiKey"
name: "api_key"
in: "header"
api_key_query:
type: "apiKey"
name: "api_key_query"
in: "query"
http_basic_test:
type: "basic"
definitions:
Order:
type: "object"
properties:
id:
type: "integer"
format: "int64"
petId:
type: "integer"
format: "int64"
quantity:
type: "integer"
format: "int32"
shipDate:
type: "string"
format: "date-time"
status:
type: "string"
description: "Order Status"
enum:
- "placed"
- "approved"
- "delivered"
complete:
type: "boolean"
default: false
example:
petId: 6
quantity: 1
id: 0
shipDate: "2000-01-23T04:56:07.000+00:00"
complete: false
status: "placed"
xml:
name: "Order"
upperCaseName: "ORDER"
Category:
type: "object"
properties:
id:
type: "integer"
format: "int64"
name:
type: "string"
example:
name: "name"
id: 6
xml:
name: "Category"
upperCaseName: "CATEGORY"
User:
type: "object"
properties:
id:
type: "integer"
format: "int64"
x-is-unique: true
username:
type: "string"
firstName:
type: "string"
lastName:
type: "string"
email:
type: "string"
password:
type: "string"
phone:
type: "string"
userStatus:
type: "integer"
format: "int32"
description: "User Status"
example:
firstName: "firstName"
lastName: "lastName"
password: "password"
userStatus: 6
phone: "phone"
id: 0
email: "email"
username: "username"
xml:
name: "User"
upperCaseName: "USER"
Tag:
type: "object"
properties:
id:
type: "integer"
format: "int64"
name:
type: "string"
example:
name: "name"
id: 1
xml:
name: "Tag"
upperCaseName: "TAG"
Pet:
type: "object"
required:
- "name"
- "photoUrls"
properties:
id:
type: "integer"
format: "int64"
x-is-unique: true
category:
$ref: "#/definitions/Category"
name:
type: "string"
example: "doggie"
photoUrls:
type: "array"
xml:
name: "photoUrl"
wrapped: true
items:
type: "string"
tags:
type: "array"
xml:
name: "tag"
wrapped: true
items:
$ref: "#/definitions/Tag"
status:
type: "string"
description: "pet status in the store"
enum:
- "available"
- "pending"
- "sold"
example:
photoUrls:
- "photoUrls"
- "photoUrls"
name: "doggie"
id: 0
category:
name: "name"
id: 6
tags:
- name: "name"
id: 1
- name: "name"
id: 1
status: "available"
xml:
name: "Pet"
upperCaseName: "PET"
ApiResponse:
type: "object"
properties:
code:
type: "integer"
format: "int32"
type:
type: "string"
message:
type: "string"
example:
code: 0
type: "type"
message: "message"
upperCaseName: "APIRESPONSE"
$special[model.name]:
properties:
$special[property.name]:
type: "integer"
format: "int64"
xml:
name: "$special[model.name]"
upperCaseName: "$SPECIAL[MODEL.NAME]"
Return:
properties:
return:
type: "integer"
format: "int32"
description: "Model for testing reserved words"
xml:
name: "Return"
upperCaseName: "RETURN"
Name:
required:
- "name"
properties:
name:
type: "integer"
format: "int32"
snake_case:
type: "integer"
format: "int32"
readOnly: true
property:
type: "string"
123Number:
type: "integer"
readOnly: true
description: "Model for testing model name same as property name"
xml:
name: "Name"
upperCaseName: "NAME"
200_response:
properties:
name:
type: "integer"
format: "int32"
class:
type: "string"
description: "Model for testing model name starting with number"
xml:
name: "Name"
upperCaseName: "200_RESPONSE"
ClassModel:
properties:
_class:
type: "string"
description: "Model for testing model with \"_class\" property"
upperCaseName: "CLASSMODEL"
Dog:
allOf:
- $ref: "#/definitions/Animal"
- type: "object"
properties:
breed:
type: "string"
upperCaseName: "DOG"
Cat:
allOf:
- $ref: "#/definitions/Animal"
- type: "object"
properties:
declawed:
type: "boolean"
upperCaseName: "CAT"
Animal:
type: "object"
required:
- "className"
discriminator: "className"
properties:
className:
type: "string"
color:
type: "string"
default: "red"
upperCaseName: "ANIMAL"
AnimalFarm:
type: "array"
items:
$ref: "#/definitions/Animal"
upperCaseName: "ANIMALFARM"
format_test:
type: "object"
required:
- "byte"
- "date"
- "number"
- "password"
properties:
integer:
type: "integer"
minimum: 10
maximum: 100
int32:
type: "integer"
format: "int32"
minimum: 20
maximum: 200
int64:
type: "integer"
format: "int64"
number:
type: "number"
minimum: 32.1
maximum: 543.2
float:
type: "number"
format: "float"
minimum: 54.3
maximum: 987.6
double:
type: "number"
format: "double"
minimum: 67.8
maximum: 123.4
string:
type: "string"
pattern: "/[a-z]/i"
byte:
type: "string"
format: "byte"
pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
binary:
type: "string"
format: "binary"
date:
type: "string"
format: "date"
dateTime:
type: "string"
format: "date-time"
uuid:
type: "string"
format: "uuid"
password:
type: "string"
format: "password"
minLength: 10
maxLength: 64
upperCaseName: "FORMAT_TEST"
EnumClass:
type: "string"
enum:
- "_abc"
- "-efg"
- "(xyz)"
default: "-efg"
upperCaseName: "ENUMCLASS"
Enum_Test:
type: "object"
required:
- "enum_string_required"
properties:
enum_string:
type: "string"
enum:
- "UPPER"
- "lower"
- ""
enum_string_required:
type: "string"
enum:
- "UPPER"
- "lower"
- ""
enum_integer:
type: "integer"
format: "int32"
enum:
- 1
- -1
enum_number:
type: "number"
format: "double"
enum:
- 1.1
- -1.2
outerEnum:
$ref: "#/definitions/OuterEnum"
upperCaseName: "ENUM_TEST"
AdditionalPropertiesClass:
type: "object"
properties:
map_property:
type: "object"
additionalProperties:
type: "string"
map_of_map_property:
type: "object"
additionalProperties:
type: "object"
additionalProperties:
type: "string"
upperCaseName: "ADDITIONALPROPERTIESCLASS"
MixedPropertiesAndAdditionalPropertiesClass:
type: "object"
properties:
uuid:
type: "string"
format: "uuid"
dateTime:
type: "string"
format: "date-time"
map:
type: "object"
additionalProperties:
$ref: "#/definitions/Animal"
upperCaseName: "MIXEDPROPERTIESANDADDITIONALPROPERTIESCLASS"
List:
type: "object"
properties:
123-list:
type: "string"
upperCaseName: "LIST"
Client:
type: "object"
properties:
client:
type: "string"
example:
client: "client"
upperCaseName: "CLIENT"
ReadOnlyFirst:
type: "object"
properties:
bar:
type: "string"
readOnly: true
baz:
type: "string"
upperCaseName: "READONLYFIRST"
hasOnlyReadOnly:
type: "object"
properties:
bar:
type: "string"
readOnly: true
foo:
type: "string"
readOnly: true
upperCaseName: "HASONLYREADONLY"
Capitalization:
type: "object"
properties:
smallCamel:
type: "string"
CapitalCamel:
type: "string"
small_Snake:
type: "string"
Capital_Snake:
type: "string"
SCA_ETH_Flow_Points:
type: "string"
ATT_NAME:
type: "string"
description: "Name of the pet\n"
upperCaseName: "CAPITALIZATION"
MapTest:
type: "object"
properties:
map_map_of_string:
type: "object"
additionalProperties:
type: "object"
additionalProperties:
type: "string"
map_of_enum_string:
type: "object"
additionalProperties:
type: "string"
enum:
- "UPPER"
- "lower"
upperCaseName: "MAPTEST"
ArrayTest:
type: "object"
properties:
array_of_string:
type: "array"
items:
type: "string"
array_array_of_integer:
type: "array"
items:
type: "array"
items:
type: "integer"
format: "int64"
array_array_of_model:
type: "array"
items:
type: "array"
items:
$ref: "#/definitions/ReadOnlyFirst"
upperCaseName: "ARRAYTEST"
NumberOnly:
type: "object"
properties:
JustNumber:
type: "number"
upperCaseName: "NUMBERONLY"
ArrayOfNumberOnly:
type: "object"
properties:
ArrayNumber:
type: "array"
items:
type: "number"
upperCaseName: "ARRAYOFNUMBERONLY"
ArrayOfArrayOfNumberOnly:
type: "object"
properties:
ArrayArrayNumber:
type: "array"
items:
type: "array"
items:
type: "number"
upperCaseName: "ARRAYOFARRAYOFNUMBERONLY"
EnumArrays:
type: "object"
properties:
just_symbol:
type: "string"
enum:
- ">="
- "$"
array_enum:
type: "array"
items:
type: "string"
enum:
- "fish"
- "crab"
upperCaseName: "ENUMARRAYS"
OuterEnum:
type: "string"
enum:
- "placed"
- "approved"
- "delivered"
upperCaseName: "OUTERENUM"
OuterComposite:
type: "object"
properties:
my_number:
$ref: "#/definitions/OuterNumber"
my_string:
$ref: "#/definitions/OuterString"
my_boolean:
$ref: "#/definitions/OuterBoolean"
example:
my_string: {}
my_number: {}
my_boolean: {}
upperCaseName: "OUTERCOMPOSITE"
OuterNumber:
type: "number"
upperCaseName: "OUTERNUMBER"
OuterString:
type: "string"
upperCaseName: "OUTERSTRING"
OuterBoolean:
type: "boolean"
upperCaseName: "OUTERBOOLEAN"
externalDocs:
description: "Find out more about Swagger"
url: "http://swagger.io"