parameterList) {
String enumFormatted = "";
- for(CodegenParameter parameter : parameterList) {
+ for (CodegenParameter parameter : parameterList) {
if (parameter.isEnum) {
for (int i = 0; i < parameter._enum.size(); i++) {
String spacer = (i == (parameter._enum.size() - 1)) ? " " : ", ";
@@ -268,5 +268,5 @@ public class StaticHtml2Generator extends DefaultCodegen implements CodegenConfi
public String escapeUnsafeCharacters(String input) {
// just return the original string
return input;
- }
+ }
}
diff --git a/samples/dynamic-html/.swagger-codegen/VERSION b/samples/dynamic-html/.swagger-codegen/VERSION
index 7fea99011a6..096bf47efe3 100644
--- a/samples/dynamic-html/.swagger-codegen/VERSION
+++ b/samples/dynamic-html/.swagger-codegen/VERSION
@@ -1 +1 @@
-2.2.3-SNAPSHOT
\ No newline at end of file
+3.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/dynamic-html/docs/assets/images/logo.png b/samples/dynamic-html/docs/assets/images/logo.png
index 209e5a473fc..6b704e25f99 100644
Binary files a/samples/dynamic-html/docs/assets/images/logo.png and b/samples/dynamic-html/docs/assets/images/logo.png differ
diff --git a/samples/dynamic-html/docs/operations/PetApi.html b/samples/dynamic-html/docs/operations/PetApi.html
index b1fd0c7d62c..75a5fda414f 100644
--- a/samples/dynamic-html/docs/operations/PetApi.html
+++ b/samples/dynamic-html/docs/operations/PetApi.html
@@ -5,7 +5,7 @@
addPet
-
+
URL
http://petstore.swagger.io/v2/pet
HTTP Method
@@ -20,7 +20,7 @@
Body:
- body
+ Pet
Pet(Pet)
Pet object that needs to be added to the store
@@ -29,7 +29,7 @@
deletePet
-
+
URL
http://petstore.swagger.io/v2/pet/{petId}
HTTP Method
@@ -136,7 +136,7 @@
updatePet
-
+
URL
http://petstore.swagger.io/v2/pet
HTTP Method
@@ -151,7 +151,7 @@
Body:
- body
+ Pet
Pet(Pet)
Pet object that needs to be added to the store
@@ -160,7 +160,7 @@
updatePetWithForm
-
+
URL
http://petstore.swagger.io/v2/pet/{petId}
HTTP Method
@@ -187,7 +187,7 @@
name
- String
+ String(string)
Updated name of the pet
@@ -198,7 +198,7 @@
status
- String
+ String(string)
Updated status of the pet
@@ -206,7 +206,7 @@
uploadFile
-
+
URL
http://petstore.swagger.io/v2/pet/{petId}/uploadImage
HTTP Method
@@ -233,7 +233,7 @@
additionalMetadata
- String
+ String(string)
Additional data to pass to server
@@ -244,7 +244,7 @@
file
- File
+ File(file)
file to upload
diff --git a/samples/dynamic-html/docs/operations/StoreApi.html b/samples/dynamic-html/docs/operations/StoreApi.html
index 4d4c7eeed50..cb880712d31 100644
--- a/samples/dynamic-html/docs/operations/StoreApi.html
+++ b/samples/dynamic-html/docs/operations/StoreApi.html
@@ -66,7 +66,7 @@
placeOrder
-
+
URL
http://petstore.swagger.io/v2/store/order
HTTP Method
@@ -81,7 +81,7 @@
Body:
- body
+ Order
Order(Order)
order placed for purchasing the pet
diff --git a/samples/dynamic-html/docs/operations/UserApi.html b/samples/dynamic-html/docs/operations/UserApi.html
index cdd84feedac..bd2447afcd6 100644
--- a/samples/dynamic-html/docs/operations/UserApi.html
+++ b/samples/dynamic-html/docs/operations/UserApi.html
@@ -20,7 +20,7 @@
Body:
- body
+ User
User(User)
Created user object
@@ -29,7 +29,7 @@
createUsersWithArrayInput
-
+
URL
http://petstore.swagger.io/v2/user/createWithArray
HTTP Method
@@ -44,8 +44,8 @@
Body:
- body
- List(User)
+ array
+ List(array)
List of user object
@@ -53,7 +53,7 @@
createUsersWithListInput
-
+
URL
http://petstore.swagger.io/v2/user/createWithList
HTTP Method
@@ -68,8 +68,8 @@
Body:
- body
- List(User)
+ array
+ List(array)
List of user object
@@ -101,7 +101,7 @@
getUserByName
-
+
URL
http://petstore.swagger.io/v2/user/{username}
HTTP Method
@@ -119,13 +119,13 @@
username
String
- The name that needs to be fetched. Use user1 for testing.
+ The name that needs to be fetched. Use user1 for testing.
loginUser
-
+
URL
http://petstore.swagger.io/v2/user/login
HTTP Method
@@ -160,7 +160,7 @@
logoutUser
-
+
URL
http://petstore.swagger.io/v2/user/logout
HTTP Method
@@ -199,7 +199,7 @@
Body:
- body
+ User
User(User)
Updated user object
diff --git a/samples/html/.swagger-codegen/VERSION b/samples/html/.swagger-codegen/VERSION
index 855ff9501eb..096bf47efe3 100644
--- a/samples/html/.swagger-codegen/VERSION
+++ b/samples/html/.swagger-codegen/VERSION
@@ -1 +1 @@
-2.4.0-SNAPSHOT
\ No newline at end of file
+3.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/html/index.html b/samples/html/index.html
index b38b66a92d3..8ad459e8c73 100644
--- a/samples/html/index.html
+++ b/samples/html/index.html
@@ -237,18 +237,12 @@ font-style: italic;
- Consumes
- This API call consumes the following media types via the request header:
-
- application/json
- application/xml
-
Request body
-
+
-
Body Parameter — Pet object that needs to be added to the store
+
Body Parameter —
@@ -259,13 +253,6 @@ font-style: italic;
- Produces
- This API call produces the following media types according to the request header;
- the media type will be conveyed by the response header.
-
- application/xml
- application/json
-
Responses
405
@@ -300,13 +287,6 @@ font-style: italic;
- Produces
- This API call produces the following media types according to the request header;
- the media type will be conveyed by the response header.
-
- application/xml
- application/json
-
Responses
400
@@ -341,6 +321,25 @@ font-style: italic;
+ Example data
+ Content-Type: application/json
+ {
+ "photoUrls" : [ "photoUrls", "photoUrls" ],
+ "name" : "doggie",
+ "id" : 0,
+ "category" : {
+ "name" : "name",
+ "id" : 6
+ },
+ "tags" : [ {
+ "name" : "name",
+ "id" : 1
+ }, {
+ "name" : "name",
+ "id" : 1
+ } ],
+ "status" : "available"
+}
Example data
Content-Type: application/xml
@@ -353,41 +352,6 @@ font-style: italic;
aeiou
- Example data
- Content-Type: application/json
- [ {
- "photoUrls" : [ "photoUrls", "photoUrls" ],
- "name" : "doggie",
- "id" : 0,
- "category" : {
- "name" : "name",
- "id" : 6
- },
- "tags" : [ {
- "name" : "name",
- "id" : 1
- }, {
- "name" : "name",
- "id" : 1
- } ],
- "status" : "available"
-}, {
- "photoUrls" : [ "photoUrls", "photoUrls" ],
- "name" : "doggie",
- "id" : 0,
- "category" : {
- "name" : "name",
- "id" : 6
- },
- "tags" : [ {
- "name" : "name",
- "id" : 1
- }, {
- "name" : "name",
- "id" : 1
- } ],
- "status" : "available"
-} ]
Produces
This API call produces the following media types according to the request header;
@@ -433,6 +397,25 @@ font-style: italic;
+ Example data
+ Content-Type: application/json
+ {
+ "photoUrls" : [ "photoUrls", "photoUrls" ],
+ "name" : "doggie",
+ "id" : 0,
+ "category" : {
+ "name" : "name",
+ "id" : 6
+ },
+ "tags" : [ {
+ "name" : "name",
+ "id" : 1
+ }, {
+ "name" : "name",
+ "id" : 1
+ } ],
+ "status" : "available"
+}
Example data
Content-Type: application/xml
@@ -445,41 +428,6 @@ font-style: italic;
aeiou
- Example data
- Content-Type: application/json
- [ {
- "photoUrls" : [ "photoUrls", "photoUrls" ],
- "name" : "doggie",
- "id" : 0,
- "category" : {
- "name" : "name",
- "id" : 6
- },
- "tags" : [ {
- "name" : "name",
- "id" : 1
- }, {
- "name" : "name",
- "id" : 1
- } ],
- "status" : "available"
-}, {
- "photoUrls" : [ "photoUrls", "photoUrls" ],
- "name" : "doggie",
- "id" : 0,
- "category" : {
- "name" : "name",
- "id" : 6
- },
- "tags" : [ {
- "name" : "name",
- "id" : 1
- }, {
- "name" : "name",
- "id" : 1
- } ],
- "status" : "available"
-} ]
Produces
This API call produces the following media types according to the request header;
@@ -525,18 +473,6 @@ font-style: italic;
- Example data
- Content-Type: application/xml
-
- 123456789
- doggie
-
- aeiou
-
-
-
- aeiou
-
Example data
Content-Type: application/json
{
@@ -556,6 +492,18 @@ font-style: italic;
} ],
"status" : "available"
}
+ Example data
+ Content-Type: application/xml
+
+ 123456789
+ doggie
+
+ aeiou
+
+
+
+ aeiou
+
Produces
This API call produces the following media types according to the request header;
@@ -585,18 +533,12 @@ font-style: italic;
- Consumes
- This API call consumes the following media types via the request header:
-
- application/json
- application/xml
-
Request body
-
+
-
Body Parameter — Pet object that needs to be added to the store
+
Body Parameter —
@@ -607,13 +549,6 @@ font-style: italic;
- Produces
- This API call produces the following media types according to the request header;
- the media type will be conveyed by the response header.
-
- application/xml
- application/json
-
Responses
400
@@ -663,13 +598,6 @@ font-style: italic;
- Produces
- This API call produces the following media types according to the request header;
- the media type will be conveyed by the response header.
-
- application/xml
- application/json
-
Responses
405
@@ -706,7 +634,7 @@ font-style: italic;
Form Parameter — Additional data to pass to server
file (optional)
- Form Parameter — file to upload
+ Form Parameter — file to upload format: binary
Return type
@@ -762,13 +690,6 @@ font-style: italic;
- Produces
- This API call produces the following media types according to the request header;
- the media type will be conveyed by the response header.
-
- application/xml
- application/json
-
Responses
400
@@ -846,16 +767,6 @@ font-style: italic;
- Example data
- Content-Type: application/xml
-
- 123456789
- 123456789
- 123
- 2000-01-23T04:56:07.000Z
- aeiou
- true
-
Example data
Content-Type: application/json
{
@@ -866,6 +777,16 @@ font-style: italic;
"complete" : false,
"status" : "placed"
}
+ Example data
+ Content-Type: application/xml
+
+ 123456789
+ 123456789
+ 123
+ 2000-01-23T04:56:07.000Z
+ aeiou
+ true
+
Produces
This API call produces the following media types according to the request header;
@@ -895,12 +816,17 @@ font-style: italic;
+ Consumes
+ This API call consumes the following media types via the request header:
+
Request body
-
+
-
Body Parameter — order placed for purchasing the pet
+
Body Parameter —
@@ -915,16 +841,6 @@ font-style: italic;
- Example data
- Content-Type: application/xml
-
- 123456789
- 123456789
- 123
- 2000-01-23T04:56:07.000Z
- aeiou
- true
-
Example data
Content-Type: application/json
{
@@ -935,6 +851,16 @@ font-style: italic;
"complete" : false,
"status" : "placed"
}
+ Example data
+ Content-Type: application/xml
+
+ 123456789
+ 123456789
+ 123
+ 2000-01-23T04:56:07.000Z
+ aeiou
+ true
+
Produces
This API call produces the following media types according to the request header;
@@ -962,12 +888,17 @@ font-style: italic;
This can only be done by the logged in user.
+ Consumes
+ This API call consumes the following media types via the request header:
+
Request body
-
+
-
Body Parameter — Created user object
+
Body Parameter —
@@ -978,13 +909,6 @@ font-style: italic;
- Produces
- This API call produces the following media types according to the request header;
- the media type will be conveyed by the response header.
-
- application/xml
- application/json
-
Responses
default
@@ -1003,9 +927,9 @@ font-style: italic;
Request body
-
+
-
Body Parameter — List of user object
+
Body Parameter —
@@ -1016,13 +940,6 @@ font-style: italic;
- Produces
- This API call produces the following media types according to the request header;
- the media type will be conveyed by the response header.
-
- application/xml
- application/json
-
Responses
default
@@ -1041,9 +958,9 @@ font-style: italic;
Request body
-
+
-
Body Parameter — List of user object
+
Body Parameter —
@@ -1054,13 +971,6 @@ font-style: italic;
- Produces
- This API call produces the following media types according to the request header;
- the media type will be conveyed by the response header.
-
- application/xml
- application/json
-
Responses
default
@@ -1091,13 +1001,6 @@ font-style: italic;
- Produces
- This API call produces the following media types according to the request header;
- the media type will be conveyed by the response header.
-
- application/xml
- application/json
-
Responses
400
@@ -1135,18 +1038,6 @@ font-style: italic;
- Example data
- Content-Type: application/xml
-
- 123456789
- aeiou
- aeiou
- aeiou
- aeiou
- aeiou
- aeiou
- 123
-
Example data
Content-Type: application/json
{
@@ -1159,6 +1050,18 @@ font-style: italic;
"email" : "email",
"username" : "username"
}
+ Example data
+ Content-Type: application/xml
+
+ 123456789
+ aeiou
+ aeiou
+ aeiou
+ aeiou
+ aeiou
+ aeiou
+ 123
+
Produces
This API call produces the following media types according to the request header;
@@ -1209,12 +1112,12 @@ font-style: italic;
- Example data
- Content-Type: application/xml
- aeiou
Example data
Content-Type: application/json
""
+ Example data
+ Content-Type: application/xml
+ aeiou
Produces
This API call produces the following media types according to the request header;
@@ -1250,13 +1153,6 @@ font-style: italic;
- Produces
- This API call produces the following media types according to the request header;
- the media type will be conveyed by the response header.
-
- application/xml
- application/json
-
Responses
default
@@ -1278,12 +1174,17 @@ font-style: italic;
Path Parameter — name that need to be deleted
+ Consumes
+ This API call consumes the following media types via the request header:
+
Request body
-
+
-
Body Parameter — Updated user object
+
Body Parameter —
@@ -1294,13 +1195,6 @@ font-style: italic;
- Produces
- This API call produces the following media types according to the request header;
- the media type will be conveyed by the response header.
-
- application/xml
- application/json
-
Responses
400
diff --git a/samples/server/petstore/finch/.swagger-codegen/VERSION b/samples/server/petstore/finch/.swagger-codegen/VERSION
index f9f7450d135..096bf47efe3 100644
--- a/samples/server/petstore/finch/.swagger-codegen/VERSION
+++ b/samples/server/petstore/finch/.swagger-codegen/VERSION
@@ -1 +1 @@
-2.3.0-SNAPSHOT
\ No newline at end of file
+3.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/finch/src/main/scala/DataAccessor.scala b/samples/server/petstore/finch/src/main/scala/DataAccessor.scala
index 2fcb7429b18..3b07e157576 100644
--- a/samples/server/petstore/finch/src/main/scala/DataAccessor.scala
+++ b/samples/server/petstore/finch/src/main/scala/DataAccessor.scala
@@ -16,7 +16,7 @@ trait DataAccessor {
*
* @return A Unit
*/
- def Pet_addPet(body: Pet): Either[CommonError,Unit] = ???
+ def Pet_addPet(pet: Pet): Either[CommonError,Unit] = ???
/**
*
@@ -46,7 +46,7 @@ trait DataAccessor {
*
* @return A Unit
*/
- def Pet_updatePet(body: Pet): Either[CommonError,Unit] = ???
+ def Pet_updatePet(pet: Pet): Either[CommonError,Unit] = ???
/**
*
@@ -82,25 +82,25 @@ trait DataAccessor {
*
* @return A Order
*/
- def Store_placeOrder(body: Order): Either[CommonError,Order] = ???
+ def Store_placeOrder(order: Order): Either[CommonError,Order] = ???
/**
*
* @return A Unit
*/
- def User_createUser(body: User): Either[CommonError,Unit] = ???
+ def User_createUser(user: User): Either[CommonError,Unit] = ???
/**
*
* @return A Unit
*/
- def User_createUsersWithArrayInput(body: Seq[User]): Either[CommonError,Unit] = ???
+ def User_createUsersWithArrayInput(seq: Seq[User]): Either[CommonError,Unit] = ???
/**
*
* @return A Unit
*/
- def User_createUsersWithListInput(body: Seq[User]): Either[CommonError,Unit] = ???
+ def User_createUsersWithListInput(seq: Seq[User]): Either[CommonError,Unit] = ???
/**
*
@@ -130,6 +130,6 @@ trait DataAccessor {
*
* @return A Unit
*/
- def User_updateUser(username: String, body: User): Either[CommonError,Unit] = ???
+ def User_updateUser(username: String, user: User): Either[CommonError,Unit] = ???
}
\ No newline at end of file
diff --git a/samples/server/petstore/finch/src/main/scala/io/swagger/apis/PetApi.scala b/samples/server/petstore/finch/src/main/scala/io/swagger/apis/PetApi.scala
index 3f35d7b0123..86711c7fb35 100644
--- a/samples/server/petstore/finch/src/main/scala/io/swagger/apis/PetApi.scala
+++ b/samples/server/petstore/finch/src/main/scala/io/swagger/apis/PetApi.scala
@@ -60,8 +60,8 @@ object PetApi {
* @return An endpoint representing a Unit
*/
private def addPet(da: DataAccessor): Endpoint[Unit] =
- post("pet" :: jsonBody[Pet]) { (body: Pet) =>
- da.Pet_addPet(body) match {
+ post("pet" :: jsonBody[Pet]) { (pet: Pet) =>
+ da.Pet_addPet(pet) match {
case Left(error) => checkError(error)
case Right(data) => Ok(data)
}
@@ -130,8 +130,8 @@ object PetApi {
* @return An endpoint representing a Unit
*/
private def updatePet(da: DataAccessor): Endpoint[Unit] =
- put("pet" :: jsonBody[Pet]) { (body: Pet) =>
- da.Pet_updatePet(body) match {
+ put("pet" :: jsonBody[Pet]) { (pet: Pet) =>
+ da.Pet_updatePet(pet) match {
case Left(error) => checkError(error)
case Right(data) => Ok(data)
}
diff --git a/samples/server/petstore/finch/src/main/scala/io/swagger/apis/StoreApi.scala b/samples/server/petstore/finch/src/main/scala/io/swagger/apis/StoreApi.scala
index c45ef8153fd..d883e2f2c0c 100644
--- a/samples/server/petstore/finch/src/main/scala/io/swagger/apis/StoreApi.scala
+++ b/samples/server/petstore/finch/src/main/scala/io/swagger/apis/StoreApi.scala
@@ -96,8 +96,8 @@ object StoreApi {
* @return An endpoint representing a Order
*/
private def placeOrder(da: DataAccessor): Endpoint[Order] =
- post("store" :: "order" :: jsonBody[Order]) { (body: Order) =>
- da.Store_placeOrder(body) match {
+ post("store" :: "order" :: jsonBody[Order]) { (order: Order) =>
+ da.Store_placeOrder(order) match {
case Left(error) => checkError(error)
case Right(data) => Ok(data)
}
diff --git a/samples/server/petstore/finch/src/main/scala/io/swagger/apis/UserApi.scala b/samples/server/petstore/finch/src/main/scala/io/swagger/apis/UserApi.scala
index c33effe4417..8928ad2cf54 100644
--- a/samples/server/petstore/finch/src/main/scala/io/swagger/apis/UserApi.scala
+++ b/samples/server/petstore/finch/src/main/scala/io/swagger/apis/UserApi.scala
@@ -59,8 +59,8 @@ object UserApi {
* @return An endpoint representing a Unit
*/
private def createUser(da: DataAccessor): Endpoint[Unit] =
- post("user" :: jsonBody[User]) { (body: User) =>
- da.User_createUser(body) match {
+ post("user" :: jsonBody[User]) { (user: User) =>
+ da.User_createUser(user) match {
case Left(error) => checkError(error)
case Right(data) => Ok(data)
}
@@ -73,8 +73,8 @@ object UserApi {
* @return An endpoint representing a Unit
*/
private def createUsersWithArrayInput(da: DataAccessor): Endpoint[Unit] =
- post("user" :: "createWithArray" :: jsonBody[Seq[User]]) { (body: Seq[User]) =>
- da.User_createUsersWithArrayInput(body) match {
+ post("user" :: "createWithArray" :: jsonBody[Seq[User]]) { (seq: Seq[User]) =>
+ da.User_createUsersWithArrayInput(seq) match {
case Left(error) => checkError(error)
case Right(data) => Ok(data)
}
@@ -87,8 +87,8 @@ object UserApi {
* @return An endpoint representing a Unit
*/
private def createUsersWithListInput(da: DataAccessor): Endpoint[Unit] =
- post("user" :: "createWithList" :: jsonBody[Seq[User]]) { (body: Seq[User]) =>
- da.User_createUsersWithListInput(body) match {
+ post("user" :: "createWithList" :: jsonBody[Seq[User]]) { (seq: Seq[User]) =>
+ da.User_createUsersWithListInput(seq) match {
case Left(error) => checkError(error)
case Right(data) => Ok(data)
}
@@ -157,8 +157,8 @@ object UserApi {
* @return An endpoint representing a Unit
*/
private def updateUser(da: DataAccessor): Endpoint[Unit] =
- put("user" :: string :: jsonBody[User]) { (username: String, body: User) =>
- da.User_updateUser(username, body) match {
+ put("user" :: string :: jsonBody[User]) { (username: String, user: User) =>
+ da.User_updateUser(username, user) match {
case Left(error) => checkError(error)
case Right(data) => Ok(data)
}