Jakesterwars 7e7bfc74de
[cwiki] Path parameter generation fix for split rows (#6894)
* fix: path parameter issues

* chore: run generate samples once again

Co-authored-by: Jacob Keith <jkeith@aegistg.com>
2020-10-22 11:25:25 +08:00

1114 lines
34 KiB
Plaintext

h1. OpenAPI Petstore
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*Version:* 1.0.0
----
{expand:Table of Contents - Click to expand}
{toc:printable=true|style=square|minLevel=2|maxLevel=3|type=list|outline=false|include=.*}
{expand}
h2. Endpoints
h3. addPet
{panel:title=addPet|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff}
*Summary:* Add a new pet to the store
*Description:* *No Description*
|| HttpMethod | {status:colour=Yellow|title=post|subtle=false} |
|| Protocol | {noformat:nopanel=true}http{noformat} |
|| Path | {noformat:nopanel=true}/pet{noformat} |
|| Base Path | {noformat:nopanel=true}http://petstore.swagger.io/v2{noformat} |
|| Produces | {noformat:nopanel=true}application/xmlapplication/json{noformat} |
----
h4. Parameters
h5. Body Parameter
||Name||Description||Type||Required||Default||Pattern||Enum||
|Pet |Pet object that needs to be added to the store | Pet | (/) | | | |
----
h4. Responses
|| Status Code | {status:colour=Green|title=200|subtle=false} |
|| Message | successful operation |
|| Response Type | Pet |
|| Response Model | [Pet Model|#PetModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "successful operation",
"content" : {
"application/xml" : {
"schema" : {
"$ref" : "#/components/schemas/Pet"
}
},
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Pet"
}
}
}
}{code} |
|| Status Code | {status:colour=Green|title=405|subtle=false} |
|| Message | Invalid input |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "Invalid input"
}{code} |
{panel}
h3. deletePet
{panel:title=deletePet|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff}
*Summary:* Deletes a pet
*Description:* *No Description*
|| HttpMethod | {status:colour=Yellow|title=delete|subtle=false} |
|| Protocol | {noformat:nopanel=true}http{noformat} |
|| Path | {noformat:nopanel=true}/pet/{petId}{noformat} |
|| Base Path | {noformat:nopanel=true}http://petstore.swagger.io/v2{noformat} |
----
h4. Parameters
h5. Path Parameters
||Name||Description||Type||Required||Default||Pattern||Enum||
|petId |Pet id to delete | Long | (/) |null | | |
h5. Header Parameters
||Name||Description||Required||Default||Pattern||
|api_key | | String | (x) |null | | |
----
h4. Responses
|| Status Code | {status:colour=Green|title=400|subtle=false} |
|| Message | Invalid pet value |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "Invalid pet value"
}{code} |
{panel}
h3. findPetsByStatus
{panel:title=findPetsByStatus|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff}
*Summary:* Finds Pets by status
*Description:* Multiple status values can be provided with comma separated strings
|| HttpMethod | {status:colour=Yellow|title=get|subtle=false} |
|| Protocol | {noformat:nopanel=true}http{noformat} |
|| Path | {noformat:nopanel=true}/pet/findByStatus{noformat} |
|| Base Path | {noformat:nopanel=true}http://petstore.swagger.io/v2{noformat} |
|| Produces | {noformat:nopanel=true}application/xmlapplication/json{noformat} |
----
h4. Parameters
h5. Query Parameters
||Name||Description||Required||Default||Pattern||
|status |Status values that need to be considered for filter | array[String] | (/) |null | | |
----
h4. Responses
|| Status Code | {status:colour=Green|title=200|subtle=false} |
|| Message | successful operation |
|| Response Type | array[Pet] |
|| Response Model | [array[Pet] Model|#array[Pet]ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "successful operation",
"content" : {
"application/xml" : {
"schema" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/Pet"
}
}
},
"application/json" : {
"schema" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/Pet"
}
}
}
}
}{code} |
|| Status Code | {status:colour=Green|title=400|subtle=false} |
|| Message | Invalid status value |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "Invalid status value"
}{code} |
{panel}
h3. findPetsByTags
{panel:title=findPetsByTags|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff}
*Summary:* Finds Pets by tags
*Description:* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|| HttpMethod | {status:colour=Yellow|title=get|subtle=false} |
|| Protocol | {noformat:nopanel=true}http{noformat} |
|| Path | {noformat:nopanel=true}/pet/findByTags{noformat} |
|| Base Path | {noformat:nopanel=true}http://petstore.swagger.io/v2{noformat} |
|| Produces | {noformat:nopanel=true}application/xmlapplication/json{noformat} |
----
h4. Parameters
h5. Query Parameters
||Name||Description||Required||Default||Pattern||
|tags |Tags to filter by | array[String] | (/) |null | | |
----
h4. Responses
|| Status Code | {status:colour=Green|title=200|subtle=false} |
|| Message | successful operation |
|| Response Type | array[Pet] |
|| Response Model | [array[Pet] Model|#array[Pet]ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "successful operation",
"content" : {
"application/xml" : {
"schema" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/Pet"
}
}
},
"application/json" : {
"schema" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/Pet"
}
}
}
}
}{code} |
|| Status Code | {status:colour=Green|title=400|subtle=false} |
|| Message | Invalid tag value |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "Invalid tag value"
}{code} |
{panel}
h3. getPetById
{panel:title=getPetById|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff}
*Summary:* Find pet by ID
*Description:* Returns a single pet
|| HttpMethod | {status:colour=Yellow|title=get|subtle=false} |
|| Protocol | {noformat:nopanel=true}http{noformat} |
|| Path | {noformat:nopanel=true}/pet/{petId}{noformat} |
|| Base Path | {noformat:nopanel=true}http://petstore.swagger.io/v2{noformat} |
|| Produces | {noformat:nopanel=true}application/xmlapplication/json{noformat} |
----
h4. Parameters
h5. Path Parameters
||Name||Description||Type||Required||Default||Pattern||Enum||
|petId |ID of pet to return | Long | (/) |null | | |
----
h4. Responses
|| Status Code | {status:colour=Green|title=200|subtle=false} |
|| Message | successful operation |
|| Response Type | Pet |
|| Response Model | [Pet Model|#PetModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "successful operation",
"content" : {
"application/xml" : {
"schema" : {
"$ref" : "#/components/schemas/Pet"
}
},
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Pet"
}
}
}
}{code} |
|| Status Code | {status:colour=Green|title=400|subtle=false} |
|| Message | Invalid ID supplied |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "Invalid ID supplied"
}{code} |
|| Status Code | {status:colour=Green|title=404|subtle=false} |
|| Message | Pet not found |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "Pet not found"
}{code} |
{panel}
h3. updatePet
{panel:title=updatePet|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff}
*Summary:* Update an existing pet
*Description:* *No Description*
|| HttpMethod | {status:colour=Yellow|title=put|subtle=false} |
|| Protocol | {noformat:nopanel=true}http{noformat} |
|| Path | {noformat:nopanel=true}/pet{noformat} |
|| Base Path | {noformat:nopanel=true}http://petstore.swagger.io/v2{noformat} |
|| Produces | {noformat:nopanel=true}application/xmlapplication/json{noformat} |
----
h4. Parameters
h5. Body Parameter
||Name||Description||Type||Required||Default||Pattern||Enum||
|Pet |Pet object that needs to be added to the store | Pet | (/) | | | |
----
h4. Responses
|| Status Code | {status:colour=Green|title=200|subtle=false} |
|| Message | successful operation |
|| Response Type | Pet |
|| Response Model | [Pet Model|#PetModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "successful operation",
"content" : {
"application/xml" : {
"schema" : {
"$ref" : "#/components/schemas/Pet"
}
},
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Pet"
}
}
}
}{code} |
|| Status Code | {status:colour=Green|title=400|subtle=false} |
|| Message | Invalid ID supplied |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "Invalid ID supplied"
}{code} |
|| Status Code | {status:colour=Green|title=404|subtle=false} |
|| Message | Pet not found |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "Pet not found"
}{code} |
|| Status Code | {status:colour=Green|title=405|subtle=false} |
|| Message | Validation exception |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "Validation exception"
}{code} |
{panel}
h3. updatePetWithForm
{panel:title=updatePetWithForm|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff}
*Summary:* Updates a pet in the store with form data
*Description:* *No Description*
|| HttpMethod | {status:colour=Yellow|title=post|subtle=false} |
|| Protocol | {noformat:nopanel=true}http{noformat} |
|| Path | {noformat:nopanel=true}/pet/{petId}{noformat} |
|| Base Path | {noformat:nopanel=true}http://petstore.swagger.io/v2{noformat} |
----
h4. Parameters
h5. Path Parameters
||Name||Description||Type||Required||Default||Pattern||Enum||
|petId |ID of pet that needs to be updated | Long | (/) |null | | |
----
h4. Responses
|| Status Code | {status:colour=Green|title=405|subtle=false} |
|| Message | Invalid input |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "Invalid input"
}{code} |
{panel}
h3. uploadFile
{panel:title=uploadFile|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff}
*Summary:* uploads an image
*Description:* *No Description*
|| HttpMethod | {status:colour=Yellow|title=post|subtle=false} |
|| Protocol | {noformat:nopanel=true}http{noformat} |
|| Path | {noformat:nopanel=true}/pet/{petId}/uploadImage{noformat} |
|| Base Path | {noformat:nopanel=true}http://petstore.swagger.io/v2{noformat} |
|| Produces | {noformat:nopanel=true}application/json{noformat} |
----
h4. Parameters
h5. Path Parameters
||Name||Description||Type||Required||Default||Pattern||Enum||
|petId |ID of pet to update | Long | (/) |null | | |
----
h4. Responses
|| Status Code | {status:colour=Green|title=200|subtle=false} |
|| Message | successful operation |
|| Response Type | ApiResponse |
|| Response Model | [ApiResponse Model|#ApiResponseModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "successful operation",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ApiResponse"
}
}
}
}{code} |
{panel}
h3. deleteOrder
{panel:title=deleteOrder|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff}
*Summary:* Delete purchase order by ID
*Description:* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
|| HttpMethod | {status:colour=Yellow|title=delete|subtle=false} |
|| Protocol | {noformat:nopanel=true}http{noformat} |
|| Path | {noformat:nopanel=true}/store/order/{orderId}{noformat} |
|| Base Path | {noformat:nopanel=true}http://petstore.swagger.io/v2{noformat} |
----
h4. Parameters
h5. Path Parameters
||Name||Description||Type||Required||Default||Pattern||Enum||
|orderId |ID of the order that needs to be deleted | String | (/) |null | | |
----
h4. Responses
|| Status Code | {status:colour=Green|title=400|subtle=false} |
|| Message | Invalid ID supplied |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "Invalid ID supplied"
}{code} |
|| Status Code | {status:colour=Green|title=404|subtle=false} |
|| Message | Order not found |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "Order not found"
}{code} |
{panel}
h3. getInventory
{panel:title=getInventory|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff}
*Summary:* Returns pet inventories by status
*Description:* Returns a map of status codes to quantities
|| HttpMethod | {status:colour=Yellow|title=get|subtle=false} |
|| Protocol | {noformat:nopanel=true}http{noformat} |
|| Path | {noformat:nopanel=true}/store/inventory{noformat} |
|| Base Path | {noformat:nopanel=true}http://petstore.swagger.io/v2{noformat} |
|| Produces | {noformat:nopanel=true}application/json{noformat} |
----
h4. Parameters
----
h4. Responses
|| Status Code | {status:colour=Green|title=200|subtle=false} |
|| Message | successful operation |
|| Response Type | map[String, Integer] |
|| Response Model | [map[String, Integer] Model|#map[String, Integer]ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "successful operation",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"additionalProperties" : {
"type" : "integer",
"format" : "int32"
}
}
}
}
}{code} |
{panel}
h3. getOrderById
{panel:title=getOrderById|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff}
*Summary:* Find purchase order by ID
*Description:* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
|| HttpMethod | {status:colour=Yellow|title=get|subtle=false} |
|| Protocol | {noformat:nopanel=true}http{noformat} |
|| Path | {noformat:nopanel=true}/store/order/{orderId}{noformat} |
|| Base Path | {noformat:nopanel=true}http://petstore.swagger.io/v2{noformat} |
|| Produces | {noformat:nopanel=true}application/xmlapplication/json{noformat} |
----
h4. Parameters
h5. Path Parameters
||Name||Description||Type||Required||Default||Pattern||Enum||
|orderId |ID of pet that needs to be fetched | Long | (/) |null | | |
----
h4. Responses
|| Status Code | {status:colour=Green|title=200|subtle=false} |
|| Message | successful operation |
|| Response Type | Order |
|| Response Model | [Order Model|#OrderModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "successful operation",
"content" : {
"application/xml" : {
"schema" : {
"$ref" : "#/components/schemas/Order"
}
},
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Order"
}
}
}
}{code} |
|| Status Code | {status:colour=Green|title=400|subtle=false} |
|| Message | Invalid ID supplied |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "Invalid ID supplied"
}{code} |
|| Status Code | {status:colour=Green|title=404|subtle=false} |
|| Message | Order not found |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "Order not found"
}{code} |
{panel}
h3. placeOrder
{panel:title=placeOrder|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff}
*Summary:* Place an order for a pet
*Description:* *No Description*
|| HttpMethod | {status:colour=Yellow|title=post|subtle=false} |
|| Protocol | {noformat:nopanel=true}http{noformat} |
|| Path | {noformat:nopanel=true}/store/order{noformat} |
|| Base Path | {noformat:nopanel=true}http://petstore.swagger.io/v2{noformat} |
|| Produces | {noformat:nopanel=true}application/xmlapplication/json{noformat} |
----
h4. Parameters
h5. Body Parameter
||Name||Description||Type||Required||Default||Pattern||Enum||
|Order |order placed for purchasing the pet | Order | (/) | | | |
----
h4. Responses
|| Status Code | {status:colour=Green|title=200|subtle=false} |
|| Message | successful operation |
|| Response Type | Order |
|| Response Model | [Order Model|#OrderModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "successful operation",
"content" : {
"application/xml" : {
"schema" : {
"$ref" : "#/components/schemas/Order"
}
},
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Order"
}
}
}
}{code} |
|| Status Code | {status:colour=Green|title=400|subtle=false} |
|| Message | Invalid Order |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "Invalid Order"
}{code} |
{panel}
h3. createUser
{panel:title=createUser|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff}
*Summary:* Create user
*Description:* This can only be done by the logged in user.
|| HttpMethod | {status:colour=Yellow|title=post|subtle=false} |
|| Protocol | {noformat:nopanel=true}http{noformat} |
|| Path | {noformat:nopanel=true}/user{noformat} |
|| Base Path | {noformat:nopanel=true}http://petstore.swagger.io/v2{noformat} |
----
h4. Parameters
h5. Body Parameter
||Name||Description||Type||Required||Default||Pattern||Enum||
|User |Created user object | User | (/) | | | |
----
h4. Responses
|| Status Code | {status:colour=Green|title=0|subtle=false} |
|| Message | successful operation |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "successful operation"
}{code} |
{panel}
h3. createUsersWithArrayInput
{panel:title=createUsersWithArrayInput|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff}
*Summary:* Creates list of users with given input array
*Description:* *No Description*
|| HttpMethod | {status:colour=Yellow|title=post|subtle=false} |
|| Protocol | {noformat:nopanel=true}http{noformat} |
|| Path | {noformat:nopanel=true}/user/createWithArray{noformat} |
|| Base Path | {noformat:nopanel=true}http://petstore.swagger.io/v2{noformat} |
----
h4. Parameters
h5. Body Parameter
||Name||Description||Type||Required||Default||Pattern||Enum||
|User |List of user object | array[User] | (/) | | | |
----
h4. Responses
|| Status Code | {status:colour=Green|title=0|subtle=false} |
|| Message | successful operation |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "successful operation"
}{code} |
{panel}
h3. createUsersWithListInput
{panel:title=createUsersWithListInput|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff}
*Summary:* Creates list of users with given input array
*Description:* *No Description*
|| HttpMethod | {status:colour=Yellow|title=post|subtle=false} |
|| Protocol | {noformat:nopanel=true}http{noformat} |
|| Path | {noformat:nopanel=true}/user/createWithList{noformat} |
|| Base Path | {noformat:nopanel=true}http://petstore.swagger.io/v2{noformat} |
----
h4. Parameters
h5. Body Parameter
||Name||Description||Type||Required||Default||Pattern||Enum||
|User |List of user object | array[User] | (/) | | | |
----
h4. Responses
|| Status Code | {status:colour=Green|title=0|subtle=false} |
|| Message | successful operation |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "successful operation"
}{code} |
{panel}
h3. deleteUser
{panel:title=deleteUser|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff}
*Summary:* Delete user
*Description:* This can only be done by the logged in user.
|| HttpMethod | {status:colour=Yellow|title=delete|subtle=false} |
|| Protocol | {noformat:nopanel=true}http{noformat} |
|| Path | {noformat:nopanel=true}/user/{username}{noformat} |
|| Base Path | {noformat:nopanel=true}http://petstore.swagger.io/v2{noformat} |
----
h4. Parameters
h5. Path Parameters
||Name||Description||Type||Required||Default||Pattern||Enum||
|username |The name that needs to be deleted | String | (/) |null | | |
----
h4. Responses
|| Status Code | {status:colour=Green|title=400|subtle=false} |
|| Message | Invalid username supplied |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "Invalid username supplied"
}{code} |
|| Status Code | {status:colour=Green|title=404|subtle=false} |
|| Message | User not found |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "User not found"
}{code} |
{panel}
h3. getUserByName
{panel:title=getUserByName|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff}
*Summary:* Get user by user name
*Description:* *No Description*
|| HttpMethod | {status:colour=Yellow|title=get|subtle=false} |
|| Protocol | {noformat:nopanel=true}http{noformat} |
|| Path | {noformat:nopanel=true}/user/{username}{noformat} |
|| Base Path | {noformat:nopanel=true}http://petstore.swagger.io/v2{noformat} |
|| Produces | {noformat:nopanel=true}application/xmlapplication/json{noformat} |
----
h4. Parameters
h5. Path Parameters
||Name||Description||Type||Required||Default||Pattern||Enum||
|username |The name that needs to be fetched. Use user1 for testing. | String | (/) |null | | |
----
h4. Responses
|| Status Code | {status:colour=Green|title=200|subtle=false} |
|| Message | successful operation |
|| Response Type | User |
|| Response Model | [User Model|#UserModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "successful operation",
"content" : {
"application/xml" : {
"schema" : {
"$ref" : "#/components/schemas/User"
}
},
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/User"
}
}
}
}{code} |
|| Status Code | {status:colour=Green|title=400|subtle=false} |
|| Message | Invalid username supplied |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "Invalid username supplied"
}{code} |
|| Status Code | {status:colour=Green|title=404|subtle=false} |
|| Message | User not found |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "User not found"
}{code} |
{panel}
h3. loginUser
{panel:title=loginUser|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff}
*Summary:* Logs user into the system
*Description:* *No Description*
|| HttpMethod | {status:colour=Yellow|title=get|subtle=false} |
|| Protocol | {noformat:nopanel=true}http{noformat} |
|| Path | {noformat:nopanel=true}/user/login{noformat} |
|| Base Path | {noformat:nopanel=true}http://petstore.swagger.io/v2{noformat} |
|| Produces | {noformat:nopanel=true}application/xmlapplication/json{noformat} |
----
h4. Parameters
h5. Query Parameters
||Name||Description||Required||Default||Pattern||
|username |The user name for login | String | (/) |null | /^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$/ | ||password |The password for login in clear text | String | (/) |null | | |
----
h4. Responses
|| Status Code | {status:colour=Green|title=200|subtle=false} |
|| Message | successful operation |
|| Response Type | String |
|| Response Model | [String Model|#StringModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "successful operation",
"headers" : {
"Set-Cookie" : {
"description" : "Cookie authentication key for use with the `api_key` apiKey authentication.",
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string",
"example" : "AUTH_KEY=abcde12345; Path=/; HttpOnly"
}
},
"X-Rate-Limit" : {
"description" : "calls per hour allowed by the user",
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "integer",
"format" : "int32"
}
},
"X-Expires-After" : {
"description" : "date in UTC when toekn expires",
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string",
"format" : "date-time"
}
}
},
"content" : {
"application/xml" : {
"schema" : {
"type" : "string"
}
},
"application/json" : {
"schema" : {
"type" : "string"
}
}
}
}{code} |
|| Status Code | {status:colour=Green|title=400|subtle=false} |
|| Message | Invalid username/password supplied |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "Invalid username/password supplied"
}{code} |
{panel}
h3. logoutUser
{panel:title=logoutUser|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff}
*Summary:* Logs out current logged in user session
*Description:* *No Description*
|| HttpMethod | {status:colour=Yellow|title=get|subtle=false} |
|| Protocol | {noformat:nopanel=true}http{noformat} |
|| Path | {noformat:nopanel=true}/user/logout{noformat} |
|| Base Path | {noformat:nopanel=true}http://petstore.swagger.io/v2{noformat} |
----
h4. Parameters
----
h4. Responses
|| Status Code | {status:colour=Green|title=0|subtle=false} |
|| Message | successful operation |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "successful operation"
}{code} |
{panel}
h3. updateUser
{panel:title=updateUser|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff}
*Summary:* Updated user
*Description:* This can only be done by the logged in user.
|| HttpMethod | {status:colour=Yellow|title=put|subtle=false} |
|| Protocol | {noformat:nopanel=true}http{noformat} |
|| Path | {noformat:nopanel=true}/user/{username}{noformat} |
|| Base Path | {noformat:nopanel=true}http://petstore.swagger.io/v2{noformat} |
----
h4. Parameters
h5. Path Parameters
||Name||Description||Type||Required||Default||Pattern||Enum||
|username |name that need to be deleted | String | (/) |null | | |
h5. Body Parameter
||Name||Description||Type||Required||Default||Pattern||Enum||
|User |Updated user object | User | (/) | | | |
----
h4. Responses
|| Status Code | {status:colour=Green|title=400|subtle=false} |
|| Message | Invalid user supplied |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "Invalid user supplied"
}{code} |
|| Status Code | {status:colour=Green|title=404|subtle=false} |
|| Message | User not found |
|| Response Type | |
|| Response Model | [ Model|#ModelAnchor|Jump to model] |
|| Response Schema | {code:collapse=true}{
"description" : "User not found"
}{code} |
{panel}
{anchor:models}
h2. Models
{anchor:ApiResponseModelAnchor}
h3. ApiResponse
Describes the result of uploading an image resource
||Field Name||Required||Type||Description||Enum||
|code |(x) |{noformat:nopanel=true}Integer{noformat} | | |
|type |(x) |{noformat:nopanel=true}String{noformat} | | |
|message |(x) |{noformat:nopanel=true}String{noformat} | | |
{anchor:CategoryModelAnchor}
h3. Category
A category for a pet
||Field Name||Required||Type||Description||Enum||
|id |(x) |{noformat:nopanel=true}Long{noformat} | | |
|name |(x) |{noformat:nopanel=true}String{noformat} | | |
{anchor:InlineObjectModelAnchor}
h3. InlineObject
||Field Name||Required||Type||Description||Enum||
|name |(x) |{noformat:nopanel=true}String{noformat} |Updated name of the pet | |
|status |(x) |{noformat:nopanel=true}String{noformat} |Updated status of the pet | |
{anchor:InlineObject1ModelAnchor}
h3. InlineObject1
||Field Name||Required||Type||Description||Enum||
|additionalMetadata |(x) |{noformat:nopanel=true}String{noformat} |Additional data to pass to server | |
|file |(x) |{noformat:nopanel=true}File{noformat} |file to upload | |
{anchor:OrderModelAnchor}
h3. Order
An order for a pets from the pet store
||Field Name||Required||Type||Description||Enum||
|id |(x) |{noformat:nopanel=true}Long{noformat} | | |
|petId |(x) |{noformat:nopanel=true}Long{noformat} | | |
|quantity |(x) |{noformat:nopanel=true}Integer{noformat} | | |
|shipDate |(x) |{noformat:nopanel=true}Date{noformat} | | |
|status |(x) |{noformat:nopanel=true}String{noformat} |Order Status | [placed, approved, delivered] |
|complete |(x) |{noformat:nopanel=true}Boolean{noformat} | | |
{anchor:PetModelAnchor}
h3. Pet
A pet for sale in the pet store
||Field Name||Required||Type||Description||Enum||
|id |(x) |{noformat:nopanel=true}Long{noformat} | | |
|category |(x) |{noformat:nopanel=true}Category{noformat} | | |
|name |(/) |{noformat:nopanel=true}String{noformat} | | |
|photoUrls |(/) |{noformat:nopanel=true}array[String]{noformat} | | |
|tags |(x) |{noformat:nopanel=true}array[Tag]{noformat} | | |
|status |(x) |{noformat:nopanel=true}String{noformat} |pet status in the store | [available, pending, sold] |
{anchor:TagModelAnchor}
h3. Tag
A tag for a pet
||Field Name||Required||Type||Description||Enum||
|id |(x) |{noformat:nopanel=true}Long{noformat} | | |
|name |(x) |{noformat:nopanel=true}String{noformat} | | |
{anchor:UserModelAnchor}
h3. User
A User who is purchasing from the pet store
||Field Name||Required||Type||Description||Enum||
|id |(x) |{noformat:nopanel=true}Long{noformat} | | |
|username |(x) |{noformat:nopanel=true}String{noformat} | | |
|firstName |(x) |{noformat:nopanel=true}String{noformat} | | |
|lastName |(x) |{noformat:nopanel=true}String{noformat} | | |
|email |(x) |{noformat:nopanel=true}String{noformat} | | |
|password |(x) |{noformat:nopanel=true}String{noformat} | | |
|phone |(x) |{noformat:nopanel=true}String{noformat} | | |
|userStatus |(x) |{noformat:nopanel=true}Integer{noformat} |User Status | |