Skip to content

Commit 85c37fb

Browse files
committed
fix for #781
1 parent ad9b790 commit 85c37fb

File tree

2 files changed

+5
-5
lines changed
  • modules/swagger-codegen/src/main/resources/scala
  • samples/client/petstore/scala/src/main/scala/io/swagger/client/api

2 files changed

+5
-5
lines changed

modules/swagger-codegen/src/main/resources/scala/api.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class {{classname}}(val defBasePath: String = "{{basePath}}",
3030
{{#allParams}} * @param {{paramName}} {{description}}
3131
{{/allParams}} * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}
3232
*/
33-
def {{nickname}} ({{#allParams}}{{paramName}}: {{dataType}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) {{#returnType}}: Option[{{returnType}}]{{/returnType}} = {
33+
def {{nickname}} ({{#allParams}}{{paramName}}: {{dataType}}{{#defaultValue}} /* = {{{defaultValue}}} */{{/defaultValue}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) {{#returnType}}: Option[{{returnType}}]{{/returnType}} = {
3434
// create path and map variables
3535
val path = "{{path}}".replaceAll("\\{format\\}","json"){{#pathParams}}.replaceAll("\\{" + "{{baseName}}" + "\\}",apiInvoker.escape({{paramName}}))
3636

samples/client/petstore/scala/src/main/scala/io/swagger/client/api/PetApi.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
123123
* @param status Status values that need to be considered for filter
124124
* @return List[Pet]
125125
*/
126-
def findPetsByStatus (status: List[String] = available) : Option[List[Pet]] = {
126+
def findPetsByStatus (status: List[String] /* = available */) : Option[List[Pet]] = {
127127
// create path and map variables
128128
val path = "/pet/findByStatus".replaceAll("\\{format\\}","json")
129129

@@ -325,11 +325,11 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
325325
/**
326326
* Deletes a pet
327327
*
328-
* @param api_key
328+
* @param apiKey
329329
* @param petId Pet id to delete
330330
* @return void
331331
*/
332-
def deletePet (api_key: String, petId: Long) = {
332+
def deletePet (apiKey: String, petId: Long) = {
333333
// create path and map variables
334334
val path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId))
335335

@@ -347,7 +347,7 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
347347

348348

349349

350-
headerParams += "api_key" -> api_key
350+
headerParams += "api_key" -> apiKey
351351

352352

353353
var postBody: AnyRef = null

0 commit comments

Comments
 (0)