Skip to content

Commit

Permalink
Merge pull request swagger-api#1 from Gingonic/hotfix/querySnakeCase
Browse files Browse the repository at this point in the history
Use the baseName for query, file and form parameters, if not the REST…
  • Loading branch information
Gingonic authored Dec 1, 2017
2 parents 61e706b + 9c7c9af commit 3f9df12
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,17 @@ class {{controllerName}} extends Controller

// Read out all input parameter values into variables
{{#queryParams}}
${{paramName}} = $request->query->get('{{paramName}}');
${{paramName}} = $request->query->get('{{baseName}}');
{{/queryParams}}
{{#headerParams}}
${{paramName}} = $request->headers->get('{{baseName}}');
{{/headerParams}}
{{#formParams}}
{{#isFile}}
${{paramName}} = $request->files->get('{{paramName}}');
${{paramName}} = $request->files->get('{{baseName}}');
{{/isFile}}
{{^isFile}}
${{paramName}} = $request->request->get('{{paramName}}');
${{paramName}} = $request->request->get('{{baseName}}');
{{/isFile}}
{{/formParams}}
{{#bodyParams}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined

if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https:/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ public function testCodeInjectEndRnNRWithHttpInfo($test_code_inject____end____rn
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
$e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse()->getBody()->getContents()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./lib/Api</directory>
<directory suffix=".php">./lib/Model</directory>
<directory suffix=".php">./lib\Api</directory>
<directory suffix=".php">./lib\Model</directory>
</whitelist>
</filter>
</phpunit>

0 comments on commit 3f9df12

Please sign in to comment.