From 644231b91518e428410f5033cac66a07e3902e5e Mon Sep 17 00:00:00 2001 From: Julian Bez Date: Wed, 24 Jun 2015 16:32:49 +0200 Subject: [PATCH 1/2] Change optional to required --- modules/swagger-codegen/src/main/resources/php/api.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/php/api.mustache b/modules/swagger-codegen/src/main/resources/php/api.mustache index 3ed7f18c57..394460ce46 100644 --- a/modules/swagger-codegen/src/main/resources/php/api.mustache +++ b/modules/swagger-codegen/src/main/resources/php/api.mustache @@ -67,10 +67,10 @@ class {{classname}} { * * {{{summary}}} * -{{#allParams}} * @param {{dataType}} ${{paramName}} {{description}} {{^optional}}(required){{/optional}}{{#optional}}(optional){{/optional}} +{{#allParams}} * @param {{dataType}} ${{paramName}} {{description}} {{#required}}(required){{/required}}{{^required}}(optional){{/required}} {{/allParams}} * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} */ - public function {{nickname}}({{#allParams}}${{paramName}}{{#optional}}=null{{/optional}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) { + public function {{nickname}}({{#allParams}}${{paramName}}{{#required}}=null{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) { {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set if (${{paramName}} === null) { From 8ce3823698f3c0fd797983082c0da438c3c8caca Mon Sep 17 00:00:00 2001 From: Julian Bez Date: Wed, 24 Jun 2015 16:34:32 +0200 Subject: [PATCH 2/2] Change to not required --- modules/swagger-codegen/src/main/resources/php/api.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/swagger-codegen/src/main/resources/php/api.mustache b/modules/swagger-codegen/src/main/resources/php/api.mustache index 394460ce46..0eb1b0cd54 100644 --- a/modules/swagger-codegen/src/main/resources/php/api.mustache +++ b/modules/swagger-codegen/src/main/resources/php/api.mustache @@ -70,7 +70,7 @@ class {{classname}} { {{#allParams}} * @param {{dataType}} ${{paramName}} {{description}} {{#required}}(required){{/required}}{{^required}}(optional){{/required}} {{/allParams}} * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} */ - public function {{nickname}}({{#allParams}}${{paramName}}{{#required}}=null{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) { + public function {{nickname}}({{#allParams}}${{paramName}}{{^required}}=null{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) { {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set if (${{paramName}} === null) {