diff --git a/modules/swagger-codegen/src/main/resources/htmlDocs/index.mustache b/modules/swagger-codegen/src/main/resources/htmlDocs/index.mustache index 83cd24e72d0..fa0e662b67f 100644 --- a/modules/swagger-codegen/src/main/resources/htmlDocs/index.mustache +++ b/modules/swagger-codegen/src/main/resources/htmlDocs/index.mustache @@ -158,7 +158,7 @@

{{classname}} Up

- {{#vars}}
{{name}} {{#isNotRequired}}(optional){{/isNotRequired}}
{{datatype}} {{description}}
+ {{#vars}}
{{name}} {{^required}}(optional){{/required}}
{{datatype}} {{description}}
{{#isEnum}}
Enum:
{{#_enum}}
{{this}}
{{/_enum}} diff --git a/samples/html/index.html b/samples/html/index.html index cae7e02c9e0..e86c9833a19 100644 --- a/samples/html/index.html +++ b/samples/html/index.html @@ -194,450 +194,446 @@ font-style: italic;

Methods

[ Jump to Models ] -

Table of Contents

-
    - - - -
  1. put /pet
  2. -
  3. post /pet
  4. - -
  5. get /pet/findByStatus
  6. - -
  7. get /pet/findByTags
  8. - -
  9. get /pet/{petId}
  10. - -
  11. post /pet/{petId}
  12. - +
  13. post /pet?testing_byte_array=true
  14. delete /pet/{petId}
  15. - +
  16. get /pet/findByStatus
  17. +
  18. get /pet/findByTags
  19. +
  20. get /pet/{petId}
  21. +
  22. get /pet/{petId}?response=inline_arbitrary_object
  23. +
  24. get /pet/{petId}?testing_byte_array=true
  25. +
  26. put /pet
  27. +
  28. post /pet/{petId}
  29. post /pet/{petId}/uploadImage
  30. - -
  31. get /store/inventory
  32. - -
  33. post /store/order
  34. - -
  35. get /store/order/{orderId}
  36. -
  37. delete /store/order/{orderId}
  38. - +
  39. get /store/findByStatus
  40. +
  41. get /store/inventory
  42. +
  43. get /store/inventory?response=arbitrary_object
  44. +
  45. get /store/order/{orderId}
  46. +
  47. post /store/order
  48. post /user
  49. -
  50. post /user/createWithArray
  51. -
  52. post /user/createWithList
  53. - -
  54. get /user/login
  55. - -
  56. get /user/logout
  57. - -
  58. get /user/{username}
  59. - -
  60. put /user/{username}
  61. -
  62. delete /user/{username}
  63. - - - +
  64. get /user/{username}
  65. +
  66. get /user/login
  67. +
  68. get /user/logout
  69. +
  70. put /user/{username}
- - - - - -
-
- Up -
put /pet
-
Update an existing pet (updatePet)
- -
- - - - -

Consumes

- This API call consumes the following media types via the Content-Type request header: -
    - -
  • application/json
  • - -
  • application/xml
  • - -
- - - -

Request body

-
-
body (optional)
- -
Body Parameter — Pet object that needs to be added to the store
-
- - - - - - - - - - - - - -

Produces

- This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
    - -
  • application/json
  • - -
  • application/xml
  • - -
- - -

Responses

- -

400

- Invalid ID supplied - - -

404

- Pet not found - - -

405

- Validation exception - - -
-
-
Up
post /pet
Add a new pet to the store (addPet)
-
- -

Consumes

This API call consumes the following media types via the Content-Type request header:
    -
  • application/json
  • -
  • application/xml
  • -
- -

Request body

body (optional)
Body Parameter — Pet object that needs to be added to the store
- - - - - - Todo: process Response Object and its headers, schema, examples - --> - - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

405

Invalid input - -

- +
+
+ Up +
post /pet?testing_byte_array=true
+
Fake endpoint to test byte array in body parameter for adding a new pet to the store (addPetUsingByteArray)
+
+ + +

Consumes

+ This API call consumes the following media types via the Content-Type request header: +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Request body

+
+
body (optional)
+ +
Body Parameter — Pet object in the form of byte array
+
+ + + + + + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

405

+ Invalid input +
+
+
+
+ Up +
delete /pet/{petId}
+
Deletes a pet (deletePet)
+
+ +

Path parameters

+
+
petId (required)
+ +
Path Parameter — Pet id to delete
+
+ + + + + + + + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

400

+ Invalid pet value +
+
Up
get /pet/findByStatus
Finds Pets by status (findPetsByStatus)
- -
Multiple status values can be provided with comma seperated strings
+
Multiple status values can be provided with comma separated strings
- - - - -

Query parameters

status (optional)
-
Query Parameter — Status values that need to be considered for filter default: available
+
Query Parameter — Status values that need to be considered for query default: available
- - - + - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

200

successful operation - -

400

Invalid status value - -

-
Up
get /pet/findByTags
Finds Pets by tags (findPetsByTags)
-
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
- - - - -

Query parameters

tags (optional)
Query Parameter — Tags to filter by
- - - + - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

200

successful operation - -

400

Invalid tag value - -

-
Up
get /pet/{petId}
Find pet by ID (getPetById)
-
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
-

Path parameters

petId (required)
Path Parameter — ID of pet that needs to be fetched
- - - - - - - + - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

200

successful operation - -

400

Invalid ID supplied - -

404

Pet not found - -

- +
+
+ Up +
get /pet/{petId}?response=inline_arbitrary_object
+
Fake endpoint to test inline arbitrary object return by 'Find pet by ID' (getPetByIdInObject)
+
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
+ +

Path parameters

+
+
petId (required)
+ +
Path Parameter — ID of pet that needs to be fetched
+
+ + + + + + +

Return type

+ + + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

200

+ successful operation +

400

+ Invalid ID supplied +

404

+ Pet not found +
+
+
+
+ Up +
get /pet/{petId}?testing_byte_array=true
+
Fake endpoint to test byte array return by 'Find pet by ID' (petPetIdtestingByteArraytrueGet)
+
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
+ +

Path parameters

+
+
petId (required)
+ +
Path Parameter — ID of pet that needs to be fetched
+
+ + + + + + +

Return type

+
+ + byte[] +
+ + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

200

+ successful operation +

400

+ Invalid ID supplied +

404

+ Pet not found +
+
+
+
+ Up +
put /pet
+
Update an existing pet (updatePet)
+
+ + +

Consumes

+ This API call consumes the following media types via the Content-Type request header: +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Request body

+
+
body (optional)
+ +
Body Parameter — Pet object that needs to be added to the store
+
+ + + + + + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

400

+ Invalid ID supplied +

404

+ Pet not found +

405

+ Validation exception +
+
Up
post /pet/{petId}
Updates a pet in the store with form data (updatePetWithForm)
-
-

Path parameters

petId (required)
Path Parameter — ID of pet that needs to be updated
- -

Consumes

This API call consumes the following media types via the Content-Type request header:
    -
  • application/x-www-form-urlencoded
  • -
- - - - -

Form parameters

name (optional)
@@ -646,135 +642,47 @@ font-style: italic;
Form Parameter — Updated status of the pet
- - - Todo: process Response Object and its headers, schema, examples - --> - - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

405

Invalid input - -

- -
-
- Up -
delete /pet/{petId}
-
Deletes a pet (deletePet)
- -
- - -

Path parameters

-
-
petId (required)
- -
Path Parameter — Pet id to delete
-
- - - - - - - - - - - - - - - - - -

Produces

- This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
    - -
  • application/json
  • - -
  • application/xml
  • - -
- - -

Responses

- -

400

- Invalid pet value - - -
-
-
Up
post /pet/{petId}/uploadImage
uploads an image (uploadFile)
-
-

Path parameters

petId (required)
Path Parameter — ID of pet to update
- -

Consumes

This API call consumes the following media types via the Content-Type request header:
    -
  • multipart/form-data
  • -
- - - - -

Form parameters

additionalMetadata (optional)
@@ -783,496 +691,468 @@ font-style: italic;
Form Parameter — file to upload
- - - Todo: process Response Object and its headers, schema, examples - --> - - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

0

successful operation - -

- -
-
- Up -
get /store/inventory
-
Returns pet inventories by status (getInventory)
- -
Returns a map of status codes to quantities
- - - - - - - - - - - - - - - - - - -

Produces

- This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
    - -
  • application/json
  • - -
  • application/xml
  • - -
- - -

Responses

- -

200

- successful operation - - -
-
- -
-
- Up -
post /store/order
-
Place an order for a pet (placeOrder)
- -
- - - - - - -

Request body

-
-
body (optional)
- -
Body Parameter — order placed for purchasing the pet
-
- - - - - - - - - - - - - -

Produces

- This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
    - -
  • application/json
  • - -
  • application/xml
  • - -
- - -

Responses

- -

200

- successful operation - - -

400

- Invalid Order - - -
-
- -
-
- Up -
get /store/order/{orderId}
-
Find purchase order by ID (getOrderById)
- -
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
- - -

Path parameters

-
-
orderId (required)
- -
Path Parameter — ID of pet that needs to be fetched
-
- - - - - - - - - - - - - - - - - -

Produces

- This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
    - -
  • application/json
  • - -
  • application/xml
  • - -
- - -

Responses

- -

200

- successful operation - - -

400

- Invalid ID supplied - - -

404

- Order not found - - -
-
-
Up
delete /store/order/{orderId}
Delete purchase order by ID (deleteOrder)
-
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
-

Path parameters

orderId (required)
Path Parameter — ID of the order that needs to be deleted
- - - - - - - - Todo: process Response Object and its headers, schema, examples - --> - - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

400

Invalid ID supplied - -

404

Order not found - -

- +
+
+ Up +
get /store/findByStatus
+
Finds orders by status (findOrdersByStatus)
+
A single status value can be provided as a string
+ + + + + +

Query parameters

+
+
status (optional)
+ +
Query Parameter — Status value that needs to be considered for query default: placed
+
+ + +

Return type

+
+ array[Order] + +
+ + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

200

+ successful operation +

400

+ Invalid status value +
+
+
+
+ Up +
get /store/inventory
+
Returns pet inventories by status (getInventory)
+
Returns a map of status codes to quantities
+ + + + + + + +

Return type

+
+ + map[String, Integer] +
+ + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

200

+ successful operation +
+
+
+
+ Up +
get /store/inventory?response=arbitrary_object
+
Fake endpoint to test arbitrary object return by 'Get inventory' (getInventoryInObject)
+
Returns an arbitrary object which is actually a map of status codes to quantities
+ + + + + + + +

Return type

+
+ + Object +
+ + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

200

+ successful operation +
+
+
+
+ Up +
get /store/order/{orderId}
+
Find purchase order by ID (getOrderById)
+
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ +

Path parameters

+
+
orderId (required)
+ +
Path Parameter — ID of pet that needs to be fetched
+
+ + + + + + +

Return type

+
+ Order + +
+ + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

200

+ successful operation +

400

+ Invalid ID supplied +

404

+ Order not found +
+
+
+
+ Up +
post /store/order
+
Place an order for a pet (placeOrder)
+
+ + + +

Request body

+
+
body (optional)
+ +
Body Parameter — order placed for purchasing the pet
+
+ + + + +

Return type

+
+ Order + +
+ + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

200

+ successful operation +

400

+ Invalid Order +
+
Up
post /user
Create user (createUser)
-
This can only be done by the logged in user.
- - -

Request body

body (optional)
Body Parameter — Created user object
- - - - - - Todo: process Response Object and its headers, schema, examples - --> - - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

0

successful operation - -

-
Up
post /user/createWithArray
Creates list of users with given input array (createUsersWithArrayInput)
-
- - -

Request body

body (optional)
Body Parameter — List of user object
- - - - - - Todo: process Response Object and its headers, schema, examples - --> - - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

0

successful operation - -

-
Up
post /user/createWithList
Creates list of users with given input array (createUsersWithListInput)
-
- - -

Request body

body (optional)
Body Parameter — List of user object
- - - - - - Todo: process Response Object and its headers, schema, examples - --> - - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

0

successful operation - -

- +
+
+ Up +
delete /user/{username}
+
Delete user (deleteUser)
+
This can only be done by the logged in user.
+ +

Path parameters

+
+
username (required)
+ +
Path Parameter — The name that needs to be deleted
+
+ + + + + + + + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

400

+ Invalid username supplied +

404

+ User not found +
+
+
+
+ Up +
get /user/{username}
+
Get user by user name (getUserByName)
+
+ +

Path parameters

+
+
username (required)
+ +
Path Parameter — The name that needs to be fetched. Use user1 for testing.
+
+ + + + + + +

Return type

+
+ User + +
+ + + + +

Produces

+ This API call produces the following media types according to the Accept request header; + the media type will be conveyed by the Content-Type response header. +
    +
  • application/json
  • +
  • application/xml
  • +
+ +

Responses

+

200

+ successful operation +

Example data

+
Content-Type: application/json
+
{id=1, username=johnp, firstName=John, lastName=Public, email=johnp@swagger.io, password=-secret-, phone=0123456789, userStatus=0}
+

400

+ Invalid username supplied +

404

+ User not found +
+
Up
get /user/login
Logs user into the system (loginUser)
-
- - - - -

Query parameters

username (optional)
@@ -1281,316 +1161,106 @@ font-style: italic;
Query Parameter — The password for login in clear text
- - - + - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

200

successful operation - -

400

Invalid username/password supplied - -

-
Up
get /user/logout
Logs out current logged in user session (logoutUser)
-
- - - - - - - - Todo: process Response Object and its headers, schema, examples - --> - - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

0

successful operation - -

- -
-
- Up -
get /user/{username}
-
Get user by user name (getUserByName)
- -
- - -

Path parameters

-
-
username (required)
- -
Path Parameter — The name that needs to be fetched. Use user1 for testing.
-
- - - - - - - - - - - - - - - - - -

Produces

- This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
    - -
  • application/json
  • - -
  • application/xml
  • - -
- - -

Responses

- -

200

- successful operation - -

Example data

-
Content-Type: application/json
-
{id=1, username=johnp, firstName=John, lastName=Public, email=johnp@swagger.io, password=-secret-, phone=0123456789, userStatus=0}
- - -

400

- Invalid username supplied - - -

404

- User not found - - -
-
-
Up
put /user/{username}
Updated user (updateUser)
-
This can only be done by the logged in user.
-

Path parameters

username (required)
Path Parameter — name that need to be deleted
- - -

Request body

body (optional)
Body Parameter — Updated user object
- - - - - - Todo: process Response Object and its headers, schema, examples - --> - - -

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
    -
  • application/json
  • -
  • application/xml
  • -
-

Responses

-

400

Invalid user supplied - -

404

User not found - -

- -
-
- Up -
delete /user/{username}
-
Delete user (deleteUser)
- -
This can only be done by the logged in user.
- - -

Path parameters

-
-
username (required)
- -
Path Parameter — The name that needs to be deleted
-
- - - - - - - - - - - - - - - - - -

Produces

- This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
    - -
  • application/json
  • - -
  • application/xml
  • - -
- - -

Responses

- -

400

- Invalid username supplied - - -

404

- User not found - - -
-
- - - -

Models

@@ -1598,128 +1268,148 @@ font-style: italic;

Table of Contents

    - - -
  1. User
  2. - - - +
  3. $special[model.name]
  4. +
  5. 200_response
  6. +
  7. Animal
  8. +
  9. Cat
  10. Category
  11. - - - -
  12. Pet
  13. - - - -
  14. Tag
  15. - - - +
  16. Dog
  17. +
  18. Format_test
  19. +
  20. Inline_response_200
  21. +
  22. Name
  23. Order
  24. - - +
  25. Pet
  26. +
  27. Return
  28. +
  29. Tag
  30. +
  31. User
- -
-

User Up

+

$special[model.name] Up

-
id
Long
- -
username
String
- -
firstName
String
- -
lastName
String
- -
email
String
- -
password
String
- -
phone
String
- -
userStatus
Integer User Status
- - +
$special[property.name]
Long
+
+
+
+

200_response Up

+
+
name
Integer
+
+
+
+

Animal Up

+
+
className
String
+
+
+
+

Cat Up

+
+
className
String
+
declawed
Boolean
- - -

Category Up

id
Long
- -
name
String
- - +
name
String
- - -
-

Pet Up

+

Dog Up

+
+
className
String
+
breed
String
+
+
+
+

Format_test Up

+
+
integer
Integer
+
int32
Integer
+
int64
Long
+
number
BigDecimal
+
float
Float
+
double
Double
+
string
String
+
byte
byte[]
+
binary
byte[]
+
date
date
+
dateTime
String
+
+
+
+

Inline_response_200 Up

-
id
Long
- -
category
Category
- -
name
String
- -
photoUrls
array[String]
-
tags
array[Tag]
- -
status
String pet status in the store
- +
id
Long
+
category
Object
+
status
String pet status in the store
Enum:
available
pending
sold
- - +
name
String
+
photoUrls
array[String]
- - -
-

Tag Up

+

Name Up

-
id
Long
- -
name
String
- - +
name
Integer
+
snake_case
Integer
- - -

Order Up

id
Long
- -
petId
Long
- -
quantity
Integer
- -
shipDate
Date
- -
status
String Order Status
- +
petId
Long
+
quantity
Integer
+
shipDate
Date
+
status
String Order Status
Enum:
placed
approved
delivered
- -
complete
Boolean
- - +
complete
Boolean
+
+
+
+

Pet Up

+
+
id
Long
+
category
Category
+
name
String
+
photoUrls
array[String]
+
tags
array[Tag]
+
status
String pet status in the store
+
Enum:
+
available
pending
sold
+
+
+
+

Return Up

+
+
return
Integer
+
+
+
+

Tag Up

+
+
id
Long
+
name
String
+
+
+
+

User Up

+
+
id
Long
+
username
String
+
firstName
String
+
lastName
String
+
email
String
+
password
String
+
phone
String
+
userStatus
Integer User Status
- -