diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c67ee71d48b..e84227bd6b5 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -3,7 +3,7 @@ - [ ] Read the [contribution guidelines](https://github.com/swagger-api/swagger-codegen/blob/master/CONTRIBUTING.md). - [ ] Ran the shell script under `./bin/` to update Petstore sample so that CIs can verify the change. (For instance, only need to run `./bin/{LANG}-petstore.sh` and `./bin/security/{LANG}-petstore.sh` if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in `.\bin\windows\`. - [ ] Filed the PR against the correct branch: `3.0.0` branch for changes related to OpenAPI spec 3.0. Default: `master`. -- [ ] Copied the [technical committee](https://github.com/swagger-api/swagger-codegen/#swagger-codegen-technical-committee) to review the pull request if your PR is targeting a particular programming langauge. +- [ ] Copied the [technical committee](https://github.com/swagger-api/swagger-codegen/#swagger-codegen-technical-committee) to review the pull request if your PR is targeting a particular programming language. ### Description of the PR diff --git a/bin/run-all-petstore b/bin/run-all-petstore index be5901e0697..755ab2f749d 100755 --- a/bin/run-all-petstore +++ b/bin/run-all-petstore @@ -8,7 +8,7 @@ echo "Please press CTRL+C to stop or the script will continue in 10 seconds." sleep 10 -for SCRIPT in ./bin/*.sh +for SCRIPT in `ls -l ./bin/*.sh | grep -v all` do if [ -f $SCRIPT -a -x $SCRIPT ] then diff --git a/circle.yml b/circle.yml index 1fb626bce55..122ccd799f9 100644 --- a/circle.yml +++ b/circle.yml @@ -10,6 +10,7 @@ machine: environment: DOCKER_GENERATOR_IMAGE_NAME: swaggerapi/swagger-generator DOCKER_CODEGEN_CLI_IMAGE_NAME: swaggerapi/swagger-codegen-cli + DOCKER_BUILD_TAG: 2.2.3 dependencies: cache_directories: @@ -45,5 +46,7 @@ test: - if [ $? -ne 0 ]; then exit 1; fi ## docker: build generator image and push to Docker Hub - if [ $DOCKER_HUB_USERNAME ]; then docker login --email=$DOCKER_HUB_EMAIL --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD && docker build --rm=false -t $DOCKER_GENERATOR_IMAGE_NAME ./modules/swagger-generator && if [ ! -z "$CIRCLE_TAG" ]; then docker tag $DOCKER_GENERATOR_IMAGE_NAME:latest $DOCKER_GENERATOR_IMAGE_NAME:$CIRCLE_TAG; fi && if [ ! -z "$CIRCLE_TAG" ] || [ "$CIRCLE_BRANCH" = "master" ]; then docker push $DOCKER_GENERATOR_IMAGE_NAME; fi; fi + - if [ $DOCKER_HUB_USERNAME ]; then docker login --email=$DOCKER_HUB_EMAIL --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD && docker build --rm=false -t $DOCKER_GENERATOR_IMAGE_NAME ./modules/swagger-generator && if [ ! -z "$CIRCLE_TAG" ]; then docker tag $DOCKER_GENERATOR_IMAGE_NAME:latest $DOCKER_GENERATOR_IMAGE_NAME:$CIRCLE_TAG; fi && if [ ! -z "$CIRCLE_TAG" ] || [ "$CIRCLE_BRANCH" = "master" ]; then docker push $DOCKER_GENERATOR_IMAGE_NAME:$DOCKER_BUILD_TAG; fi; fi ## docker: build cli image and push to Docker Hub - if [ $DOCKER_HUB_USERNAME ]; then docker login --email=$DOCKER_HUB_EMAIL --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD && docker build --rm=false -t $DOCKER_CODEGEN_CLI_IMAGE_NAME ./modules/swagger-codegen-cli && if [ ! -z "$CIRCLE_TAG" ]; then docker tag $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest $DOCKER_CODEGEN_CLI_IMAGE_NAME:$CIRCLE_TAG; fi && if [ ! -z "$CIRCLE_TAG" ] || [ "$CIRCLE_BRANCH" = "master" ]; then docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME; fi; fi + - if [ $DOCKER_HUB_USERNAME ]; then docker login --email=$DOCKER_HUB_EMAIL --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD && docker build --rm=false -t $DOCKER_CODEGEN_CLI_IMAGE_NAME ./modules/swagger-codegen-cli && if [ ! -z "$CIRCLE_TAG" ]; then docker tag $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest $DOCKER_CODEGEN_CLI_IMAGE_NAME:$CIRCLE_TAG; fi && if [ ! -z "$CIRCLE_TAG" ] || [ "$CIRCLE_BRANCH" = "master" ]; then docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME:$DOCKER_BUILD_TAG; fi; fi diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ErlangClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ErlangClientCodegen.java index 2ce23aa0ecf..ae4d4c9fad8 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ErlangClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ErlangClientCodegen.java @@ -48,12 +48,12 @@ public class ErlangClientCodegen extends DefaultCodegen implements CodegenConfig embeddedTemplateDir = templateDir = "erlang-client"; setReservedWordsLowerCase( - Arrays.asList( - "after","and","andalso","band","begin","bnot","bor","bsl","bsr","bxor","case", - "catch","cond","div","end","fun","if","let","not","of","or","orelse","receive", - "rem","try","when","xor" - ) - ); + Arrays.asList( + "after","and","andalso","band","begin","bnot","bor","bsl","bsr","bxor","case", + "catch","cond","div","end","fun","if","let","not","of","or","orelse","receive", + "rem","try","when","xor" + ) + ); instantiationTypes.clear(); @@ -84,11 +84,9 @@ public class ErlangClientCodegen extends DefaultCodegen implements CodegenConfig cliOptions.clear(); cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "Erlang application name (convention: lowercase).") - .defaultValue(this.packageName)); + .defaultValue(this.packageName)); cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "Erlang application version") - .defaultValue(this.packageVersion)); - - + .defaultValue(this.packageVersion)); } @Override diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/HaskellHttpClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/HaskellHttpClientCodegen.java index 55e96354812..f7a4da78871 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/HaskellHttpClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/HaskellHttpClientCodegen.java @@ -580,6 +580,17 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC ops.get(0).vendorExtensions.put(X_HAS_NEW_TAG, true); } + updateGlobalAdditionalProps(); + return ret; + } + + @Override + public Map postProcessAllModels(Map objs) { + updateGlobalAdditionalProps(); + return super.postProcessAllModels(objs); + } + + public void updateGlobalAdditionalProps() { additionalProperties.put(X_HAS_UNKNOWN_MIME_TYPES, !unknownMimeTypes.isEmpty()); Collections.sort(unknownMimeTypes, new Comparator>() { @@ -601,8 +612,6 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC } }); additionalProperties.put(X_ALL_UNIQUE_PARAMS, params); - - return ret; } @Override diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/Swift4Codegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/Swift4Codegen.java index fa5f8e20c1c..b6760ef363e 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/Swift4Codegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/Swift4Codegen.java @@ -150,7 +150,7 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig { "FILE", "mutating", "protocol", "switch", "FUNCTION", "none", "public", "where", "LINE", "nonmutating", "static", "while", "optional", "struct", "override", "subscript", "postfix", "typealias", "precedence", "var", - "prefix", "Protocol", "required", "right", "set", "Type", "unowned", "weak", + "prefix", "Protocol", "required", "right", "set", "throw", "Type", "unowned", "weak", "Data", "Codable", "Encodable", "Decodable") ); diff --git a/modules/swagger-codegen/src/main/resources/Java/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/Java/git_push.sh.mustache index e153ce23ecf..a2d75234837 100755 --- a/modules/swagger-codegen/src/main/resources/Java/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/google-api-client/ApiClient.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/google-api-client/ApiClient.mustache index 70015378163..fa6e7a601fe 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/google-api-client/ApiClient.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/libraries/google-api-client/ApiClient.mustache @@ -5,16 +5,16 @@ import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; {{#joda}} - import com.fasterxml.jackson.datatype.joda.JodaModule; +import com.fasterxml.jackson.datatype.joda.JodaModule; {{/joda}} {{#java8}} - import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; {{/java8}} {{#threetenbp}} - import com.fasterxml.jackson.datatype.threetenbp.ThreeTenModule; +import com.fasterxml.jackson.datatype.threetenbp.ThreeTenModule; {{/threetenbp}} {{#threetenbp}} - import org.threeten.bp.*; +import org.threeten.bp.*; {{/threetenbp}} import com.google.api.client.googleapis.util.Utils; import com.google.api.client.http.AbstractHttpContent; @@ -26,9 +26,6 @@ import com.google.api.client.json.Json; import java.io.IOException; import java.io.OutputStream; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - {{>generatedAnnotation}} public class ApiClient { private final String basePath; diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/google-api-client/api.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/google-api-client/api.mustache index a1092d1063e..87119b9c771 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/google-api-client/api.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/libraries/google-api-client/api.mustache @@ -72,45 +72,40 @@ public class {{classname}} { {{/externalDocs}} **/ - public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#requiredParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}Map params) throws IOException { - {{#returnType}}HttpResponse response = {{/returnType}}{{operationId}}ForHttpResponse({{#requiredParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}params);{{#returnType}} + public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#bodyParam}}{{^required}}{{{dataType}}} {{paramName}}, {{/required}}{{/bodyParam}}{{#requiredParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}Map params) throws IOException { + {{#returnType}}HttpResponse response = {{/returnType}}{{operationId}}ForHttpResponse({{#bodyParam}}{{^required}}{{paramName}}, {{/required}}{{/bodyParam}}{{#requiredParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}params);{{#returnType}} TypeReference typeRef = new TypeReference<{{{returnType}}}>() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);{{/returnType}} } public HttpResponse {{operationId}}ForHttpResponse({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws IOException { - Object {{localVariablePrefix}}postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; - {{#allParams}}{{#required}} - // verify the required parameter '{{paramName}}' is set + {{#allParams}}{{#required}}// verify the required parameter '{{paramName}}' is set if ({{paramName}} == null) { throw new IllegalArgumentException("Missing the required parameter '{{paramName}}' when calling {{operationId}}"); - } - {{/required}}{{/allParams}} + }{{/required}}{{/allParams}} {{#hasPathParams}} // create a map of path variables final Map uriVariables = new HashMap();{{#pathParams}} uriVariables.put("{{baseName}}", {{{paramName}}});{{/pathParams}} {{/hasPathParams}} UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "{{{path}}}");{{#hasQueryParams}} - {{#queryParams}}if ({{paramName}} != null) { + {{#queryParams}} + if ({{paramName}} != null) { uriBuilder = uriBuilder.queryParam("{{baseName}}", {{paramName}}); - }{{#hasMore}}{{/hasMore}}{{/queryParams}}{{/hasQueryParams}} + }{{/queryParams}}{{/hasQueryParams}} String url = uriBuilder{{#hasPathParams}}.buildFromMap(uriVariables).toString();{{/hasPathParams}}{{^hasPathParams}}.build().toString();{{/hasPathParams}} GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = {{#bodyParam}}{{paramName}} == null ? null : apiClient.new JacksonJsonHttpContent({{paramName}}){{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.{{httpMethod}}, genericUrl, content).execute(); } - public HttpResponse {{operationId}}ForHttpResponse({{#requiredParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}Map params) throws IOException { - Object {{localVariablePrefix}}postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; - {{#allParams}}{{#required}} - // verify the required parameter '{{paramName}}' is set + public HttpResponse {{operationId}}ForHttpResponse({{#bodyParam}}{{^required}}{{{dataType}}} {{paramName}}, {{/required}}{{/bodyParam}}{{#requiredParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}Map params) throws IOException { + {{#allParams}}{{#required}}// verify the required parameter '{{paramName}}' is set if ({{paramName}} == null) { throw new IllegalArgumentException("Missing the required parameter '{{paramName}}' when calling {{operationId}}"); - } - {{/required}}{{/allParams}} + }{{/required}}{{/allParams}} {{#hasPathParams}} // create a map of path variables final Map uriVariables = new HashMap();{{#pathParams}} @@ -118,14 +113,12 @@ public class {{classname}} { {{/hasPathParams}} UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "{{{path}}}"); - if (params == null) { - params = new HashMap(); - }{{#queryParams}}{{#required}} - + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params);{{#queryParams}}{{#required}} // Add the required query param '{{paramName}}' to the map of query params - params.put("{{paramName}}", {{paramName}});{{/required}}{{/queryParams}} + allParams.put("{{paramName}}", {{paramName}});{{/required}}{{/queryParams}} - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -138,11 +131,10 @@ public class {{classname}} { } } - String url = uriBuilder{{#hasPathParams}}.buildFromMap(uriVariables).toString();{{/hasPathParams}}{{^hasPathParams}}.build().toString();{{/hasPathParams}} GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = {{#bodyParam}}{{paramName}} == null ? null : apiClient.new JacksonJsonHttpContent({{paramName}}){{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.{{httpMethod}}, genericUrl, content).execute(); } diff --git a/modules/swagger-codegen/src/main/resources/android/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/android/git_push.sh.mustache index a9b0f28edfb..f65b794638f 100755 --- a/modules/swagger-codegen/src/main/resources/android/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/android/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/android/libraries/volley/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/android/libraries/volley/git_push.sh.mustache index b3c88d4be09..3e868678e81 100644 --- a/modules/swagger-codegen/src/main/resources/android/libraries/volley/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/android/libraries/volley/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/apex/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/apex/git_push.sh.mustache index e153ce23ecf..a2d75234837 100644 --- a/modules/swagger-codegen/src/main/resources/apex/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/apex/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/aspnetcore/enumClass.mustache b/modules/swagger-codegen/src/main/resources/aspnetcore/enumClass.mustache index 3c1d6e15d6a..ce4e3054ea3 100644 --- a/modules/swagger-codegen/src/main/resources/aspnetcore/enumClass.mustache +++ b/modules/swagger-codegen/src/main/resources/aspnetcore/enumClass.mustache @@ -8,6 +8,6 @@ /// Enum {{name}} for {{{value}}} /// [EnumMember(Value = {{#isLong}}"{{/isLong}}{{#isInteger}}"{{/isInteger}}{{#isFloat}}"{{/isFloat}}{{#isDouble}}"{{/isDouble}}{{{value}}}{{#isLong}}"{{/isLong}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isFloat}}"{{/isFloat}})] - {{name}}{{#isLong}} = {{{value}}}{{/isLong}}{{#isInteger}} = {{{value}}}{{/isInteger}}{{^-last}}, + {{name}}{{#isLong}} = {{{value}}}{{/isLong}}{{#isInteger}} = {{{value}}}{{/isInteger}}{{^isInteger}} = {{-index}}{{/isInteger}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}} } diff --git a/modules/swagger-codegen/src/main/resources/clojure/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/clojure/git_push.sh.mustache index e153ce23ecf..a2d75234837 100755 --- a/modules/swagger-codegen/src/main/resources/clojure/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/clojure/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/cpprest/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/cpprest/git_push.sh.mustache index c7d7c390acf..c7a337655c3 100644 --- a/modules/swagger-codegen/src/main/resources/cpprest/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/cpprest/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/csharp/enumClass.mustache b/modules/swagger-codegen/src/main/resources/csharp/enumClass.mustache index d8d5d4185dd..015e7142dbc 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/enumClass.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/enumClass.mustache @@ -12,6 +12,6 @@ /// Enum {{name}} for {{{value}}} /// [EnumMember(Value = {{#isLong}}"{{/isLong}}{{#isInteger}}"{{/isInteger}}{{#isFloat}}"{{/isFloat}}{{#isDouble}}"{{/isDouble}}{{{value}}}{{#isLong}}"{{/isLong}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isFloat}}"{{/isFloat}})] - {{name}}{{#isLong}} = {{{value}}}{{/isLong}}{{#isInteger}} = {{{value}}}{{/isInteger}}{{^-last}}, + {{name}}{{#isLong}} = {{{value}}}{{/isLong}}{{#isInteger}} = {{{value}}}{{/isInteger}}{{^isInteger}} = {{-index}}{{/isInteger}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}} } diff --git a/modules/swagger-codegen/src/main/resources/csharp/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/csharp/git_push.sh.mustache index a9b0f28edfb..f65b794638f 100755 --- a/modules/swagger-codegen/src/main/resources/csharp/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/csharp/modelEnum.mustache b/modules/swagger-codegen/src/main/resources/csharp/modelEnum.mustache index 64e50883f8d..23f575bb06f 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/modelEnum.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/modelEnum.mustache @@ -12,6 +12,6 @@ /// Enum {{name}} for {{{value}}} /// [EnumMember(Value = {{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}})] - {{name}}{{#isInteger}} = {{{value}}}{{/isInteger}}{{^-last}}, + {{name}}{{#isInteger}} = {{{value}}}{{/isInteger}}{{^isInteger}} = {{-index}}{{/isInteger}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}} } diff --git a/modules/swagger-codegen/src/main/resources/csharp/modelInnerEnum.mustache b/modules/swagger-codegen/src/main/resources/csharp/modelInnerEnum.mustache index 7af083a925f..674ab033d01 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/modelInnerEnum.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/modelInnerEnum.mustache @@ -13,7 +13,7 @@ /// Enum {{name}} for {{{value}}} /// [EnumMember(Value = {{#isLong}}"{{/isLong}}{{#isInteger}}"{{/isInteger}}{{#isFloat}}"{{/isFloat}}{{#isDouble}}"{{/isDouble}}{{{value}}}{{#isLong}}"{{/isLong}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isFloat}}"{{/isFloat}})] - {{name}}{{#isLong}} = {{{value}}}{{/isLong}}{{#isInteger}} = {{{value}}}{{/isInteger}}{{^-last}}, + {{name}}{{#isLong}} = {{{value}}}{{/isLong}}{{#isInteger}} = {{{value}}}{{/isInteger}}{{^isInteger}} = {{-index}}{{/isInteger}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}} } {{/isContainer}} diff --git a/modules/swagger-codegen/src/main/resources/dart/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/dart/git_push.sh.mustache index e153ce23ecf..a2d75234837 100755 --- a/modules/swagger-codegen/src/main/resources/dart/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/dart/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/flash/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/flash/git_push.sh.mustache index e153ce23ecf..a2d75234837 100755 --- a/modules/swagger-codegen/src/main/resources/flash/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/flash/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/flaskConnexion/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/flaskConnexion/git_push.sh.mustache index a9b0f28edfb..f65b794638f 100755 --- a/modules/swagger-codegen/src/main/resources/flaskConnexion/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/flaskConnexion/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/go/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/go/git_push.sh.mustache index e153ce23ecf..a2d75234837 100755 --- a/modules/swagger-codegen/src/main/resources/go/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/go/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/haskell-http-client/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/haskell-http-client/git_push.sh.mustache index e153ce23ecf..a2d75234837 100644 --- a/modules/swagger-codegen/src/main/resources/haskell-http-client/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/haskell-http-client/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/lua/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/lua/git_push.sh.mustache index e153ce23ecf..a2d75234837 100755 --- a/modules/swagger-codegen/src/main/resources/lua/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/lua/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/nancyfx/innerApiEnum.mustache b/modules/swagger-codegen/src/main/resources/nancyfx/innerApiEnum.mustache index 0c6a219e7bb..586b0e423c7 100644 --- a/modules/swagger-codegen/src/main/resources/nancyfx/innerApiEnum.mustache +++ b/modules/swagger-codegen/src/main/resources/nancyfx/innerApiEnum.mustache @@ -4,7 +4,7 @@ public enum {{>innerApiEnumName}} { {{#allowableValues}} -{{#values}} {{&.}}{{^-last}}, {{/-last}} +{{#values}} {{&.}}{{^isInteger}} = {{-index}}{{/isInteger}}{{^-last}}, {{/-last}} {{/values}} {{/allowableValues}} }; diff --git a/modules/swagger-codegen/src/main/resources/nancyfx/modelEnum.mustache b/modules/swagger-codegen/src/main/resources/nancyfx/modelEnum.mustache index 8d29373d205..303e4c71c26 100644 --- a/modules/swagger-codegen/src/main/resources/nancyfx/modelEnum.mustache +++ b/modules/swagger-codegen/src/main/resources/nancyfx/modelEnum.mustache @@ -10,6 +10,6 @@ /// /// Enum {{name}} /// - {{name}}{{#isInteger}} = {{{value}}}{{/isInteger}}{{^-last}}, + {{name}}{{#isInteger}} = {{{value}}}{{/isInteger}}{{^isInteger}} = {{-index}}{{/isInteger}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}} - } \ No newline at end of file + } diff --git a/modules/swagger-codegen/src/main/resources/objc/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/objc/git_push.sh.mustache index e153ce23ecf..a2d75234837 100644 --- a/modules/swagger-codegen/src/main/resources/objc/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/objc/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/perl/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/perl/git_push.sh.mustache index e153ce23ecf..a2d75234837 100755 --- a/modules/swagger-codegen/src/main/resources/perl/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/perl/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/php-symfony/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/php-symfony/git_push.sh.mustache index a9b0f28edfb..f65b794638f 100755 --- a/modules/swagger-codegen/src/main/resources/php-symfony/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/php-symfony/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/php/README.mustache b/modules/swagger-codegen/src/main/resources/php/README.mustache index eeff364b156..f130f944d67 100644 --- a/modules/swagger-codegen/src/main/resources/php/README.mustache +++ b/modules/swagger-codegen/src/main/resources/php/README.mustache @@ -68,22 +68,27 @@ Please follow the [installation procedure](#installation--usage) and then run th require_once(__DIR__ . '/vendor/autoload.php'); {{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}}{{#hasAuthMethods}}{{#authMethods}}{{#isBasic}} // Configure HTTP basic authorization: {{{name}}} -{{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); -{{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');{{/isBasic}}{{#isApiKey}} + ->setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD');{{/isBasic}}{{#isApiKey}} // Configure API key authorization: {{{name}}} -{{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setApiKey('{{{keyParamName}}}', 'YOUR_API_KEY'); +$config = {{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setApiKey('{{{keyParamName}}}', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// {{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setApiKeyPrefix('{{{keyParamName}}}', 'Bearer');{{/isApiKey}}{{#isOAuth}} +// $config = {{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setApiKeyPrefix('{{{keyParamName}}}', 'Bearer');{{/isApiKey}}{{#isOAuth}} // Configure OAuth2 access token for authorization: {{{name}}} -{{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');{{/isOAuth}}{{/authMethods}} +$config = {{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');{{/isOAuth}}{{/authMethods}} {{/hasAuthMethods}} -$api_instance = new {{invokerPackage}}\Api\{{classname}}(); +$apiInstance = new {{invokerPackage}}\Api\{{classname}}( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(){{#hasAuthMethods}}, + $config{{/hasAuthMethods}} +); {{#allParams}}${{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}} {{/allParams}} try { - {{#returnType}}$result = {{/returnType}}$api_instance->{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} + {{#returnType}}$result = {{/returnType}}$apiInstance->{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} print_r($result);{{/returnType}} } catch (Exception $e) { echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL; diff --git a/modules/swagger-codegen/src/main/resources/php/api.mustache b/modules/swagger-codegen/src/main/resources/php/api.mustache index 2ef85004c4b..5fffd0de57f 100644 --- a/modules/swagger-codegen/src/main/resources/php/api.mustache +++ b/modules/swagger-codegen/src/main/resources/php/api.mustache @@ -130,7 +130,8 @@ use {{invokerPackage}}\ObjectSerializer; 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() ); } diff --git a/modules/swagger-codegen/src/main/resources/php/api_doc.mustache b/modules/swagger-codegen/src/main/resources/php/api_doc.mustache index 6d0ad8ebbb4..4118b83c30d 100644 --- a/modules/swagger-codegen/src/main/resources/php/api_doc.mustache +++ b/modules/swagger-codegen/src/main/resources/php/api_doc.mustache @@ -23,22 +23,29 @@ Method | HTTP request | Description require_once(__DIR__ . '/vendor/autoload.php'); {{#hasAuthMethods}}{{#authMethods}}{{#isBasic}} // Configure HTTP basic authorization: {{{name}}} -{{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); -{{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');{{/isBasic}}{{#isApiKey}} +$config = {{{invokerPackage}}}\Configuration::getDefaultConfiguration() + ->setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); +{{/isBasic}}{{#isApiKey}} // Configure API key authorization: {{{name}}} -{{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setApiKey('{{{keyParamName}}}', 'YOUR_API_KEY'); +$config = {{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setApiKey('{{{keyParamName}}}', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// {{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setApiKeyPrefix('{{{keyParamName}}}', 'Bearer');{{/isApiKey}}{{#isOAuth}} +// $config = {{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setApiKeyPrefix('{{{keyParamName}}}', 'Bearer');{{/isApiKey}}{{#isOAuth}} // Configure OAuth2 access token for authorization: {{{name}}} -{{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');{{/isOAuth}}{{/authMethods}} +$config = {{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');{{/isOAuth}}{{/authMethods}} {{/hasAuthMethods}} -$api_instance = new {{invokerPackage}}\Api\{{classname}}(new \Http\Adapter\Guzzle6\Client()); +$apiInstance = new {{invokerPackage}}\Api\{{classname}}( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(){{#hasAuthMethods}}, + $config{{/hasAuthMethods}} +); {{#allParams}}${{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}} {{/allParams}} try { - {{#returnType}}$result = {{/returnType}}$api_instance->{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} + {{#returnType}}$result = {{/returnType}}$apiInstance->{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} print_r($result);{{/returnType}} } catch (Exception $e) { echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL; diff --git a/modules/swagger-codegen/src/main/resources/php/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/php/git_push.sh.mustache index a9b0f28edfb..f65b794638f 100755 --- a/modules/swagger-codegen/src/main/resources/php/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/php/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/python/api_client.mustache b/modules/swagger-codegen/src/main/resources/python/api_client.mustache index 6c6ed078e36..6a9a1c2744c 100644 --- a/modules/swagger-codegen/src/main/resources/python/api_client.mustache +++ b/modules/swagger-codegen/src/main/resources/python/api_client.mustache @@ -150,7 +150,6 @@ class ApiClient(object): _request_timeout=_request_timeout) self.last_response = response_data -{{^tornado}} return_data = response_data if _preload_content: @@ -160,12 +159,20 @@ class ApiClient(object): else: return_data = None +{{^tornado}} if _return_http_data_only: return (return_data) else: return (return_data, response_data.status, response_data.getheaders()) {{/tornado}} +{{#tornado}} + if _return_http_data_only: + raise tornado.gen.Return(return_data) + else: + raise tornado.gen.Return((return_data, response_data.status, + response_data.getheaders())) +{{/tornado}} def sanitize_for_serialization(self, obj): """Builds a JSON POST object. @@ -524,7 +531,7 @@ class ApiClient(object): content_disposition).group(1) path = os.path.join(os.path.dirname(path), filename) - with open(path, "w") as f: + with open(path, "wb") as f: f.write(response.data) return path diff --git a/modules/swagger-codegen/src/main/resources/python/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/python/git_push.sh.mustache index e153ce23ecf..a2d75234837 100755 --- a/modules/swagger-codegen/src/main/resources/python/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/python/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/python/tornado/rest.mustache b/modules/swagger-codegen/src/main/resources/python/tornado/rest.mustache index ef5fb834742..805e9d4badd 100644 --- a/modules/swagger-codegen/src/main/resources/python/tornado/rest.mustache +++ b/modules/swagger-codegen/src/main/resources/python/tornado/rest.mustache @@ -10,6 +10,7 @@ import ssl import certifi # python 2 and python 3 compatibility library +import six from six.moves.urllib.parse import urlencode import tornado import tornado.gen @@ -50,7 +51,7 @@ class RESTClientObject(object): # if not set certificate file, use Mozilla's root certificates. ca_certs = certifi.where() - self.ssl_context = ssl.SSLContext() + self.ssl_context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) self.ssl_context.load_verify_locations(cafile=ca_certs) if configuration.cert_file: self.ssl_context.load_cert_chain( @@ -121,7 +122,8 @@ class RESTClientObject(object): elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 request.body = urlencode(post_params) elif headers['Content-Type'] == 'multipart/form-data': - request.body = encode_multipart_formdata(post_params) + multipart = encode_multipart_formdata(post_params) + request.body, headers['Content-Type'] = multipart # Pass a `bytes` parameter directly in the body to support # other content types than Json when `body` argument is provided # in serialized form @@ -134,15 +136,24 @@ class RESTClientObject(object): declared content type.""" raise ApiException(status=0, reason=msg) - r = yield self.pool_manager.fetch(request) - r = RESTResponse(r, r.body) + r = yield self.pool_manager.fetch(request, raise_error=False) - # log response body - logger.debug("response body: %s", r.data) + if _preload_content: + + r = RESTResponse(r, r.body) + # In the python 3, the response.data is bytes. + # we need to decode it to string. + if six.PY3: + r.data = r.data.decode('utf8') + + # log response body + logger.debug("response body: %s", r.data) if not 200 <= r.status <= 299: raise ApiException(http_resp=r) + raise tornado.gen.Return(r) + @tornado.gen.coroutine def GET(self, url, headers=None, query_params=None, _preload_content=True, _request_timeout=None): diff --git a/modules/swagger-codegen/src/main/resources/qt5cpp/model-body.mustache b/modules/swagger-codegen/src/main/resources/qt5cpp/model-body.mustache index 7fa52b6bde1..896c53a75ed 100644 --- a/modules/swagger-codegen/src/main/resources/qt5cpp/model-body.mustache +++ b/modules/swagger-codegen/src/main/resources/qt5cpp/model-body.mustache @@ -35,7 +35,8 @@ void void {{classname}}::cleanup() { - {{#vars}}{{#complexType}} + {{#vars}} + {{#complexType}} if({{name}} != nullptr) { {{#isContainer}}{{#isListContainer}}QList<{{complexType}}*>* arr = {{name}};{{/isListContainer}}{{#isMapContainer}}QMap* arr = {{name}};{{/isMapContainer}} foreach({{complexType}}* o, *arr) { @@ -58,10 +59,16 @@ void void {{classname}}::fromJsonObject(QJsonObject &pJson) { {{#vars}} - {{^isContainer}}::{{cppNamespace}}::setValue(&{{name}}, pJson["{{baseName}}"], "{{baseType}}", "{{complexType}}");{{/isContainer}} + {{^isContainer}} + ::{{cppNamespace}}::setValue(&{{name}}, pJson["{{baseName}}"], "{{baseType}}", "{{complexType}}"); + {{/isContainer}} {{#isListContainer}} - {{#complexType}}::{{cppNamespace}}::setValue(&{{name}}, pJson["{{baseName}}"], "{{baseType}}", "{{complexType}}");{{/complexType}} - {{^complexType}}::{{cppNamespace}}::setValue(&{{name}}, pJson["{{baseName}}"], "{{baseType}}", "{{items.baseType}}");{{/complexType}} + {{#complexType}} + ::{{cppNamespace}}::setValue(&{{name}}, pJson["{{baseName}}"], "{{baseType}}", "{{complexType}}"); + {{/complexType}} + {{^complexType}} + ::{{cppNamespace}}::setValue(&{{name}}, pJson["{{baseName}}"], "{{baseType}}", "{{items.baseType}}"); + {{/complexType}} {{/isListContainer}} {{#isMapContainer}} if( pJson["{{baseName}}"].isObject()){ @@ -95,32 +102,52 @@ QString QJsonObject* {{classname}}::asJsonObject() { QJsonObject* obj = new QJsonObject(); - {{#vars}}{{#complexType}}{{^isContainer}}{{#complexType}} - toJsonValue(QString("{{baseName}}"), {{name}}, obj, QString("{{complexType}}"));{{/complexType}}{{^complexType}} + {{#vars}} + {{#complexType}} + {{^isContainer}} + {{#complexType}} + toJsonValue(QString("{{baseName}}"), {{name}}, obj, QString("{{complexType}}")); + {{/complexType}} + {{^complexType}} if({{name}} != nullptr && *{{name}} != nullptr) { obj->insert("{{name}}", QJsonValue(*{{name}})); - }{{/complexType}}{{/isContainer}}{{#isListContainer}} + } + {{/complexType}} + {{/isContainer}} + {{#isListContainer}} QJsonArray {{name}}JsonArray; toJsonArray((QList*){{name}}, &{{name}}JsonArray, "{{name}}", "{{complexType}}"); - obj->insert("{{baseName}}", {{name}}JsonArray);{{/isListContainer}}{{#isMapContainer}} + obj->insert("{{baseName}}", {{name}}JsonArray); + {{/isListContainer}} + {{#isMapContainer}} QJsonArray {{name}}JsonArray; for(auto keyval : {{name}}->keys()){ QJsonObject {{name}}_jobj; toJsonValue(keyval, ((*{{name}})[keyval]), &{{name}}_jobj, "{{complexType}}"); {{name}}JsonArray.append({{name}}_jobj); } - obj->insert("{{baseName}}", {{name}}JsonArray);{{/isMapContainer}}{{/complexType}}{{^complexType}}{{^isContainer}} - obj->insert("{{baseName}}", QJsonValue({{name}}));{{/isContainer}}{{#isListContainer}} + obj->insert("{{baseName}}", {{name}}JsonArray); + {{/isMapContainer}} + {{/complexType}} + {{^complexType}} + {{^isContainer}} + obj->insert("{{baseName}}", QJsonValue({{name}})); + {{/isContainer}} + {{#isListContainer}} QJsonArray {{name}}JsonArray; toJsonArray((QList*){{name}}, &{{name}}JsonArray, "{{name}}", "{{items.baseType}}"); - obj->insert("{{baseName}}", {{name}}JsonArray);{{/isListContainer}}{{#isMapContainer}} + obj->insert("{{baseName}}", {{name}}JsonArray); + {{/isListContainer}} + {{#isMapContainer}} QJsonArray {{name}}JsonArray; for(auto keyval : {{name}}->keys()){ QJsonObject {{name}}_jobj; toJsonValue(keyval, ((*{{name}})[keyval]), &{{name}}_jobj, "{{items.baseType}}"); {{name}}JsonArray.append(portsobj); } - obj->insert("{{baseName}}", {{name}}JsonArray);{{/isMapContainer}}{{/complexType}} + obj->insert("{{baseName}}", {{name}}JsonArray); + {{/isMapContainer}} + {{/complexType}} {{/vars}} return obj; diff --git a/modules/swagger-codegen/src/main/resources/qt5cpp/model-header.mustache b/modules/swagger-codegen/src/main/resources/qt5cpp/model-header.mustache index 0a55f3aab24..d2866f60e57 100644 --- a/modules/swagger-codegen/src/main/resources/qt5cpp/model-header.mustache +++ b/modules/swagger-codegen/src/main/resources/qt5cpp/model-header.mustache @@ -16,7 +16,8 @@ #include "SWGObject.h" -{{#models}}{{#model}} +{{#models}} +{{#model}} {{#cppNamespaceDeclarations}} namespace {{this}} { {{/cppNamespaceDeclarations}} diff --git a/modules/swagger-codegen/src/main/resources/qt5cpp/model.mustache b/modules/swagger-codegen/src/main/resources/qt5cpp/model.mustache index 4d3590b8afe..80bf2842537 100644 --- a/modules/swagger-codegen/src/main/resources/qt5cpp/model.mustache +++ b/modules/swagger-codegen/src/main/resources/qt5cpp/model.mustache @@ -21,7 +21,8 @@ using namespace Tizen::Web::Json; {{#imports}}{{{import}}} {{/imports}} -{{#models}}{{#model}} +{{#models}} +{{#model}} {{#cppNamespaceDeclarations}} namespace {{this}} { @@ -47,11 +48,12 @@ public: {{#vars}} {{datatype}} {{getter}}(); - void {{setter}}({{datatype}} {{name}}); + void {{setter}}({{{datatype}}} {{name}}); {{/vars}} private: - {{#vars}}{{datatype}} {{name}}; + {{#vars}} + {{{datatype}}} {{name}}; {{/vars}} }; diff --git a/modules/swagger-codegen/src/main/resources/r/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/r/git_push.sh.mustache index e153ce23ecf..a2d75234837 100755 --- a/modules/swagger-codegen/src/main/resources/r/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/r/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/restbed/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/restbed/git_push.sh.mustache index c7d7c390acf..c7a337655c3 100644 --- a/modules/swagger-codegen/src/main/resources/restbed/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/restbed/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/ruby/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/ruby/git_push.sh.mustache index 052b8991126..62855652e65 100755 --- a/modules/swagger-codegen/src/main/resources/ruby/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/git_push.sh.mustache @@ -39,7 +39,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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/rust/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/rust/git_push.sh.mustache index e153ce23ecf..a2d75234837 100755 --- a/modules/swagger-codegen/src/main/resources/rust/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/rust/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/scala/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/scala/git_push.sh.mustache index e153ce23ecf..a2d75234837 100755 --- a/modules/swagger-codegen/src/main/resources/scala/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/scala/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/swift/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/swift/git_push.sh.mustache index e153ce23ecf..a2d75234837 100755 --- a/modules/swagger-codegen/src/main/resources/swift/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/swift/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/swift3/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/swift3/git_push.sh.mustache index e153ce23ecf..a2d75234837 100755 --- a/modules/swagger-codegen/src/main/resources/swift3/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/swift3/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/swift4/CodableHelper.mustache b/modules/swagger-codegen/src/main/resources/swift4/CodableHelper.mustache index d56cb0e7348..befa0594f6a 100644 --- a/modules/swagger-codegen/src/main/resources/swift4/CodableHelper.mustache +++ b/modules/swagger-codegen/src/main/resources/swift4/CodableHelper.mustache @@ -11,14 +11,20 @@ public typealias EncodeResult = (data: Data?, error: Error?) open class CodableHelper { + open static var dateformatter: DateFormatter? + open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T : Decodable { var returnedDecodable: T? = nil var returnedError: Error? = nil let decoder = JSONDecoder() - decoder.dataDecodingStrategy = .base64 - if #available(iOS 10.0, *) { - decoder.dateDecodingStrategy = .iso8601 + if let df = self.dateformatter { + decoder.dateDecodingStrategy = .formatted(df) + } else { + decoder.dataDecodingStrategy = .base64 + if #available(iOS 10.0, *) { + decoder.dateDecodingStrategy = .iso8601 + } } do { diff --git a/modules/swagger-codegen/src/main/resources/swift4/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/swift4/git_push.sh.mustache index e153ce23ecf..a2d75234837 100755 --- a/modules/swagger-codegen/src/main/resources/swift4/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/swift4/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/typescript-angular/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/typescript-angular/git_push.sh.mustache index e153ce23ecf..a2d75234837 100755 --- a/modules/swagger-codegen/src/main/resources/typescript-angular/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-angular/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/typescript-angularjs/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/typescript-angularjs/git_push.sh.mustache index e153ce23ecf..a2d75234837 100755 --- a/modules/swagger-codegen/src/main/resources/typescript-angularjs/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-angularjs/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/typescript-aurelia/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/typescript-aurelia/git_push.sh.mustache index e153ce23ecf..a2d75234837 100755 --- a/modules/swagger-codegen/src/main/resources/typescript-aurelia/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-aurelia/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/typescript-fetch/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/typescript-fetch/git_push.sh.mustache index 4d6b6157f71..dd342baf078 100755 --- a/modules/swagger-codegen/src/main/resources/typescript-fetch/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-fetch/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/typescript-jquery/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/typescript-jquery/git_push.sh.mustache index e153ce23ecf..a2d75234837 100755 --- a/modules/swagger-codegen/src/main/resources/typescript-jquery/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-jquery/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/main/resources/typescript-node/api.mustache b/modules/swagger-codegen/src/main/resources/typescript-node/api.mustache index 97e14dfc41a..eb68f2a0e01 100644 --- a/modules/swagger-codegen/src/main/resources/typescript-node/api.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-node/api.mustache @@ -448,7 +448,7 @@ export class {{classname}} { {{#returnType}} body = ObjectSerializer.deserialize(body, "{{{returnType}}}"); {{/returnType}} - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); diff --git a/modules/swagger-codegen/src/main/resources/typescript-node/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/typescript-node/git_push.sh.mustache index e153ce23ecf..a2d75234837 100755 --- a/modules/swagger-codegen/src/main/resources/typescript-node/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-node/git_push.sh.mustache @@ -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://github.com/${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 diff --git a/modules/swagger-codegen/src/test/resources/integrationtests/csharp/general/enum-support-expected/src/IO.Swagger/Model/MyClassWithOptionalInlineEnum.cs b/modules/swagger-codegen/src/test/resources/integrationtests/csharp/general/enum-support-expected/src/IO.Swagger/Model/MyClassWithOptionalInlineEnum.cs index 2146daae4de..f0232199d26 100644 --- a/modules/swagger-codegen/src/test/resources/integrationtests/csharp/general/enum-support-expected/src/IO.Swagger/Model/MyClassWithOptionalInlineEnum.cs +++ b/modules/swagger-codegen/src/test/resources/integrationtests/csharp/general/enum-support-expected/src/IO.Swagger/Model/MyClassWithOptionalInlineEnum.cs @@ -41,43 +41,43 @@ namespace IO.Swagger.Model /// Enum Sun for "sun" /// [EnumMember(Value = "sun")] - Sun, + Sun = 1, /// /// Enum Mon for "mon" /// [EnumMember(Value = "mon")] - Mon, + Mon = 2, /// /// Enum Tue for "tue" /// [EnumMember(Value = "tue")] - Tue, + Tue = 3, /// /// Enum Wed for "wed" /// [EnumMember(Value = "wed")] - Wed, + Wed = 4, /// /// Enum Thu for "thu" /// [EnumMember(Value = "thu")] - Thu, + Thu = 5, /// /// Enum Fri for "fri" /// [EnumMember(Value = "fri")] - Fri, + Fri = 6, /// /// Enum Sat for "sat" /// [EnumMember(Value = "sat")] - Sat + Sat = 7 } /// diff --git a/modules/swagger-codegen/src/test/resources/integrationtests/csharp/general/enum-support-expected/src/IO.Swagger/Model/MyClassWithRequiredInlineEnum.cs b/modules/swagger-codegen/src/test/resources/integrationtests/csharp/general/enum-support-expected/src/IO.Swagger/Model/MyClassWithRequiredInlineEnum.cs index fb43dccce3f..1d461a4e558 100644 --- a/modules/swagger-codegen/src/test/resources/integrationtests/csharp/general/enum-support-expected/src/IO.Swagger/Model/MyClassWithRequiredInlineEnum.cs +++ b/modules/swagger-codegen/src/test/resources/integrationtests/csharp/general/enum-support-expected/src/IO.Swagger/Model/MyClassWithRequiredInlineEnum.cs @@ -41,43 +41,43 @@ namespace IO.Swagger.Model /// Enum Sun for "sun" /// [EnumMember(Value = "sun")] - Sun, + Sun = 1, /// /// Enum Mon for "mon" /// [EnumMember(Value = "mon")] - Mon, + Mon = 2, /// /// Enum Tue for "tue" /// [EnumMember(Value = "tue")] - Tue, + Tue = 3, /// /// Enum Wed for "wed" /// [EnumMember(Value = "wed")] - Wed, + Wed = 4, /// /// Enum Thu for "thu" /// [EnumMember(Value = "thu")] - Thu, + Thu = 5, /// /// Enum Fri for "fri" /// [EnumMember(Value = "fri")] - Fri, + Fri = 6, /// /// Enum Sat for "sat" /// [EnumMember(Value = "sat")] - Sat + Sat = 7 } /// diff --git a/modules/swagger-codegen/src/test/resources/integrationtests/csharp/general/enum-support-expected/src/IO.Swagger/Model/WeekDays.cs b/modules/swagger-codegen/src/test/resources/integrationtests/csharp/general/enum-support-expected/src/IO.Swagger/Model/WeekDays.cs index ae81432d79b..e51a01de8fa 100644 --- a/modules/swagger-codegen/src/test/resources/integrationtests/csharp/general/enum-support-expected/src/IO.Swagger/Model/WeekDays.cs +++ b/modules/swagger-codegen/src/test/resources/integrationtests/csharp/general/enum-support-expected/src/IO.Swagger/Model/WeekDays.cs @@ -35,43 +35,43 @@ namespace IO.Swagger.Model /// Enum Sun for "sun" /// [EnumMember(Value = "sun")] - Sun, + Sun = 1, /// /// Enum Mon for "mon" /// [EnumMember(Value = "mon")] - Mon, + Mon = 2, /// /// Enum Tue for "tue" /// [EnumMember(Value = "tue")] - Tue, + Tue = 3, /// /// Enum Wed for "wed" /// [EnumMember(Value = "wed")] - Wed, + Wed = 4, /// /// Enum Thu for "thu" /// [EnumMember(Value = "thu")] - Thu, + Thu = 5, /// /// Enum Fri for "fri" /// [EnumMember(Value = "fri")] - Fri, + Fri = 6, /// /// Enum Sat for "sat" /// [EnumMember(Value = "sat")] - Sat + Sat = 7 } } diff --git a/modules/swagger-generator/pom.xml b/modules/swagger-generator/pom.xml index 0225e12b988..5d579c625cc 100644 --- a/modules/swagger-generator/pom.xml +++ b/modules/swagger-generator/pom.xml @@ -111,7 +111,7 @@ wget - http://github.com/swagger-api/swagger-ui/archive/master.tar.gz + https://github.com/swagger-api/swagger-ui/archive/master.tar.gz true true diff --git a/pom.xml b/pom.xml index a3c47a48c5f..06e025965be 100644 --- a/pom.xml +++ b/pom.xml @@ -839,11 +839,13 @@ + samples/client/petstore/php/SwaggerClient-php samples/client/petstore/ruby samples/client/petstore/scala samples/client/petstore/akka-scala samples/client/petstore/javascript samples/client/petstore/python + samples/client/petstore/python-tornado samples/client/petstore/typescript-fetch/builds/default samples/client/petstore/typescript-fetch/builds/es6-target samples/client/petstore/typescript-fetch/builds/with-npm-version diff --git a/samples/client/petstore-security-test/php/SwaggerClient-php/README.md b/samples/client/petstore-security-test/php/SwaggerClient-php/README.md index 3c73985e40c..1f5c98d4da7 100644 --- a/samples/client/petstore-security-test/php/SwaggerClient-php/README.md +++ b/samples/client/petstore-security-test/php/SwaggerClient-php/README.md @@ -56,11 +56,15 @@ Please follow the [installation procedure](#installation--usage) and then run th testCodeInjectEndRnNR($test_code_inject____end____rn_n_r); + $apiInstance->testCodeInjectEndRnNR($test_code_inject____end____rn_n_r); } catch (Exception $e) { echo 'Exception when calling FakeApi->testCodeInjectEndRnNR: ', $e->getMessage(), PHP_EOL; } diff --git a/samples/client/petstore-security-test/php/SwaggerClient-php/docs/Api/FakeApi.md b/samples/client/petstore-security-test/php/SwaggerClient-php/docs/Api/FakeApi.md index 445abaf0855..6b76f9e222c 100644 --- a/samples/client/petstore-security-test/php/SwaggerClient-php/docs/Api/FakeApi.md +++ b/samples/client/petstore-security-test/php/SwaggerClient-php/docs/Api/FakeApi.md @@ -17,11 +17,15 @@ To test code injection *_/ ' \" =end -- \\r\\n \\n \\r testCodeInjectEndRnNR($test_code_inject____end____rn_n_r); + $apiInstance->testCodeInjectEndRnNR($test_code_inject____end____rn_n_r); } catch (Exception $e) { echo 'Exception when calling FakeApi->testCodeInjectEndRnNR: ', $e->getMessage(), PHP_EOL; } diff --git a/samples/client/petstore-security-test/python/docs/FakeApi.md b/samples/client/petstore-security-test/python/docs/FakeApi.md index e35d744ef36..ba03f0fad17 100644 --- a/samples/client/petstore-security-test/python/docs/FakeApi.md +++ b/samples/client/petstore-security-test/python/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description To test code injection */ ' \" =end -- \\r\\n \\n \\r -### Example +### Example ```python from __future__ import print_function import time @@ -24,7 +24,7 @@ from pprint import pprint api_instance = petstore_api.FakeApi() test_code_inject____end____rn_n_r = 'test_code_inject____end____rn_n_r_example' # str | To test code injection */ ' \" =end -- \\r\\n \\n \\r (optional) -try: +try: # To test code injection */ ' \" =end -- \\r\\n \\n \\r api_instance.test_code_inject____end__rn_n_r(test_code_inject____end____rn_n_r=test_code_inject____end____rn_n_r) except ApiException as e: diff --git a/samples/client/petstore-security-test/python/petstore_api/__init__.py b/samples/client/petstore-security-test/python/petstore_api/__init__.py index 0573fa17d0d..af5957b1a04 100644 --- a/samples/client/petstore-security-test/python/petstore_api/__init__.py +++ b/samples/client/petstore-security-test/python/petstore_api/__init__.py @@ -1,9 +1,11 @@ # coding: utf-8 +# flake8: noqa + """ Swagger Petstore */ ' \" =end -- \\r\\n \\n \\r - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =end -- + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =end -- # noqa: E501 OpenAPI spec version: 1.0.0 */ ' \" =end -- \\r\\n \\n \\r Contact: apiteam@swagger.io */ ' \" =end -- \\r\\n \\n \\r @@ -13,13 +15,11 @@ from __future__ import absolute_import -# import models into sdk package -from .models.model_return import ModelReturn - # import apis into sdk package -from .apis.fake_api import FakeApi +from petstore_api.api.fake_api import FakeApi # import ApiClient -from .api_client import ApiClient - -from .configuration import Configuration +from petstore_api.api_client import ApiClient +from petstore_api.configuration import Configuration +# import models into sdk package +from petstore_api.models.model_return import ModelReturn diff --git a/samples/client/petstore-security-test/python/petstore_api/api/__init__.py b/samples/client/petstore-security-test/python/petstore_api/api/__init__.py new file mode 100644 index 00000000000..a2a6f73f45c --- /dev/null +++ b/samples/client/petstore-security-test/python/petstore_api/api/__init__.py @@ -0,0 +1,6 @@ +from __future__ import absolute_import + +# flake8: noqa + +# import apis into api package +from petstore_api.api.fake_api import FakeApi diff --git a/samples/client/petstore-security-test/python/petstore_api/api/fake_api.py b/samples/client/petstore-security-test/python/petstore_api/api/fake_api.py new file mode 100644 index 00000000000..0972042d7be --- /dev/null +++ b/samples/client/petstore-security-test/python/petstore_api/api/fake_api.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Swagger Petstore */ ' \" =end -- \\r\\n \\n \\r + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =end -- # noqa: E501 + + OpenAPI spec version: 1.0.0 */ ' \" =end -- \\r\\n \\n \\r + Contact: apiteam@swagger.io */ ' \" =end -- \\r\\n \\n \\r + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from petstore_api.api_client import ApiClient + + +class FakeApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def test_code_inject____end__rn_n_r(self, **kwargs): # noqa: E501 + """To test code injection */ ' \" =end -- \\r\\n \\n \\r # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.test_code_inject____end__rn_n_r(async=True) + >>> result = thread.get() + + :param async bool + :param str test_code_inject____end____rn_n_r: To test code injection */ ' \" =end -- \\r\\n \\n \\r + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.test_code_inject____end__rn_n_r_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.test_code_inject____end__rn_n_r_with_http_info(**kwargs) # noqa: E501 + return data + + def test_code_inject____end__rn_n_r_with_http_info(self, **kwargs): # noqa: E501 + """To test code injection */ ' \" =end -- \\r\\n \\n \\r # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.test_code_inject____end__rn_n_r_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :param str test_code_inject____end____rn_n_r: To test code injection */ ' \" =end -- \\r\\n \\n \\r + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['test_code_inject____end____rn_n_r'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method test_code_inject____end__rn_n_r" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + if 'test_code_inject____end____rn_n_r' in params: + form_params.append(('test code inject */ ' " =end -- \r\n \n \r', params['test_code_inject____end____rn_n_r'])) # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', '*/ \" =end -- ']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', '*/ \" =end -- ']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/fake', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/samples/client/petstore-security-test/python/petstore_api/api_client.py b/samples/client/petstore-security-test/python/petstore_api/api_client.py index ea9f0084ba5..360016c2565 100644 --- a/samples/client/petstore-security-test/python/petstore_api/api_client.py +++ b/samples/client/petstore-security-test/python/petstore_api/api_client.py @@ -2,7 +2,7 @@ """ Swagger Petstore */ ' \" =end -- \\r\\n \\n \\r - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =end -- + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =end -- # noqa: E501 OpenAPI spec version: 1.0.0 */ ' \" =end -- \\r\\n \\n \\r Contact: apiteam@swagger.io */ ' \" =end -- \\r\\n \\n \\r @@ -11,27 +11,25 @@ from __future__ import absolute_import -import os -import re +import datetime import json import mimetypes -import tempfile from multiprocessing.pool import ThreadPool - -from datetime import date, datetime +import os +import re +import tempfile # python 2 and python 3 compatibility library -from six import PY3, integer_types, iteritems, text_type +import six from six.moves.urllib.parse import quote -from . import models -from .configuration import Configuration -from .rest import ApiException, RESTClientObject +from petstore_api.configuration import Configuration +import petstore_api.models +from petstore_api import rest class ApiClient(object): - """ - Generic API client for Swagger client library builds. + """Generic API client for Swagger client library builds. Swagger generic API client. This client handles the client- server communication, and is invariant across implementations. Specifics of @@ -42,64 +40,63 @@ class ApiClient(object): Ref: https://github.com/swagger-api/swagger-codegen Do not edit the class manually. - :param host: The base path for the server to call. + :param configuration: .Configuration object for this client :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API """ - PRIMITIVE_TYPES = (float, bool, bytes, text_type) + integer_types + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types NATIVE_TYPES_MAPPING = { 'int': int, - 'long': int if PY3 else long, + 'long': int if six.PY3 else long, # noqa: F821 'float': float, 'str': str, 'bool': bool, - 'date': date, - 'datetime': datetime, + 'date': datetime.date, + 'datetime': datetime.datetime, 'object': object, } - def __init__(self, configuration=None, header_name=None, header_value=None, cookie=None): + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None): if configuration is None: configuration = Configuration() self.configuration = configuration self.pool = ThreadPool() - self.rest_client = RESTClientObject(configuration) + self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} if header_name is not None: self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. self.user_agent = 'Swagger-Codegen/1.0.0/python' - + def __del__(self): self.pool.close() self.pool.join() @property def user_agent(self): - """ - Gets user agent. - """ + """User agent for this API client""" return self.default_headers['User-Agent'] @user_agent.setter def user_agent(self, value): - """ - Sets user agent. - """ self.default_headers['User-Agent'] = value def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value - def __call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_type=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, _preload_content=True, - _request_timeout=None): + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_type=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): config = self.configuration @@ -121,7 +118,9 @@ class ApiClient(object): for k, v in path_params: # specified safe chars, encode everything resource_path = resource_path.replace( - '{%s}' % k, quote(str(v), safe=config.safe_chars_for_path_param)) + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) # query parameters if query_params: @@ -147,12 +146,11 @@ class ApiClient(object): url = self.configuration.host + resource_path # perform request and return response - response_data = self.request(method, url, - query_params=query_params, - headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) self.last_response = response_data @@ -167,11 +165,11 @@ class ApiClient(object): if _return_http_data_only: return (return_data) else: - return (return_data, response_data.status, response_data.getheaders()) + return (return_data, response_data.status, + response_data.getheaders()) def sanitize_for_serialization(self, obj): - """ - Builds a JSON POST object. + """Builds a JSON POST object. If obj is None, return None. If obj is str, int, long, float, bool, return directly. @@ -194,7 +192,7 @@ class ApiClient(object): elif isinstance(obj, tuple): return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj) - elif isinstance(obj, (datetime, date)): + elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() if isinstance(obj, dict): @@ -206,15 +204,14 @@ class ApiClient(object): # Convert attribute name to json key in # model definition for request. obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in iteritems(obj.swagger_types) + for attr, _ in six.iteritems(obj.swagger_types) if getattr(obj, attr) is not None} return {key: self.sanitize_for_serialization(val) - for key, val in iteritems(obj_dict)} + for key, val in six.iteritems(obj_dict)} def deserialize(self, response, response_type): - """ - Deserializes response into an object. + """Deserializes response into an object. :param response: RESTResponse object to be deserialized. :param response_type: class literal for @@ -236,8 +233,7 @@ class ApiClient(object): return self.__deserialize(data, response_type) def __deserialize(self, data, klass): - """ - Deserializes dict, list, str into an object. + """Deserializes dict, list, str into an object. :param data: dict, list or str. :param klass: class literal, or string of class name. @@ -256,21 +252,21 @@ class ApiClient(object): if klass.startswith('dict('): sub_kls = re.match('dict\(([^,]*), (.*)\)', klass).group(2) return {k: self.__deserialize(v, sub_kls) - for k, v in iteritems(data)} + for k, v in six.iteritems(data)} # convert str to class if klass in self.NATIVE_TYPES_MAPPING: klass = self.NATIVE_TYPES_MAPPING[klass] else: - klass = getattr(models, klass) + klass = getattr(petstore_api.models, klass) if klass in self.PRIMITIVE_TYPES: return self.__deserialize_primitive(data, klass) elif klass == object: return self.__deserialize_object(data) - elif klass == date: + elif klass == datetime.date: return self.__deserialize_date(data) - elif klass == datetime: + elif klass == datetime.datetime: return self.__deserialize_datatime(data) else: return self.__deserialize_model(data, klass) @@ -279,10 +275,10 @@ class ApiClient(object): path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, response_type=None, auth_settings=None, async=None, - _return_http_data_only=None, collection_formats=None, _preload_content=True, - _request_timeout=None): - """ - Makes the HTTP request (synchronous) and return the deserialized data. + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + To make an async request, set the async parameter. :param resource_path: Path to method endpoint. @@ -299,13 +295,17 @@ class ApiClient(object): :param files dict: key -> filename, value -> filepath, for `multipart/form-data`. :param async bool: execute request asynchronously - :param _return_http_data_only: response data without head status code and headers + :param _return_http_data_only: response data without head status code + and headers :param collection_formats: dict of collection formats for path, query, header, and post parameters. - :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without - reading/decoding response data. Default is True. - :param _request_timeout: timeout setting for this request. If one number provided, it will be total request - timeout. It can also be a pair (tuple) of (connection, read) timeouts. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: If async parameter is True, the request will be called asynchronously. @@ -318,22 +318,23 @@ class ApiClient(object): path_params, query_params, header_params, body, post_params, files, response_type, auth_settings, - _return_http_data_only, collection_formats, _preload_content, _request_timeout) + _return_http_data_only, collection_formats, + _preload_content, _request_timeout) else: - thread = self.pool.apply_async(self.__call_api, (resource_path, method, - path_params, query_params, + thread = self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, query_params, header_params, body, post_params, files, response_type, auth_settings, _return_http_data_only, - collection_formats, _preload_content, _request_timeout)) + collection_formats, + _preload_content, _request_timeout)) return thread def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, _request_timeout=None): - """ - Makes the HTTP request using RESTClient. - """ + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" if method == "GET": return self.rest_client.GET(url, query_params=query_params, @@ -392,8 +393,7 @@ class ApiClient(object): ) def parameters_to_tuples(self, params, collection_formats): - """ - Get parameters as list of tuples, formatting collections. + """Get parameters as list of tuples, formatting collections. :param params: Parameters as dict or list of two-tuples :param dict collection_formats: Parameter collection formats @@ -402,7 +402,7 @@ class ApiClient(object): new_params = [] if collection_formats is None: collection_formats = {} - for k, v in iteritems(params) if isinstance(params, dict) else params: + for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 if k in collection_formats: collection_format = collection_formats[k] if collection_format == 'multi': @@ -423,8 +423,7 @@ class ApiClient(object): return new_params def prepare_post_parameters(self, post_params=None, files=None): - """ - Builds form parameters. + """Builds form parameters. :param post_params: Normal form parameters. :param files: File parameters. @@ -436,7 +435,7 @@ class ApiClient(object): params = post_params if files: - for k, v in iteritems(files): + for k, v in six.iteritems(files): if not v: continue file_names = v if type(v) is list else [v] @@ -444,15 +443,15 @@ class ApiClient(object): with open(n, 'rb') as f: filename = os.path.basename(f.name) filedata = f.read() - mimetype = mimetypes.\ - guess_type(filename)[0] or 'application/octet-stream' - params.append(tuple([k, tuple([filename, filedata, mimetype])])) + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) return params def select_header_accept(self, accepts): - """ - Returns `Accept` based on an array of accepts provided. + """Returns `Accept` based on an array of accepts provided. :param accepts: List of headers. :return: Accept (e.g. application/json). @@ -468,8 +467,7 @@ class ApiClient(object): return ', '.join(accepts) def select_header_content_type(self, content_types): - """ - Returns `Content-Type` based on an array of content_types provided. + """Returns `Content-Type` based on an array of content_types provided. :param content_types: List of content-types. :return: Content-Type (e.g. application/json). @@ -485,8 +483,7 @@ class ApiClient(object): return content_types[0] def update_params_for_auth(self, headers, querys, auth_settings): - """ - Updates header and query params based on authentication setting. + """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. :param querys: Query parameters tuple list to be updated. @@ -510,7 +507,8 @@ class ApiClient(object): ) def __deserialize_file(self, response): - """ + """Deserializes body to file + Saves response body into a file in a temporary folder, using the filename from the `Content-Disposition` header if provided. @@ -523,19 +521,17 @@ class ApiClient(object): content_disposition = response.getheader("Content-Disposition") if content_disposition: - filename = re.\ - search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition).\ - group(1) + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) path = os.path.join(os.path.dirname(path), filename) - with open(path, "w") as f: + with open(path, "wb") as f: f.write(response.data) return path def __deserialize_primitive(self, data, klass): - """ - Deserializes string to primitive type. + """Deserializes string to primitive type. :param data: str. :param klass: class literal. @@ -545,21 +541,19 @@ class ApiClient(object): try: return klass(data) except UnicodeEncodeError: - return unicode(data) + return six.u(data) except TypeError: return data def __deserialize_object(self, value): - """ - Return a original value. + """Return a original value. :return: object. """ return value def __deserialize_date(self, string): - """ - Deserializes string to date. + """Deserializes string to date. :param string: str. :return: date. @@ -570,14 +564,13 @@ class ApiClient(object): except ImportError: return string except ValueError: - raise ApiException( + raise rest.ApiException( status=0, - reason="Failed to parse `{0}` into a date object".format(string) + reason="Failed to parse `{0}` as date object".format(string) ) def __deserialize_datatime(self, string): - """ - Deserializes string to datetime. + """Deserializes string to datetime. The string should be in iso8601 datetime format. @@ -590,32 +583,32 @@ class ApiClient(object): except ImportError: return string except ValueError: - raise ApiException( + raise rest.ApiException( status=0, reason=( - "Failed to parse `{0}` into a datetime object" + "Failed to parse `{0}` as datetime object" .format(string) ) ) def __deserialize_model(self, data, klass): - """ - Deserializes list or dict to model. + """Deserializes list or dict to model. :param data: dict, list. :param klass: class literal. :return: model object. """ - if not klass.swagger_types and not hasattr(klass, 'get_real_child_model'): + if not klass.swagger_types and not hasattr(klass, + 'get_real_child_model'): return data kwargs = {} if klass.swagger_types is not None: - for attr, attr_type in iteritems(klass.swagger_types): - if data is not None \ - and klass.attribute_map[attr] in data \ - and isinstance(data, (list, dict)): + for attr, attr_type in six.iteritems(klass.swagger_types): + if (data is not None and + klass.attribute_map[attr] in data and + isinstance(data, (list, dict))): value = data[klass.attribute_map[attr]] kwargs[attr] = self.__deserialize(value, attr_type) diff --git a/samples/client/petstore-security-test/python/petstore_api/configuration.py b/samples/client/petstore-security-test/python/petstore_api/configuration.py index da9d119a09e..c5a442ee576 100644 --- a/samples/client/petstore-security-test/python/petstore_api/configuration.py +++ b/samples/client/petstore-security-test/python/petstore_api/configuration.py @@ -3,7 +3,7 @@ """ Swagger Petstore */ ' \" =end -- \\r\\n \\n \\r - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =end -- + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =end -- # noqa: E501 OpenAPI spec version: 1.0.0 */ ' \" =end -- \\r\\n \\n \\r Contact: apiteam@swagger.io */ ' \" =end -- \\r\\n \\n \\r @@ -13,24 +13,23 @@ from __future__ import absolute_import -import urllib3 - import copy import logging import multiprocessing import sys +import urllib3 -from six import iteritems -from six import with_metaclass +import six from six.moves import http_client as httplib + class TypeWithDefault(type): def __init__(cls, name, bases, dct): super(TypeWithDefault, cls).__init__(name, bases, dct) cls._default = None def __call__(cls): - if cls._default == None: + if cls._default is None: cls._default = type.__call__(cls) return copy.copy(cls._default) @@ -38,17 +37,15 @@ class TypeWithDefault(type): cls._default = copy.copy(default) -class Configuration(with_metaclass(TypeWithDefault, object)): - """ - NOTE: This class is auto generated by the swagger code generator program. +class Configuration(six.with_metaclass(TypeWithDefault, object)): + """NOTE: This class is auto generated by the swagger code generator program. + Ref: https://github.com/swagger-api/swagger-codegen Do not edit the class manually. """ def __init__(self): - """ - Constructor - """ + """Constructor""" # Default Base url self.host = "https://petstore.swagger.io */ ' \" =end -- \\r\\n \\n \\r/v2 */ ' \" =end -- \\r\\n \\n \\r" # Temp file folder for downloading files @@ -83,7 +80,8 @@ class Configuration(with_metaclass(TypeWithDefault, object)): self.debug = False # SSL/TLS verification - # Set this to false to skip verifying SSL certificate when calling API from https server. + # Set this to false to skip verifying SSL certificate when calling API + # from https server. self.verify_ssl = True # Set this to customize the certificate file to verify the peer. self.ssl_ca_cert = None @@ -101,7 +99,6 @@ class Configuration(with_metaclass(TypeWithDefault, object)): # cpu_count * 5 is used as default value to increase performance. self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - # Proxy URL self.proxy = None # Safe chars for path_param @@ -109,18 +106,22 @@ class Configuration(with_metaclass(TypeWithDefault, object)): @property def logger_file(self): - """ - Gets the logger_file. + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str """ return self.__logger_file @logger_file.setter def logger_file(self, value): - """ - Sets the logger_file. + """The logger file. - If the logger_file is None, then add stream handler and remove file handler. - Otherwise, add file handler and remove stream handler. + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. :param value: The logger_file path. :type: str @@ -131,7 +132,7 @@ class Configuration(with_metaclass(TypeWithDefault, object)): # then add file handler and remove stream handler. self.logger_file_handler = logging.FileHandler(self.__logger_file) self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in iteritems(self.logger): + for _, logger in six.iteritems(self.logger): logger.addHandler(self.logger_file_handler) if self.logger_stream_handler: logger.removeHandler(self.logger_stream_handler) @@ -140,22 +141,23 @@ class Configuration(with_metaclass(TypeWithDefault, object)): # then add stream handler and remove file handler. self.logger_stream_handler = logging.StreamHandler() self.logger_stream_handler.setFormatter(self.logger_formatter) - for _, logger in iteritems(self.logger): + for _, logger in six.iteritems(self.logger): logger.addHandler(self.logger_stream_handler) if self.logger_file_handler: logger.removeHandler(self.logger_file_handler) @property def debug(self): - """ - Gets the debug status. + """Debug status + + :param value: The debug status, True or False. + :type: bool """ return self.__debug @debug.setter def debug(self, value): - """ - Sets the debug status. + """Debug status :param value: The debug status, True or False. :type: bool @@ -163,29 +165,32 @@ class Configuration(with_metaclass(TypeWithDefault, object)): self.__debug = value if self.__debug: # if debug status is True, turn on debug logging - for _, logger in iteritems(self.logger): + for _, logger in six.iteritems(self.logger): logger.setLevel(logging.DEBUG) # turn on httplib debug httplib.HTTPConnection.debuglevel = 1 else: # if debug status is False, turn off debug logging, # setting log level to default `logging.WARNING` - for _, logger in iteritems(self.logger): + for _, logger in six.iteritems(self.logger): logger.setLevel(logging.WARNING) # turn off httplib debug httplib.HTTPConnection.debuglevel = 0 @property def logger_format(self): - """ - Gets the logger_format. + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str """ return self.__logger_format @logger_format.setter def logger_format(self, value): - """ - Sets the logger_format. + """The logger format. The logger_formatter will be updated when sets logger_format. @@ -196,29 +201,28 @@ class Configuration(with_metaclass(TypeWithDefault, object)): self.logger_formatter = logging.Formatter(self.__logger_format) def get_api_key_with_prefix(self, identifier): - """ - Gets API key (with prefix if set). + """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. :return: The token for api key authentication. """ - if self.api_key.get(identifier) and self.api_key_prefix.get(identifier): - return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier] + if (self.api_key.get(identifier) and + self.api_key_prefix.get(identifier)): + return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier] # noqa: E501 elif self.api_key.get(identifier): return self.api_key[identifier] def get_basic_auth_token(self): - """ - Gets HTTP basic authentication header (string). + """Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication. """ - return urllib3.util.make_headers(basic_auth=self.username + ':' + self.password)\ - .get('authorization') + return urllib3.util.make_headers( + basic_auth=self.username + ':' + self.password + ).get('authorization') def auth_settings(self): - """ - Gets Auth Settings dict for api client. + """Gets Auth Settings dict for api client. :return: The Auth Settings information dict. """ @@ -242,8 +246,7 @@ class Configuration(with_metaclass(TypeWithDefault, object)): } def to_debug_report(self): - """ - Gets the essential information for debugging. + """Gets the essential information for debugging. :return: The report for debugging. """ diff --git a/samples/client/petstore-security-test/python/petstore_api/models/__init__.py b/samples/client/petstore-security-test/python/petstore_api/models/__init__.py index a75a00eb198..ff65654b12c 100644 --- a/samples/client/petstore-security-test/python/petstore_api/models/__init__.py +++ b/samples/client/petstore-security-test/python/petstore_api/models/__init__.py @@ -1,9 +1,10 @@ # coding: utf-8 +# flake8: noqa """ Swagger Petstore */ ' \" =end -- \\r\\n \\n \\r - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =end -- + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =end -- # noqa: E501 OpenAPI spec version: 1.0.0 */ ' \" =end -- \\r\\n \\n \\r Contact: apiteam@swagger.io */ ' \" =end -- \\r\\n \\n \\r @@ -14,4 +15,4 @@ from __future__ import absolute_import # import models into model package -from .model_return import ModelReturn +from petstore_api.models.model_return import ModelReturn diff --git a/samples/client/petstore-security-test/python/petstore_api/models/model_return.py b/samples/client/petstore-security-test/python/petstore_api/models/model_return.py index bb6813619ad..a4edf0658fd 100644 --- a/samples/client/petstore-security-test/python/petstore_api/models/model_return.py +++ b/samples/client/petstore-security-test/python/petstore_api/models/model_return.py @@ -3,7 +3,7 @@ """ Swagger Petstore */ ' \" =end -- \\r\\n \\n \\r - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =end -- + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =end -- # noqa: E501 OpenAPI spec version: 1.0.0 */ ' \" =end -- \\r\\n \\n \\r Contact: apiteam@swagger.io */ ' \" =end -- \\r\\n \\n \\r @@ -11,18 +11,18 @@ """ -from pprint import pformat -from six import iteritems -import re +import pprint +import re # noqa: F401 + +import six class ModelReturn(object): - """ - NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -38,47 +38,43 @@ class ModelReturn(object): '_return': 'return' } - def __init__(self, _return=None): - """ - ModelReturn - a model defined in Swagger - """ + def __init__(self, _return=None): # noqa: E501 + """ModelReturn - a model defined in Swagger""" # noqa: E501 self.__return = None self.discriminator = None if _return is not None: - self._return = _return + self._return = _return @property def _return(self): - """ - Gets the _return of this ModelReturn. - property description */ ' \" =end -- \\r\\n \\n \\r + """Gets the _return of this ModelReturn. # noqa: E501 - :return: The _return of this ModelReturn. + property description */ ' \" =end -- \\r\\n \\n \\r # noqa: E501 + + :return: The _return of this ModelReturn. # noqa: E501 :rtype: int """ return self.__return @_return.setter def _return(self, _return): - """ - Sets the _return of this ModelReturn. - property description */ ' \" =end -- \\r\\n \\n \\r + """Sets the _return of this ModelReturn. - :param _return: The _return of this ModelReturn. + property description */ ' \" =end -- \\r\\n \\n \\r # noqa: E501 + + :param _return: The _return of this ModelReturn. # noqa: E501 :type: int """ self.__return = _return def to_dict(self): - """ - Returns the model properties as a dict - """ + """Returns the model properties as a dict""" result = {} - for attr, _ in iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -99,28 +95,20 @@ class ModelReturn(object): return result def to_str(self): - """ - Returns the string representation of the model - """ - return pformat(self.to_dict()) + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) def __repr__(self): - """ - For `print` and `pprint` - """ + """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): - """ - Returns true if both objects are equal - """ + """Returns true if both objects are equal""" if not isinstance(other, ModelReturn): return False return self.__dict__ == other.__dict__ def __ne__(self, other): - """ - Returns true if both objects are not equal - """ + """Returns true if both objects are not equal""" return not self == other diff --git a/samples/client/petstore-security-test/python/petstore_api/rest.py b/samples/client/petstore-security-test/python/petstore_api/rest.py index 8ccd6a6f5e5..1f21e828708 100644 --- a/samples/client/petstore-security-test/python/petstore_api/rest.py +++ b/samples/client/petstore-security-test/python/petstore_api/rest.py @@ -3,7 +3,7 @@ """ Swagger Petstore */ ' \" =end -- \\r\\n \\n \\r - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =end -- + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =end -- # noqa: E501 OpenAPI spec version: 1.0.0 */ ' \" =end -- \\r\\n \\n \\r Contact: apiteam@swagger.io */ ' \" =end -- \\r\\n \\n \\r @@ -15,13 +15,13 @@ from __future__ import absolute_import import io import json -import ssl -import certifi import logging import re +import ssl +import certifi # python 2 and python 3 compatibility library -from six import PY3 +import six from six.moves.urllib.parse import urlencode try: @@ -42,15 +42,11 @@ class RESTResponse(io.IOBase): self.data = resp.data def getheaders(self): - """ - Returns a dictionary of the response headers. - """ + """Returns a dictionary of the response headers.""" return self.urllib3_response.getheaders() def getheader(self, name, default=None): - """ - Returns a given response header. - """ + """Returns a given response header.""" return self.urllib3_response.getheader(name, default) @@ -58,10 +54,10 @@ class RESTClientObject(object): def __init__(self, configuration, pools_size=4, maxsize=None): # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 - # maxsize is the number of requests to host that are allowed in parallel - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 # cert_reqs if configuration.verify_ssl: @@ -78,7 +74,7 @@ class RESTClientObject(object): addition_pool_args = {} if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 if maxsize is None: if configuration.connection_pool_maxsize is not None: @@ -110,8 +106,10 @@ class RESTClientObject(object): ) def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, _request_timeout=None): - """ + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + :param method: http request method :param url: http request url :param query_params: query parameters in the url @@ -120,13 +118,17 @@ class RESTClientObject(object): :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without - reading/decoding response data. Default is True. - :param _request_timeout: timeout setting for this request. If one number provided, it will be total request - timeout. It can also be a pair (tuple) of (connection, read) timeouts. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. """ method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', 'PATCH', 'OPTIONS'] + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] if post_params and body: raise ValueError( @@ -138,10 +140,12 @@ class RESTClientObject(object): timeout = None if _request_timeout: - if isinstance(_request_timeout, (int, ) if PY3 else (int, long)): + if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 timeout = urllib3.Timeout(total=_request_timeout) - elif isinstance(_request_timeout, tuple) and len(_request_timeout) == 2: - timeout = urllib3.Timeout(connect=_request_timeout[0], read=_request_timeout[1]) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) if 'Content-Type' not in headers: headers['Content-Type'] = 'application/json' @@ -155,42 +159,48 @@ class RESTClientObject(object): request_body = None if body is not None: request_body = json.dumps(body) - r = self.pool_manager.request(method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': - r = self.pool_manager.request(method, url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct Content-Type - # which generated by urllib3 will be overwritten. + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. del headers['Content-Type'] - r = self.pool_manager.request(method, url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers) + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is provided - # in serialized form + # other content types than Json when `body` argument is + # provided in serialized form elif isinstance(body, str): request_body = body - r = self.pool_manager.request(method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) else: # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided arguments. - Please check that your arguments match declared content type.""" + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: @@ -208,7 +218,7 @@ class RESTClientObject(object): # In the python 3, the response.data is bytes. # we need to decode it to string. - if PY3: + if six.PY3: r.data = r.data.decode('utf8') # log response body @@ -219,22 +229,24 @@ class RESTClientObject(object): return r - def GET(self, url, headers=None, query_params=None, _preload_content=True, _request_timeout=None): + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): return self.request("GET", url, headers=headers, _preload_content=_preload_content, _request_timeout=_request_timeout, query_params=query_params) - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, _request_timeout=None): + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): return self.request("HEAD", url, headers=headers, _preload_content=_preload_content, _request_timeout=_request_timeout, query_params=query_params) - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, - _request_timeout=None): + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): return self.request("OPTIONS", url, headers=headers, query_params=query_params, @@ -243,7 +255,8 @@ class RESTClientObject(object): _request_timeout=_request_timeout, body=body) - def DELETE(self, url, headers=None, query_params=None, body=None, _preload_content=True, _request_timeout=None): + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): return self.request("DELETE", url, headers=headers, query_params=query_params, @@ -251,8 +264,8 @@ class RESTClientObject(object): _request_timeout=_request_timeout, body=body) - def POST(self, url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, - _request_timeout=None): + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): return self.request("POST", url, headers=headers, query_params=query_params, @@ -261,8 +274,8 @@ class RESTClientObject(object): _request_timeout=_request_timeout, body=body) - def PUT(self, url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, - _request_timeout=None): + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): return self.request("PUT", url, headers=headers, query_params=query_params, @@ -271,8 +284,8 @@ class RESTClientObject(object): _request_timeout=_request_timeout, body=body) - def PATCH(self, url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, - _request_timeout=None): + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): return self.request("PATCH", url, headers=headers, query_params=query_params, @@ -297,13 +310,12 @@ class ApiException(Exception): self.headers = None def __str__(self): - """ - Custom error messages for exception - """ + """Custom error messages for exception""" error_message = "({0})\n"\ "Reason: {1}\n".format(self.status, self.reason) if self.headers: - error_message += "HTTP response headers: {0}\n".format(self.headers) + error_message += "HTTP response headers: {0}\n".format( + self.headers) if self.body: error_message += "HTTP response body: {0}\n".format(self.body) diff --git a/samples/client/petstore-security-test/python/setup.py b/samples/client/petstore-security-test/python/setup.py index d752ddcc05a..50ee7728519 100644 --- a/samples/client/petstore-security-test/python/setup.py +++ b/samples/client/petstore-security-test/python/setup.py @@ -3,7 +3,7 @@ """ Swagger Petstore */ ' \" =end -- \\r\\n \\n \\r - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =end -- + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =end -- # noqa: E501 OpenAPI spec version: 1.0.0 */ ' \" =end -- \\r\\n \\n \\r Contact: apiteam@swagger.io */ ' \" =end -- \\r\\n \\n \\r @@ -11,8 +11,7 @@ """ -import sys -from setuptools import setup, find_packages +from setuptools import setup, find_packages # noqa: H301 NAME = "petstore-api" VERSION = "1.0.0" @@ -36,6 +35,6 @@ setup( packages=find_packages(), include_package_data=True, long_description="""\ - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =end -- + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =end -- # noqa: E501 """ ) diff --git a/samples/client/petstore-security-test/typescript-node/api.ts b/samples/client/petstore-security-test/typescript-node/api.ts index dbc8f6e5c4b..71c599e01c7 100644 --- a/samples/client/petstore-security-test/typescript-node/api.ts +++ b/samples/client/petstore-security-test/typescript-node/api.ts @@ -10,7 +10,7 @@ * Do not edit the class manually. */ -import request = require('request'); +import localVarRequest = require('request'); import http = require('http'); import Promise = require('bluebird'); @@ -171,13 +171,13 @@ export interface Authentication { /** * Apply authentication settings to header and query params. */ - applyToRequest(requestOptions: request.Options): void; + applyToRequest(requestOptions: localVarRequest.Options): void; } export class HttpBasicAuth implements Authentication { public username: string; public password: string; - applyToRequest(requestOptions: request.Options): void { + applyToRequest(requestOptions: localVarRequest.Options): void { requestOptions.auth = { username: this.username, password: this.password } @@ -190,7 +190,7 @@ export class ApiKeyAuth implements Authentication { constructor(private location: string, private paramName: string) { } - applyToRequest(requestOptions: request.Options): void { + applyToRequest(requestOptions: localVarRequest.Options): void { if (this.location == "query") { (requestOptions.qs)[this.paramName] = this.apiKey; } else if (this.location == "header" && requestOptions && requestOptions.headers) { @@ -202,7 +202,7 @@ export class ApiKeyAuth implements Authentication { export class OAuth implements Authentication { public accessToken: string; - applyToRequest(requestOptions: request.Options): void { + applyToRequest(requestOptions: localVarRequest.Options): void { if (requestOptions && requestOptions.headers) { requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; } @@ -212,7 +212,7 @@ export class OAuth implements Authentication { export class VoidAuth implements Authentication { public username: string; public password: string; - applyToRequest(_: request.Options): void { + applyToRequest(_: localVarRequest.Options): void { // Do nothing } } @@ -275,41 +275,41 @@ export class FakeApi { */ public testCodeInjectEndRnNR (test code inject * ' " =end rn n r?: string) : Promise<{ response: http.ClientResponse; body?: any; }> { const localVarPath = this.basePath + '/fake'; - let queryParameters: any = {}; - let headerParams: any = (Object).assign({}, this.defaultHeaders); - let formParams: any = {}; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarFormParams: any = {}; - let useFormData = false; + let localVarUseFormData = false; if (test code inject * ' " =end rn n r !== undefined) { - formParams['test code inject */ ' " =end -- \r\n \n \r'] = ObjectSerializer.serialize(test code inject * ' " =end rn n r, "string"); + localVarFormParams['test code inject */ ' " =end -- \r\n \n \r'] = ObjectSerializer.serialize(test code inject * ' " =end rn n r, "string"); } - let requestOptions: request.Options = { + let localVarRequestOptions: localVarRequest.Options = { method: 'PUT', - qs: queryParameters, - headers: headerParams, + qs: localVarQueryParameters, + headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; - this.authentications.default.applyToRequest(requestOptions); + this.authentications.default.applyToRequest(localVarRequestOptions); - if (Object.keys(formParams).length) { - if (useFormData) { - (requestOptions).formData = formParams; + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; } else { - requestOptions.form = formParams; + localVarRequestOptions.form = localVarFormParams; } } return new Promise<{ response: http.ClientResponse; body?: any; }>((resolve, reject) => { - request(requestOptions, (error, response, body) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); diff --git a/samples/client/petstore/erlang-client/src/swagger.app.src b/samples/client/petstore/erlang-client/src/swagger.app.src index 6547fbd34e8..7f4d814ca3e 100644 --- a/samples/client/petstore/erlang-client/src/swagger.app.src +++ b/samples/client/petstore/erlang-client/src/swagger.app.src @@ -12,6 +12,6 @@ {modules, []}, {maintainers, []}, - {licenses, ["Apache 2.0"]}, + {licenses, ["Apache-2.0"]}, {links, []} ]}. diff --git a/samples/client/petstore/java/google-api-client/docs/FakeApi.md b/samples/client/petstore/java/google-api-client/docs/FakeApi.md index 88bb107629e..737ccc28293 100644 --- a/samples/client/petstore/java/google-api-client/docs/FakeApi.md +++ b/samples/client/petstore/java/google-api-client/docs/FakeApi.md @@ -268,7 +268,7 @@ FakeApi apiInstance = new FakeApi(); BigDecimal number = new BigDecimal(); // BigDecimal | None Double _double = 3.4D; // Double | None String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None -byte[] _byte = _byte_example; // byte[] | None +byte[] _byte = B; // byte[] | None Integer integer = 56; // Integer | None Integer int32 = 56; // Integer | None Long int64 = 789L; // Long | None diff --git a/samples/client/petstore/java/google-api-client/git_push.sh b/samples/client/petstore/java/google-api-client/git_push.sh index ed374619b13..ae01b182ae9 100644 --- a/samples/client/petstore/java/google-api-client/git_push.sh +++ b/samples/client/petstore/java/google-api-client/git_push.sh @@ -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://github.com/${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 diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/ApiClient.java index bef5c082b6b..b3649398a69 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/ApiClient.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/ApiClient.java @@ -4,8 +4,8 @@ import io.swagger.client.api.*; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; - import com.fasterxml.jackson.datatype.threetenbp.ThreeTenModule; - import org.threeten.bp.*; +import com.fasterxml.jackson.datatype.threetenbp.ThreeTenModule; +import org.threeten.bp.*; import com.google.api.client.googleapis.util.Utils; import com.google.api.client.http.AbstractHttpContent; import com.google.api.client.http.HttpRequestFactory; @@ -16,9 +16,6 @@ import com.google.api.client.json.Json; import java.io.IOException; import java.io.OutputStream; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - public class ApiClient { private final String basePath; diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/AnotherFakeApi.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/AnotherFakeApi.java index d22b285c2d9..25bfbda3881 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/AnotherFakeApi.java @@ -68,37 +68,30 @@ public class AnotherFakeApi { } public HttpResponse testSpecialTagsForHttpResponse(Client body) throws IOException { - Object postBody = body; - // verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling testSpecialTags"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/another-fake/dummy"); String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PATCH, genericUrl, content).execute(); } public HttpResponse testSpecialTagsForHttpResponse(Client body, Map params) throws IOException { - Object postBody = body; - // verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling testSpecialTags"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/another-fake/dummy"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -111,11 +104,10 @@ public class AnotherFakeApi { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PATCH, genericUrl, content).execute(); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/FakeApi.java index 6daa67575ee..b30196bafb2 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/FakeApi.java @@ -58,7 +58,6 @@ public class FakeApi { /** * Test serialization of outer boolean types *

200 - Output boolean - * @param body Input boolean as post body * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. * @return Boolean * @throws IOException if an error occurs while attempting to invoke the API @@ -70,27 +69,24 @@ public class FakeApi { } public HttpResponse fakeOuterBooleanSerializeForHttpResponse(Boolean body) throws IOException { - Object postBody = body; UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/outer/boolean"); String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } public HttpResponse fakeOuterBooleanSerializeForHttpResponse(Boolean body, Map params) throws IOException { - Object postBody = body; UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/outer/boolean"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -103,11 +99,10 @@ public class FakeApi { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } @@ -128,7 +123,6 @@ public class FakeApi { /** * Test serialization of object with outer number type *

200 - Output composite - * @param body Input composite as post body * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. * @return OuterComposite * @throws IOException if an error occurs while attempting to invoke the API @@ -140,27 +134,24 @@ public class FakeApi { } public HttpResponse fakeOuterCompositeSerializeForHttpResponse(OuterComposite body) throws IOException { - Object postBody = body; UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/outer/composite"); String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } public HttpResponse fakeOuterCompositeSerializeForHttpResponse(OuterComposite body, Map params) throws IOException { - Object postBody = body; UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/outer/composite"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -173,11 +164,10 @@ public class FakeApi { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } @@ -198,7 +188,6 @@ public class FakeApi { /** * Test serialization of outer number types *

200 - Output number - * @param body Input number as post body * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. * @return BigDecimal * @throws IOException if an error occurs while attempting to invoke the API @@ -210,27 +199,24 @@ public class FakeApi { } public HttpResponse fakeOuterNumberSerializeForHttpResponse(BigDecimal body) throws IOException { - Object postBody = body; UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/outer/number"); String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } public HttpResponse fakeOuterNumberSerializeForHttpResponse(BigDecimal body, Map params) throws IOException { - Object postBody = body; UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/outer/number"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -243,11 +229,10 @@ public class FakeApi { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } @@ -268,7 +253,6 @@ public class FakeApi { /** * Test serialization of outer string types *

200 - Output string - * @param body Input string as post body * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. * @return String * @throws IOException if an error occurs while attempting to invoke the API @@ -280,27 +264,24 @@ public class FakeApi { } public HttpResponse fakeOuterStringSerializeForHttpResponse(String body) throws IOException { - Object postBody = body; UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/outer/string"); String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } public HttpResponse fakeOuterStringSerializeForHttpResponse(String body, Map params) throws IOException { - Object postBody = body; UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/outer/string"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -313,11 +294,10 @@ public class FakeApi { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } @@ -352,37 +332,30 @@ public class FakeApi { } public HttpResponse testClientModelForHttpResponse(Client body) throws IOException { - Object postBody = body; - // verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling testClientModel"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake"); String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PATCH, genericUrl, content).execute(); } public HttpResponse testClientModelForHttpResponse(Client body, Map params) throws IOException { - Object postBody = body; - // verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling testClientModel"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -395,11 +368,10 @@ public class FakeApi { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PATCH, genericUrl, content).execute(); } @@ -446,67 +418,48 @@ public class FakeApi { } public HttpResponse testEndpointParametersForHttpResponse(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws IOException { - Object postBody = null; - // verify the required parameter 'number' is set if (number == null) { throw new IllegalArgumentException("Missing the required parameter 'number' when calling testEndpointParameters"); - } - - // verify the required parameter '_double' is set + }// verify the required parameter '_double' is set if (_double == null) { throw new IllegalArgumentException("Missing the required parameter '_double' when calling testEndpointParameters"); - } - - // verify the required parameter 'patternWithoutDelimiter' is set + }// verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) { throw new IllegalArgumentException("Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters"); - } - - // verify the required parameter '_byte' is set + }// verify the required parameter '_byte' is set if (_byte == null) { throw new IllegalArgumentException("Missing the required parameter '_byte' when calling testEndpointParameters"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake"); String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } public HttpResponse testEndpointParametersForHttpResponse(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Map params) throws IOException { - Object postBody = null; - // verify the required parameter 'number' is set if (number == null) { throw new IllegalArgumentException("Missing the required parameter 'number' when calling testEndpointParameters"); - } - - // verify the required parameter '_double' is set + }// verify the required parameter '_double' is set if (_double == null) { throw new IllegalArgumentException("Missing the required parameter '_double' when calling testEndpointParameters"); - } - - // verify the required parameter 'patternWithoutDelimiter' is set + }// verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) { throw new IllegalArgumentException("Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters"); - } - - // verify the required parameter '_byte' is set + }// verify the required parameter '_byte' is set if (_byte == null) { throw new IllegalArgumentException("Missing the required parameter '_byte' when calling testEndpointParameters"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -519,11 +472,10 @@ public class FakeApi { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } @@ -560,34 +512,31 @@ public class FakeApi { } public HttpResponse testEnumParametersForHttpResponse(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble) throws IOException { - Object postBody = null; UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake"); if (enumQueryStringArray != null) { uriBuilder = uriBuilder.queryParam("enum_query_string_array", enumQueryStringArray); - }if (enumQueryString != null) { + } if (enumQueryString != null) { uriBuilder = uriBuilder.queryParam("enum_query_string", enumQueryString); - }if (enumQueryInteger != null) { + } if (enumQueryInteger != null) { uriBuilder = uriBuilder.queryParam("enum_query_integer", enumQueryInteger); } String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); } public HttpResponse testEnumParametersForHttpResponse(Map params) throws IOException { - Object postBody = null; UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -600,11 +549,10 @@ public class FakeApi { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); } @@ -633,37 +581,30 @@ public class FakeApi { } public HttpResponse testInlineAdditionalPropertiesForHttpResponse(Object param) throws IOException { - Object postBody = param; - // verify the required parameter 'param' is set if (param == null) { throw new IllegalArgumentException("Missing the required parameter 'param' when calling testInlineAdditionalProperties"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/inline-additionalProperties"); String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = param == null ? null : apiClient.new JacksonJsonHttpContent(param); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } public HttpResponse testInlineAdditionalPropertiesForHttpResponse(Object param, Map params) throws IOException { - Object postBody = param; - // verify the required parameter 'param' is set if (param == null) { throw new IllegalArgumentException("Missing the required parameter 'param' when calling testInlineAdditionalProperties"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/inline-additionalProperties"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -676,11 +617,10 @@ public class FakeApi { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = param == null ? null : apiClient.new JacksonJsonHttpContent(param); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } @@ -711,47 +651,36 @@ public class FakeApi { } public HttpResponse testJsonFormDataForHttpResponse(String param, String param2) throws IOException { - Object postBody = null; - // verify the required parameter 'param' is set if (param == null) { throw new IllegalArgumentException("Missing the required parameter 'param' when calling testJsonFormData"); - } - - // verify the required parameter 'param2' is set + }// verify the required parameter 'param2' is set if (param2 == null) { throw new IllegalArgumentException("Missing the required parameter 'param2' when calling testJsonFormData"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/jsonFormData"); String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); } public HttpResponse testJsonFormDataForHttpResponse(String param, String param2, Map params) throws IOException { - Object postBody = null; - // verify the required parameter 'param' is set if (param == null) { throw new IllegalArgumentException("Missing the required parameter 'param' when calling testJsonFormData"); - } - - // verify the required parameter 'param2' is set + }// verify the required parameter 'param2' is set if (param2 == null) { throw new IllegalArgumentException("Missing the required parameter 'param2' when calling testJsonFormData"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/jsonFormData"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -764,11 +693,10 @@ public class FakeApi { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index 30de3e3f702..382b570aadc 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -66,37 +66,30 @@ public class FakeClassnameTags123Api { } public HttpResponse testClassnameForHttpResponse(Client body) throws IOException { - Object postBody = body; - // verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling testClassname"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake_classname_test"); String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PATCH, genericUrl, content).execute(); } public HttpResponse testClassnameForHttpResponse(Client body, Map params) throws IOException { - Object postBody = body; - // verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling testClassname"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake_classname_test"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -109,11 +102,10 @@ public class FakeClassnameTags123Api { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PATCH, genericUrl, content).execute(); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/PetApi.java index a6e1d7120bb..a76ed462c21 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/PetApi.java @@ -64,37 +64,30 @@ public class PetApi { } public HttpResponse addPetForHttpResponse(Pet body) throws IOException { - Object postBody = body; - // verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling addPet"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet"); String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } public HttpResponse addPetForHttpResponse(Pet body, Map params) throws IOException { - Object postBody = body; - // verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling addPet"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -107,11 +100,10 @@ public class PetApi { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } @@ -141,13 +133,10 @@ public class PetApi { } public HttpResponse deletePetForHttpResponse(Long petId, String apiKey) throws IOException { - Object postBody = null; - // verify the required parameter 'petId' is set if (petId == null) { throw new IllegalArgumentException("Missing the required parameter 'petId' when calling deletePet"); } - // create a map of path variables final Map uriVariables = new HashMap(); uriVariables.put("petId", petId); @@ -156,28 +145,24 @@ public class PetApi { String url = uriBuilder.buildFromMap(uriVariables).toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.DELETE, genericUrl, content).execute(); } public HttpResponse deletePetForHttpResponse(Long petId, Map params) throws IOException { - Object postBody = null; - // verify the required parameter 'petId' is set if (petId == null) { throw new IllegalArgumentException("Missing the required parameter 'petId' when calling deletePet"); } - // create a map of path variables final Map uriVariables = new HashMap(); uriVariables.put("petId", petId); UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet/{petId}"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -190,11 +175,10 @@ public class PetApi { } } - String url = uriBuilder.buildFromMap(uriVariables).toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.DELETE, genericUrl, content).execute(); } @@ -231,13 +215,10 @@ public class PetApi { } public HttpResponse findPetsByStatusForHttpResponse(List status) throws IOException { - Object postBody = null; - // verify the required parameter 'status' is set if (status == null) { throw new IllegalArgumentException("Missing the required parameter 'status' when calling findPetsByStatus"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet/findByStatus"); if (status != null) { uriBuilder = uriBuilder.queryParam("status", status); @@ -246,28 +227,23 @@ public class PetApi { String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); } public HttpResponse findPetsByStatusForHttpResponse(List status, Map params) throws IOException { - Object postBody = null; - // verify the required parameter 'status' is set if (status == null) { throw new IllegalArgumentException("Missing the required parameter 'status' when calling findPetsByStatus"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet/findByStatus"); - if (params == null) { - params = new HashMap(); - } - + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); // Add the required query param 'status' to the map of query params - params.put("status", status); + allParams.put("status", status); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -280,11 +256,10 @@ public class PetApi { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); } @@ -321,13 +296,10 @@ public class PetApi { } public HttpResponse findPetsByTagsForHttpResponse(List tags) throws IOException { - Object postBody = null; - // verify the required parameter 'tags' is set if (tags == null) { throw new IllegalArgumentException("Missing the required parameter 'tags' when calling findPetsByTags"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet/findByTags"); if (tags != null) { uriBuilder = uriBuilder.queryParam("tags", tags); @@ -336,28 +308,23 @@ public class PetApi { String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); } public HttpResponse findPetsByTagsForHttpResponse(List tags, Map params) throws IOException { - Object postBody = null; - // verify the required parameter 'tags' is set if (tags == null) { throw new IllegalArgumentException("Missing the required parameter 'tags' when calling findPetsByTags"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet/findByTags"); - if (params == null) { - params = new HashMap(); - } - + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); // Add the required query param 'tags' to the map of query params - params.put("tags", tags); + allParams.put("tags", tags); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -370,11 +337,10 @@ public class PetApi { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); } @@ -413,13 +379,10 @@ public class PetApi { } public HttpResponse getPetByIdForHttpResponse(Long petId) throws IOException { - Object postBody = null; - // verify the required parameter 'petId' is set if (petId == null) { throw new IllegalArgumentException("Missing the required parameter 'petId' when calling getPetById"); } - // create a map of path variables final Map uriVariables = new HashMap(); uriVariables.put("petId", petId); @@ -428,28 +391,24 @@ public class PetApi { String url = uriBuilder.buildFromMap(uriVariables).toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); } public HttpResponse getPetByIdForHttpResponse(Long petId, Map params) throws IOException { - Object postBody = null; - // verify the required parameter 'petId' is set if (petId == null) { throw new IllegalArgumentException("Missing the required parameter 'petId' when calling getPetById"); } - // create a map of path variables final Map uriVariables = new HashMap(); uriVariables.put("petId", petId); UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet/{petId}"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -462,11 +421,10 @@ public class PetApi { } } - String url = uriBuilder.buildFromMap(uriVariables).toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); } @@ -499,37 +457,30 @@ public class PetApi { } public HttpResponse updatePetForHttpResponse(Pet body) throws IOException { - Object postBody = body; - // verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling updatePet"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet"); String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PUT, genericUrl, content).execute(); } public HttpResponse updatePetForHttpResponse(Pet body, Map params) throws IOException { - Object postBody = body; - // verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling updatePet"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -542,11 +493,10 @@ public class PetApi { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PUT, genericUrl, content).execute(); } @@ -577,13 +527,10 @@ public class PetApi { } public HttpResponse updatePetWithFormForHttpResponse(Long petId, String name, String status) throws IOException { - Object postBody = null; - // verify the required parameter 'petId' is set if (petId == null) { throw new IllegalArgumentException("Missing the required parameter 'petId' when calling updatePetWithForm"); } - // create a map of path variables final Map uriVariables = new HashMap(); uriVariables.put("petId", petId); @@ -592,28 +539,24 @@ public class PetApi { String url = uriBuilder.buildFromMap(uriVariables).toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } public HttpResponse updatePetWithFormForHttpResponse(Long petId, Map params) throws IOException { - Object postBody = null; - // verify the required parameter 'petId' is set if (petId == null) { throw new IllegalArgumentException("Missing the required parameter 'petId' when calling updatePetWithForm"); } - // create a map of path variables final Map uriVariables = new HashMap(); uriVariables.put("petId", petId); UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet/{petId}"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -626,11 +569,10 @@ public class PetApi { } } - String url = uriBuilder.buildFromMap(uriVariables).toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } @@ -667,13 +609,10 @@ public class PetApi { } public HttpResponse uploadFileForHttpResponse(Long petId, String additionalMetadata, File file) throws IOException { - Object postBody = null; - // verify the required parameter 'petId' is set if (petId == null) { throw new IllegalArgumentException("Missing the required parameter 'petId' when calling uploadFile"); } - // create a map of path variables final Map uriVariables = new HashMap(); uriVariables.put("petId", petId); @@ -682,28 +621,24 @@ public class PetApi { String url = uriBuilder.buildFromMap(uriVariables).toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } public HttpResponse uploadFileForHttpResponse(Long petId, Map params) throws IOException { - Object postBody = null; - // verify the required parameter 'petId' is set if (petId == null) { throw new IllegalArgumentException("Missing the required parameter 'petId' when calling uploadFile"); } - // create a map of path variables final Map uriVariables = new HashMap(); uriVariables.put("petId", petId); UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet/{petId}/uploadImage"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -716,11 +651,10 @@ public class PetApi { } } - String url = uriBuilder.buildFromMap(uriVariables).toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/StoreApi.java index 9f104855514..a60a5837d90 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/StoreApi.java @@ -64,13 +64,10 @@ public class StoreApi { } public HttpResponse deleteOrderForHttpResponse(String orderId) throws IOException { - Object postBody = null; - // verify the required parameter 'orderId' is set if (orderId == null) { throw new IllegalArgumentException("Missing the required parameter 'orderId' when calling deleteOrder"); } - // create a map of path variables final Map uriVariables = new HashMap(); uriVariables.put("order_id", orderId); @@ -79,28 +76,24 @@ public class StoreApi { String url = uriBuilder.buildFromMap(uriVariables).toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.DELETE, genericUrl, content).execute(); } public HttpResponse deleteOrderForHttpResponse(String orderId, Map params) throws IOException { - Object postBody = null; - // verify the required parameter 'orderId' is set if (orderId == null) { throw new IllegalArgumentException("Missing the required parameter 'orderId' when calling deleteOrder"); } - // create a map of path variables final Map uriVariables = new HashMap(); uriVariables.put("order_id", orderId); UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/store/order/{order_id}"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -113,11 +106,10 @@ public class StoreApi { } } - String url = uriBuilder.buildFromMap(uriVariables).toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.DELETE, genericUrl, content).execute(); } @@ -150,27 +142,24 @@ public class StoreApi { } public HttpResponse getInventoryForHttpResponse() throws IOException { - Object postBody = null; UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/store/inventory"); String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); } public HttpResponse getInventoryForHttpResponse(Map params) throws IOException { - Object postBody = null; UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/store/inventory"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -183,11 +172,10 @@ public class StoreApi { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); } @@ -226,13 +214,10 @@ public class StoreApi { } public HttpResponse getOrderByIdForHttpResponse(Long orderId) throws IOException { - Object postBody = null; - // verify the required parameter 'orderId' is set if (orderId == null) { throw new IllegalArgumentException("Missing the required parameter 'orderId' when calling getOrderById"); } - // create a map of path variables final Map uriVariables = new HashMap(); uriVariables.put("order_id", orderId); @@ -241,28 +226,24 @@ public class StoreApi { String url = uriBuilder.buildFromMap(uriVariables).toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); } public HttpResponse getOrderByIdForHttpResponse(Long orderId, Map params) throws IOException { - Object postBody = null; - // verify the required parameter 'orderId' is set if (orderId == null) { throw new IllegalArgumentException("Missing the required parameter 'orderId' when calling getOrderById"); } - // create a map of path variables final Map uriVariables = new HashMap(); uriVariables.put("order_id", orderId); UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/store/order/{order_id}"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -275,11 +256,10 @@ public class StoreApi { } } - String url = uriBuilder.buildFromMap(uriVariables).toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); } @@ -316,37 +296,30 @@ public class StoreApi { } public HttpResponse placeOrderForHttpResponse(Order body) throws IOException { - Object postBody = body; - // verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling placeOrder"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/store/order"); String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } public HttpResponse placeOrderForHttpResponse(Order body, Map params) throws IOException { - Object postBody = body; - // verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling placeOrder"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/store/order"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -359,11 +332,10 @@ public class StoreApi { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/UserApi.java index 259af327076..898e085fa14 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/api/UserApi.java @@ -62,37 +62,30 @@ public class UserApi { } public HttpResponse createUserForHttpResponse(User body) throws IOException { - Object postBody = body; - // verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling createUser"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user"); String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } public HttpResponse createUserForHttpResponse(User body, Map params) throws IOException { - Object postBody = body; - // verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling createUser"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -105,11 +98,10 @@ public class UserApi { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } @@ -138,37 +130,30 @@ public class UserApi { } public HttpResponse createUsersWithArrayInputForHttpResponse(List body) throws IOException { - Object postBody = body; - // verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling createUsersWithArrayInput"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user/createWithArray"); String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } public HttpResponse createUsersWithArrayInputForHttpResponse(List body, Map params) throws IOException { - Object postBody = body; - // verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling createUsersWithArrayInput"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user/createWithArray"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -181,11 +166,10 @@ public class UserApi { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } @@ -214,37 +198,30 @@ public class UserApi { } public HttpResponse createUsersWithListInputForHttpResponse(List body) throws IOException { - Object postBody = body; - // verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling createUsersWithListInput"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user/createWithList"); String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } public HttpResponse createUsersWithListInputForHttpResponse(List body, Map params) throws IOException { - Object postBody = body; - // verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling createUsersWithListInput"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user/createWithList"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -257,11 +234,10 @@ public class UserApi { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute(); } @@ -292,13 +268,10 @@ public class UserApi { } public HttpResponse deleteUserForHttpResponse(String username) throws IOException { - Object postBody = null; - // verify the required parameter 'username' is set if (username == null) { throw new IllegalArgumentException("Missing the required parameter 'username' when calling deleteUser"); } - // create a map of path variables final Map uriVariables = new HashMap(); uriVariables.put("username", username); @@ -307,28 +280,24 @@ public class UserApi { String url = uriBuilder.buildFromMap(uriVariables).toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.DELETE, genericUrl, content).execute(); } public HttpResponse deleteUserForHttpResponse(String username, Map params) throws IOException { - Object postBody = null; - // verify the required parameter 'username' is set if (username == null) { throw new IllegalArgumentException("Missing the required parameter 'username' when calling deleteUser"); } - // create a map of path variables final Map uriVariables = new HashMap(); uriVariables.put("username", username); UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user/{username}"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -341,11 +310,10 @@ public class UserApi { } } - String url = uriBuilder.buildFromMap(uriVariables).toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.DELETE, genericUrl, content).execute(); } @@ -384,13 +352,10 @@ public class UserApi { } public HttpResponse getUserByNameForHttpResponse(String username) throws IOException { - Object postBody = null; - // verify the required parameter 'username' is set if (username == null) { throw new IllegalArgumentException("Missing the required parameter 'username' when calling getUserByName"); } - // create a map of path variables final Map uriVariables = new HashMap(); uriVariables.put("username", username); @@ -399,28 +364,24 @@ public class UserApi { String url = uriBuilder.buildFromMap(uriVariables).toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); } public HttpResponse getUserByNameForHttpResponse(String username, Map params) throws IOException { - Object postBody = null; - // verify the required parameter 'username' is set if (username == null) { throw new IllegalArgumentException("Missing the required parameter 'username' when calling getUserByName"); } - // create a map of path variables final Map uriVariables = new HashMap(); uriVariables.put("username", username); UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user/{username}"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -433,11 +394,10 @@ public class UserApi { } } - String url = uriBuilder.buildFromMap(uriVariables).toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); } @@ -476,58 +436,45 @@ public class UserApi { } public HttpResponse loginUserForHttpResponse(String username, String password) throws IOException { - Object postBody = null; - // verify the required parameter 'username' is set if (username == null) { throw new IllegalArgumentException("Missing the required parameter 'username' when calling loginUser"); - } - - // verify the required parameter 'password' is set + }// verify the required parameter 'password' is set if (password == null) { throw new IllegalArgumentException("Missing the required parameter 'password' when calling loginUser"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user/login"); if (username != null) { uriBuilder = uriBuilder.queryParam("username", username); - }if (password != null) { + } if (password != null) { uriBuilder = uriBuilder.queryParam("password", password); } String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); } public HttpResponse loginUserForHttpResponse(String username, String password, Map params) throws IOException { - Object postBody = null; - // verify the required parameter 'username' is set if (username == null) { throw new IllegalArgumentException("Missing the required parameter 'username' when calling loginUser"); - } - - // verify the required parameter 'password' is set + }// verify the required parameter 'password' is set if (password == null) { throw new IllegalArgumentException("Missing the required parameter 'password' when calling loginUser"); } - UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user/login"); - if (params == null) { - params = new HashMap(); - } - + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); // Add the required query param 'username' to the map of query params - params.put("username", username); - + allParams.put("username", username); // Add the required query param 'password' to the map of query params - params.put("password", password); + allParams.put("password", password); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -540,11 +487,10 @@ public class UserApi { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); } @@ -571,27 +517,24 @@ public class UserApi { } public HttpResponse logoutUserForHttpResponse() throws IOException { - Object postBody = null; UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user/logout"); String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); } public HttpResponse logoutUserForHttpResponse(Map params) throws IOException { - Object postBody = null; UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user/logout"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -604,11 +547,10 @@ public class UserApi { } } - String url = uriBuilder.build().toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = null; return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.GET, genericUrl, content).execute(); } @@ -641,18 +583,13 @@ public class UserApi { } public HttpResponse updateUserForHttpResponse(String username, User body) throws IOException { - Object postBody = body; - // verify the required parameter 'username' is set if (username == null) { throw new IllegalArgumentException("Missing the required parameter 'username' when calling updateUser"); - } - - // verify the required parameter 'body' is set + }// verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling updateUser"); } - // create a map of path variables final Map uriVariables = new HashMap(); uriVariables.put("username", username); @@ -661,33 +598,27 @@ public class UserApi { String url = uriBuilder.buildFromMap(uriVariables).toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PUT, genericUrl, content).execute(); } public HttpResponse updateUserForHttpResponse(String username, User body, Map params) throws IOException { - Object postBody = body; - // verify the required parameter 'username' is set if (username == null) { throw new IllegalArgumentException("Missing the required parameter 'username' when calling updateUser"); - } - - // verify the required parameter 'body' is set + }// verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling updateUser"); } - // create a map of path variables final Map uriVariables = new HashMap(); uriVariables.put("username", username); UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/user/{username}"); - if (params == null) { - params = new HashMap(); - } + // Copy the params argument if present, to allow passing in immutable maps + Map allParams = params == null ? new HashMap() : new HashMap(params); - for (Map.Entry entry: params.entrySet()) { + for (Map.Entry entry: allParams.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); @@ -700,11 +631,10 @@ public class UserApi { } } - String url = uriBuilder.buildFromMap(uriVariables).toString(); GenericUrl genericUrl = new GenericUrl(url); - HttpContent content = postBody == null ? null : apiClient.new JacksonJsonHttpContent(postBody); + HttpContent content = body == null ? null : apiClient.new JacksonJsonHttpContent(body); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PUT, genericUrl, content).execute(); } diff --git a/samples/client/petstore/php/SwaggerClient-php/README.md b/samples/client/petstore/php/SwaggerClient-php/README.md index 087c3105f8d..112c5b8ab08 100644 --- a/samples/client/petstore/php/SwaggerClient-php/README.md +++ b/samples/client/petstore/php/SwaggerClient-php/README.md @@ -56,11 +56,15 @@ Please follow the [installation procedure](#installation--usage) and then run th testSpecialTags($body); + $result = $apiInstance->testSpecialTags($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AnotherFakeApi->testSpecialTags: ', $e->getMessage(), PHP_EOL; diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Api/AnotherFakeApi.md b/samples/client/petstore/php/SwaggerClient-php/docs/Api/AnotherFakeApi.md index 5b443618999..9eaff87384b 100644 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Api/AnotherFakeApi.md +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Api/AnotherFakeApi.md @@ -19,11 +19,15 @@ To test special tags testSpecialTags($body); + $result = $apiInstance->testSpecialTags($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AnotherFakeApi->testSpecialTags: ', $e->getMessage(), PHP_EOL; diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Api/FakeApi.md b/samples/client/petstore/php/SwaggerClient-php/docs/Api/FakeApi.md index 845ab2f8a02..da5558c386f 100644 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Api/FakeApi.md +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Api/FakeApi.md @@ -27,11 +27,15 @@ Test serialization of outer boolean types fakeOuterBooleanSerialize($body); + $result = $apiInstance->fakeOuterBooleanSerialize($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling FakeApi->fakeOuterBooleanSerialize: ', $e->getMessage(), PHP_EOL; @@ -72,11 +76,15 @@ Test serialization of object with outer number type fakeOuterCompositeSerialize($body); + $result = $apiInstance->fakeOuterCompositeSerialize($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling FakeApi->fakeOuterCompositeSerialize: ', $e->getMessage(), PHP_EOL; @@ -117,11 +125,15 @@ Test serialization of outer number types fakeOuterNumberSerialize($body); + $result = $apiInstance->fakeOuterNumberSerialize($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling FakeApi->fakeOuterNumberSerialize: ', $e->getMessage(), PHP_EOL; @@ -162,11 +174,15 @@ Test serialization of outer string types fakeOuterStringSerialize($body); + $result = $apiInstance->fakeOuterStringSerialize($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling FakeApi->fakeOuterStringSerialize: ', $e->getMessage(), PHP_EOL; @@ -207,11 +223,15 @@ To test \"client\" model testClientModel($body); + $result = $apiInstance->testClientModel($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling FakeApi->testClientModel: ', $e->getMessage(), PHP_EOL; @@ -253,14 +273,21 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: http_basic_test -Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); -Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); +$config = Swagger\Client\Configuration::getDefaultConfiguration() + ->setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); -$api_instance = new Swagger\Client\Api\FakeApi(new \Http\Adapter\Guzzle6\Client()); -$number = 3.4; // float | None + +$apiInstance = new Swagger\Client\Api\FakeApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$number = 8.14; // float | None $double = 1.2; // double | None $pattern_without_delimiter = "pattern_without_delimiter_example"; // string | None -$byte = "byte_example"; // string | None +$byte = "B"; // string | None $integer = 56; // int | None $int32 = 56; // int | None $int64 = 789; // int | None @@ -273,7 +300,7 @@ $password = "password_example"; // string | None $callback = "callback_example"; // string | None try { - $api_instance->testEndpointParameters($number, $double, $pattern_without_delimiter, $byte, $integer, $int32, $int64, $float, $string, $binary, $date, $date_time, $password, $callback); + $apiInstance->testEndpointParameters($number, $double, $pattern_without_delimiter, $byte, $integer, $int32, $int64, $float, $string, $binary, $date, $date_time, $password, $callback); } catch (Exception $e) { echo 'Exception when calling FakeApi->testEndpointParameters: ', $e->getMessage(), PHP_EOL; } @@ -326,7 +353,11 @@ To test enum parameters testEnumParameters($enum_form_string_array, $enum_form_string, $enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double); + $apiInstance->testEnumParameters($enum_form_string_array, $enum_form_string, $enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double); } catch (Exception $e) { echo 'Exception when calling FakeApi->testEnumParameters: ', $e->getMessage(), PHP_EOL; } @@ -384,11 +415,15 @@ test inline additionalProperties testInlineAdditionalProperties($param); + $apiInstance->testInlineAdditionalProperties($param); } catch (Exception $e) { echo 'Exception when calling FakeApi->testInlineAdditionalProperties: ', $e->getMessage(), PHP_EOL; } @@ -428,12 +463,16 @@ test json serialization of form data testJsonFormData($param, $param2); + $apiInstance->testJsonFormData($param, $param2); } catch (Exception $e) { echo 'Exception when calling FakeApi->testJsonFormData: ', $e->getMessage(), PHP_EOL; } diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Api/FakeClassnameTags123Api.md b/samples/client/petstore/php/SwaggerClient-php/docs/Api/FakeClassnameTags123Api.md index 8f826708f0c..af8699f0961 100644 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Api/FakeClassnameTags123Api.md +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Api/FakeClassnameTags123Api.md @@ -18,15 +18,20 @@ To test class name in snake case require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: api_key_query -Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key_query', 'YOUR_API_KEY'); +$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key_query', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key_query', 'Bearer'); +// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key_query', 'Bearer'); -$api_instance = new Swagger\Client\Api\FakeClassnameTags123Api(new \Http\Adapter\Guzzle6\Client()); +$apiInstance = new Swagger\Client\Api\FakeClassnameTags123Api( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); $body = new \Swagger\Client\Model\Client(); // \Swagger\Client\Model\Client | client model try { - $result = $api_instance->testClassname($body); + $result = $apiInstance->testClassname($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling FakeClassnameTags123Api->testClassname: ', $e->getMessage(), PHP_EOL; diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Api/PetApi.md b/samples/client/petstore/php/SwaggerClient-php/docs/Api/PetApi.md index 2c5edb0414e..46e42007fac 100644 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Api/PetApi.md +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Api/PetApi.md @@ -27,13 +27,18 @@ Add a new pet to the store require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: petstore_auth -Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$api_instance = new Swagger\Client\Api\PetApi(new \Http\Adapter\Guzzle6\Client()); +$apiInstance = new Swagger\Client\Api\PetApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); $body = new \Swagger\Client\Model\Pet(); // \Swagger\Client\Model\Pet | Pet object that needs to be added to the store try { - $api_instance->addPet($body); + $apiInstance->addPet($body); } catch (Exception $e) { echo 'Exception when calling PetApi->addPet: ', $e->getMessage(), PHP_EOL; } @@ -74,14 +79,19 @@ Deletes a pet require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: petstore_auth -Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$api_instance = new Swagger\Client\Api\PetApi(new \Http\Adapter\Guzzle6\Client()); +$apiInstance = new Swagger\Client\Api\PetApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); $pet_id = 789; // int | Pet id to delete $api_key = "api_key_example"; // string | try { - $api_instance->deletePet($pet_id, $api_key); + $apiInstance->deletePet($pet_id, $api_key); } catch (Exception $e) { echo 'Exception when calling PetApi->deletePet: ', $e->getMessage(), PHP_EOL; } @@ -123,13 +133,18 @@ Multiple status values can be provided with comma separated strings require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: petstore_auth -Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$api_instance = new Swagger\Client\Api\PetApi(new \Http\Adapter\Guzzle6\Client()); +$apiInstance = new Swagger\Client\Api\PetApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); $status = array("status_example"); // string[] | Status values that need to be considered for filter try { - $result = $api_instance->findPetsByStatus($status); + $result = $apiInstance->findPetsByStatus($status); print_r($result); } catch (Exception $e) { echo 'Exception when calling PetApi->findPetsByStatus: ', $e->getMessage(), PHP_EOL; @@ -171,13 +186,18 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: petstore_auth -Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$api_instance = new Swagger\Client\Api\PetApi(new \Http\Adapter\Guzzle6\Client()); +$apiInstance = new Swagger\Client\Api\PetApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); $tags = array("tags_example"); // string[] | Tags to filter by try { - $result = $api_instance->findPetsByTags($tags); + $result = $apiInstance->findPetsByTags($tags); print_r($result); } catch (Exception $e) { echo 'Exception when calling PetApi->findPetsByTags: ', $e->getMessage(), PHP_EOL; @@ -219,15 +239,20 @@ Returns a single pet require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: api_key -Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); +$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); +// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); -$api_instance = new Swagger\Client\Api\PetApi(new \Http\Adapter\Guzzle6\Client()); +$apiInstance = new Swagger\Client\Api\PetApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); $pet_id = 789; // int | ID of pet to return try { - $result = $api_instance->getPetById($pet_id); + $result = $apiInstance->getPetById($pet_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling PetApi->getPetById: ', $e->getMessage(), PHP_EOL; @@ -269,13 +294,18 @@ Update an existing pet require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: petstore_auth -Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$api_instance = new Swagger\Client\Api\PetApi(new \Http\Adapter\Guzzle6\Client()); +$apiInstance = new Swagger\Client\Api\PetApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); $body = new \Swagger\Client\Model\Pet(); // \Swagger\Client\Model\Pet | Pet object that needs to be added to the store try { - $api_instance->updatePet($body); + $apiInstance->updatePet($body); } catch (Exception $e) { echo 'Exception when calling PetApi->updatePet: ', $e->getMessage(), PHP_EOL; } @@ -316,15 +346,20 @@ Updates a pet in the store with form data require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: petstore_auth -Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$api_instance = new Swagger\Client\Api\PetApi(new \Http\Adapter\Guzzle6\Client()); +$apiInstance = new Swagger\Client\Api\PetApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); $pet_id = 789; // int | ID of pet that needs to be updated $name = "name_example"; // string | Updated name of the pet $status = "status_example"; // string | Updated status of the pet try { - $api_instance->updatePetWithForm($pet_id, $name, $status); + $apiInstance->updatePetWithForm($pet_id, $name, $status); } catch (Exception $e) { echo 'Exception when calling PetApi->updatePetWithForm: ', $e->getMessage(), PHP_EOL; } @@ -367,15 +402,20 @@ uploads an image require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: petstore_auth -Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$api_instance = new Swagger\Client\Api\PetApi(new \Http\Adapter\Guzzle6\Client()); +$apiInstance = new Swagger\Client\Api\PetApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); $pet_id = 789; // int | ID of pet to update $additional_metadata = "additional_metadata_example"; // string | Additional data to pass to server $file = "/path/to/file.txt"; // \SplFileObject | file to upload try { - $result = $api_instance->uploadFile($pet_id, $additional_metadata, $file); + $result = $apiInstance->uploadFile($pet_id, $additional_metadata, $file); print_r($result); } catch (Exception $e) { echo 'Exception when calling PetApi->uploadFile: ', $e->getMessage(), PHP_EOL; diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Api/StoreApi.md b/samples/client/petstore/php/SwaggerClient-php/docs/Api/StoreApi.md index 9daa65eba7b..87cec61aa7b 100644 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Api/StoreApi.md +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Api/StoreApi.md @@ -22,11 +22,15 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non deleteOrder($order_id); + $apiInstance->deleteOrder($order_id); } catch (Exception $e) { echo 'Exception when calling StoreApi->deleteOrder: ', $e->getMessage(), PHP_EOL; } @@ -67,14 +71,19 @@ Returns a map of status codes to quantities require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: api_key -Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); +$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); +// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer'); -$api_instance = new Swagger\Client\Api\StoreApi(new \Http\Adapter\Guzzle6\Client()); +$apiInstance = new Swagger\Client\Api\StoreApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); try { - $result = $api_instance->getInventory(); + $result = $apiInstance->getInventory(); print_r($result); } catch (Exception $e) { echo 'Exception when calling StoreApi->getInventory: ', $e->getMessage(), PHP_EOL; @@ -112,11 +121,15 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge getOrderById($order_id); + $result = $apiInstance->getOrderById($order_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling StoreApi->getOrderById: ', $e->getMessage(), PHP_EOL; @@ -157,11 +170,15 @@ Place an order for a pet placeOrder($body); + $result = $apiInstance->placeOrder($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling StoreApi->placeOrder: ', $e->getMessage(), PHP_EOL; diff --git a/samples/client/petstore/php/SwaggerClient-php/docs/Api/UserApi.md b/samples/client/petstore/php/SwaggerClient-php/docs/Api/UserApi.md index a1b3fdf3089..52b0a351904 100644 --- a/samples/client/petstore/php/SwaggerClient-php/docs/Api/UserApi.md +++ b/samples/client/petstore/php/SwaggerClient-php/docs/Api/UserApi.md @@ -26,11 +26,15 @@ This can only be done by the logged in user. createUser($body); + $apiInstance->createUser($body); } catch (Exception $e) { echo 'Exception when calling UserApi->createUser: ', $e->getMessage(), PHP_EOL; } @@ -70,11 +74,15 @@ Creates list of users with given input array createUsersWithArrayInput($body); + $apiInstance->createUsersWithArrayInput($body); } catch (Exception $e) { echo 'Exception when calling UserApi->createUsersWithArrayInput: ', $e->getMessage(), PHP_EOL; } @@ -114,11 +122,15 @@ Creates list of users with given input array createUsersWithListInput($body); + $apiInstance->createUsersWithListInput($body); } catch (Exception $e) { echo 'Exception when calling UserApi->createUsersWithListInput: ', $e->getMessage(), PHP_EOL; } @@ -158,11 +170,15 @@ This can only be done by the logged in user. deleteUser($username); + $apiInstance->deleteUser($username); } catch (Exception $e) { echo 'Exception when calling UserApi->deleteUser: ', $e->getMessage(), PHP_EOL; } @@ -202,11 +218,15 @@ Get user by user name getUserByName($username); + $result = $apiInstance->getUserByName($username); print_r($result); } catch (Exception $e) { echo 'Exception when calling UserApi->getUserByName: ', $e->getMessage(), PHP_EOL; @@ -247,12 +267,16 @@ Logs user into the system loginUser($username, $password); + $result = $apiInstance->loginUser($username, $password); print_r($result); } catch (Exception $e) { echo 'Exception when calling UserApi->loginUser: ', $e->getMessage(), PHP_EOL; @@ -294,10 +318,14 @@ Logs out current logged in user session logoutUser(); + $apiInstance->logoutUser(); } catch (Exception $e) { echo 'Exception when calling UserApi->logoutUser: ', $e->getMessage(), PHP_EOL; } @@ -334,12 +362,16 @@ This can only be done by the logged in user. updateUser($username, $body); + $apiInstance->updateUser($username, $body); } catch (Exception $e) { echo 'Exception when calling UserApi->updateUser: ', $e->getMessage(), PHP_EOL; } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/AnotherFakeApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/AnotherFakeApi.php index a56487fc062..0e50667dc0c 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/AnotherFakeApi.php @@ -122,7 +122,8 @@ class AnotherFakeApi 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() ); } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php index 4df01fca503..b712667cbf3 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php @@ -118,7 +118,8 @@ class FakeApi 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() ); } @@ -364,7 +365,8 @@ class FakeApi 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() ); } @@ -610,7 +612,8 @@ class FakeApi 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() ); } @@ -856,7 +859,8 @@ class FakeApi 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() ); } @@ -1106,7 +1110,8 @@ class FakeApi 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() ); } @@ -1387,7 +1392,8 @@ class FakeApi 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() ); } @@ -1781,7 +1787,8 @@ class FakeApi 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() ); } @@ -2050,7 +2057,8 @@ class FakeApi 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() ); } @@ -2271,7 +2279,8 @@ class FakeApi 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() ); } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeClassnameTags123Api.php index 62105818963..2ef04d3951f 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeClassnameTags123Api.php @@ -122,7 +122,8 @@ class FakeClassnameTags123Api 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() ); } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php index 80f41fdf971..4c7f7845d04 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php @@ -121,7 +121,8 @@ class PetApi 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() ); } @@ -346,7 +347,8 @@ class PetApi 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() ); } @@ -582,7 +584,8 @@ class PetApi 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() ); } @@ -846,7 +849,8 @@ class PetApi 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() ); } @@ -1110,7 +1114,8 @@ class PetApi 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() ); } @@ -1375,7 +1380,8 @@ class PetApi 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() ); } @@ -1602,7 +1608,8 @@ class PetApi 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() ); } @@ -1849,7 +1856,8 @@ class PetApi 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() ); } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php index 175f939a7e6..5026eecfd74 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php @@ -121,7 +121,8 @@ class StoreApi 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() ); } @@ -344,7 +345,8 @@ class StoreApi 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() ); } @@ -593,7 +595,8 @@ class StoreApi 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() ); } @@ -861,7 +864,8 @@ class StoreApi 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() ); } diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php index 523da183ae6..b9d0a3e3f28 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php @@ -121,7 +121,8 @@ class UserApi 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() ); } @@ -340,7 +341,8 @@ class UserApi 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() ); } @@ -559,7 +561,8 @@ class UserApi 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() ); } @@ -778,7 +781,8 @@ class UserApi 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() ); } @@ -1003,7 +1007,8 @@ class UserApi 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() ); } @@ -1266,7 +1271,8 @@ class UserApi 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() ); } @@ -1533,7 +1539,8 @@ class UserApi 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() ); } @@ -1742,7 +1749,8 @@ class UserApi 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() ); } diff --git a/samples/client/petstore/python-asyncio/petstore_api/api_client.py b/samples/client/petstore/python-asyncio/petstore_api/api_client.py index c0222901b5c..6029e8fa113 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api_client.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api_client.py @@ -525,7 +525,7 @@ class ApiClient(object): content_disposition).group(1) path = os.path.join(os.path.dirname(path), filename) - with open(path, "w") as f: + with open(path, "wb") as f: f.write(response.data) return path diff --git a/samples/client/petstore/python-tornado/Makefile b/samples/client/petstore/python-tornado/Makefile new file mode 100644 index 00000000000..ba5c5e73c63 --- /dev/null +++ b/samples/client/petstore/python-tornado/Makefile @@ -0,0 +1,21 @@ + #!/bin/bash + +REQUIREMENTS_FILE=dev-requirements.txt +REQUIREMENTS_OUT=dev-requirements.txt.log +SETUP_OUT=*.egg-info +VENV=.venv + +clean: + rm -rf $(REQUIREMENTS_OUT) + rm -rf $(SETUP_OUT) + rm -rf $(VENV) + rm -rf .tox + rm -rf .coverage + find . -name "*.py[oc]" -delete + find . -name "__pycache__" -delete + +test: clean + bash ./test_python2.sh + +test-all: clean + bash ./test_python2_and_3.sh diff --git a/samples/client/petstore/python-tornado/dev-requirements.txt b/samples/client/petstore/python-tornado/dev-requirements.txt new file mode 100644 index 00000000000..f50c13b5c50 --- /dev/null +++ b/samples/client/petstore/python-tornado/dev-requirements.txt @@ -0,0 +1,5 @@ +nose +tox +coverage +randomize +flake8 diff --git a/samples/client/petstore/python-tornado/petstore_api/api_client.py b/samples/client/petstore/python-tornado/petstore_api/api_client.py index 94ab009c4ed..222812fdb73 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api_client.py +++ b/samples/client/petstore/python-tornado/petstore_api/api_client.py @@ -156,6 +156,20 @@ class ApiClient(object): self.last_response = response_data + return_data = response_data + if _preload_content: + # deserialize response data + if response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + raise tornado.gen.Return(return_data) + else: + raise tornado.gen.Return((return_data, response_data.status, + response_data.getheaders())) + def sanitize_for_serialization(self, obj): """Builds a JSON POST object. @@ -513,7 +527,7 @@ class ApiClient(object): content_disposition).group(1) path = os.path.join(os.path.dirname(path), filename) - with open(path, "w") as f: + with open(path, "wb") as f: f.write(response.data) return path diff --git a/samples/client/petstore/python-tornado/petstore_api/rest.py b/samples/client/petstore/python-tornado/petstore_api/rest.py index dc68ca3d60d..2186454a352 100644 --- a/samples/client/petstore/python-tornado/petstore_api/rest.py +++ b/samples/client/petstore/python-tornado/petstore_api/rest.py @@ -19,6 +19,7 @@ import ssl import certifi # python 2 and python 3 compatibility library +import six from six.moves.urllib.parse import urlencode import tornado import tornado.gen @@ -59,7 +60,7 @@ class RESTClientObject(object): # if not set certificate file, use Mozilla's root certificates. ca_certs = certifi.where() - self.ssl_context = ssl.SSLContext() + self.ssl_context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) self.ssl_context.load_verify_locations(cafile=ca_certs) if configuration.cert_file: self.ssl_context.load_cert_chain( @@ -130,7 +131,8 @@ class RESTClientObject(object): elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 request.body = urlencode(post_params) elif headers['Content-Type'] == 'multipart/form-data': - request.body = encode_multipart_formdata(post_params) + multipart = encode_multipart_formdata(post_params) + request.body, headers['Content-Type'] = multipart # Pass a `bytes` parameter directly in the body to support # other content types than Json when `body` argument is provided # in serialized form @@ -143,15 +145,24 @@ class RESTClientObject(object): declared content type.""" raise ApiException(status=0, reason=msg) - r = yield self.pool_manager.fetch(request) - r = RESTResponse(r, r.body) + r = yield self.pool_manager.fetch(request, raise_error=False) - # log response body - logger.debug("response body: %s", r.data) + if _preload_content: + + r = RESTResponse(r, r.body) + # In the python 3, the response.data is bytes. + # we need to decode it to string. + if six.PY3: + r.data = r.data.decode('utf8') + + # log response body + logger.debug("response body: %s", r.data) if not 200 <= r.status <= 299: raise ApiException(http_resp=r) + raise tornado.gen.Return(r) + @tornado.gen.coroutine def GET(self, url, headers=None, query_params=None, _preload_content=True, _request_timeout=None): diff --git a/samples/client/petstore/python-tornado/pom.xml b/samples/client/petstore/python-tornado/pom.xml new file mode 100644 index 00000000000..57ceaeaa8dc --- /dev/null +++ b/samples/client/petstore/python-tornado/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + io.swagger + PythonTornadoClientTests + pom + 1.0-SNAPSHOT + Python Tornado Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + nose-test + integration-test + + exec + + + make + + test-all + + + + + + + + diff --git a/samples/client/petstore/python-tornado/test_python2_and_3.sh b/samples/client/petstore/python-tornado/test_python2_and_3.sh new file mode 100755 index 00000000000..a224ffe75dc --- /dev/null +++ b/samples/client/petstore/python-tornado/test_python2_and_3.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +REQUIREMENTS_FILE=dev-requirements.txt +REQUIREMENTS_OUT=dev-requirements.txt.log +SETUP_OUT=*.egg-info +VENV=.venv +DEACTIVE=false + +export LC_ALL=en_US.UTF-8 +export LANG=en_US.UTF-8 + +### set virtualenv +if [ -z "$VIRTUAL_ENV" ]; then + virtualenv $VENV --no-site-packages --always-copy + source $VENV/bin/activate + DEACTIVE=true +fi + +### install dependencies +pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT +python setup.py develop + +### run tests +tox + +### static analysis of code +flake8 --show-source petstore_api/ + +### deactivate virtualenv +#if [ $DEACTIVE == true ]; then +# deactivate +#fi diff --git a/samples/client/petstore/python-tornado/testfiles/foo.png b/samples/client/petstore/python-tornado/testfiles/foo.png new file mode 100644 index 00000000000..a9b12cf5927 Binary files /dev/null and b/samples/client/petstore/python-tornado/testfiles/foo.png differ diff --git a/samples/client/petstore/python-tornado/tests/__init__.py b/samples/client/petstore/python-tornado/tests/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/samples/client/petstore/python-tornado/tests/test_pet_api.py b/samples/client/petstore/python-tornado/tests/test_pet_api.py new file mode 100644 index 00000000000..ad4ec29b2bc --- /dev/null +++ b/samples/client/petstore/python-tornado/tests/test_pet_api.py @@ -0,0 +1,221 @@ +# coding: utf-8 + +# flake8: noqa + +""" +Run the tests. +$ pip install nose (optional) +$ cd petstore_api-python +$ nosetests -v +""" + +import os +import unittest + +from tornado.testing import AsyncTestCase, gen_test +from tornado.ioloop import IOLoop + +import petstore_api +from petstore_api import Configuration +from petstore_api.rest import ApiException + +from .util import id_gen + +import json + +import urllib3 + +HOST = 'http://petstore.swagger.io/v2' + + +class PetApiTests(AsyncTestCase): + + def setUp(self): + AsyncTestCase.setUp(self) + config = Configuration() + config.host = HOST + self.api_client = petstore_api.ApiClient(config) + self.pet_api = petstore_api.PetApi(self.api_client) + self.setUpModels() + self.setUpFiles() + + def setUpModels(self): + self.category = petstore_api.Category() + self.category.id = id_gen() + self.category.name = "dog" + self.tag = petstore_api.Tag() + self.tag.id = id_gen() + self.tag.name = "swagger-codegen-python-pet-tag" + self.pet = petstore_api.Pet(name="hello kity", photo_urls=["http://foo.bar.com/1", "http://foo.bar.com/2"]) + self.pet.id = id_gen() + self.pet.status = "sold" + self.pet.category = self.category + self.pet.tags = [self.tag] + + def setUpFiles(self): + self.test_file_dir = os.path.join(os.path.dirname(__file__), "..", "testfiles") + self.test_file_dir = os.path.realpath(self.test_file_dir) + self.foo = os.path.join(self.test_file_dir, "foo.png") + + def get_new_ioloop(self): + return IOLoop.instance() + + @gen_test + def test_separate_default_client_instances(self): + pet_api = petstore_api.PetApi() + pet_api2 = petstore_api.PetApi() + self.assertNotEqual(pet_api.api_client, pet_api2.api_client) + + pet_api.api_client.user_agent = 'api client 3' + pet_api2.api_client.user_agent = 'api client 4' + + self.assertNotEqual(pet_api.api_client.user_agent, pet_api2.api_client.user_agent) + + @gen_test + def test_separate_default_config_instances(self): + pet_api = petstore_api.PetApi() + pet_api2 = petstore_api.PetApi() + self.assertNotEqual(pet_api.api_client.configuration, pet_api2.api_client.configuration) + + pet_api.api_client.configuration.host = 'somehost' + pet_api2.api_client.configuration.host = 'someotherhost' + self.assertNotEqual(pet_api.api_client.configuration.host, pet_api2.api_client.configuration.host) + + @gen_test + def test_async_request(self): + # It works but tornado is async by default and creating threadpool + # to do it looks crazy ;) + thread = self.pet_api.add_pet(body=self.pet, async=True) + response = yield thread.get() + self.assertIsNone(response) + + thread = self.pet_api.get_pet_by_id(self.pet.id, async=True) + result = yield thread.get() + self.assertIsInstance(result, petstore_api.Pet) + + @gen_test + def test_async_with_result(self): + yield self.pet_api.add_pet(body=self.pet) + + thread = self.pet_api.get_pet_by_id(self.pet.id, async=True) + thread2 = self.pet_api.get_pet_by_id(self.pet.id, async=True) + + response = yield thread.get() + response2 = yield thread2.get() + + self.assertEquals(response.id, self.pet.id) + self.assertIsNotNone(response2.id, self.pet.id) + + @gen_test + def test_tornado_async_with_result(self): + yield self.pet_api.add_pet(body=self.pet) + + query1 = self.pet_api.get_pet_by_id(self.pet.id) + query2 = self.pet_api.get_pet_by_id(self.pet.id) + + response1 = yield query1 + response2 = yield query2 + + self.assertEquals(response1.id, self.pet.id) + self.assertIsNotNone(response2.id, self.pet.id) + + @gen_test + def test_add_pet_and_get_pet_by_id(self): + yield self.pet_api.add_pet(body=self.pet) + + fetched = yield self.pet_api.get_pet_by_id(pet_id=self.pet.id) + self.assertIsNotNone(fetched) + self.assertEqual(self.pet.id, fetched.id) + self.assertIsNotNone(fetched.category) + self.assertEqual(self.pet.category.name, fetched.category.name) + + @gen_test + def test_add_pet_and_get_pet_by_id_with_http_info(self): + yield self.pet_api.add_pet(body=self.pet) + + fetched = yield self.pet_api.get_pet_by_id_with_http_info(pet_id=self.pet.id) + self.assertIsNotNone(fetched) + self.assertEqual(self.pet.id, fetched[0].id) + self.assertIsNotNone(fetched[0].category) + self.assertEqual(self.pet.category.name, fetched[0].category.name) + + @gen_test + def test_update_pet(self): + self.pet.name = "hello kity with updated" + yield self.pet_api.update_pet(body=self.pet) + + fetched = yield self.pet_api.get_pet_by_id(pet_id=self.pet.id) + self.assertIsNotNone(fetched) + self.assertEqual(self.pet.id, fetched.id) + self.assertEqual(self.pet.name, fetched.name) + self.assertIsNotNone(fetched.category) + self.assertEqual(fetched.category.name, self.pet.category.name) + + @gen_test + @unittest.skip('skipping the test as the method sometimes invalid Petstore object with incorrect status') + def test_find_pets_by_status(self): + yield self.pet_api.add_pet(body=self.pet) + pets = yield self.pet_api.find_pets_by_status(status=[self.pet.status]) + self.assertIn( + self.pet.id, + list(map(lambda x: getattr(x, 'id'), pets)) + ) + + @gen_test + @unittest.skip("skipping the test as the method sometimes invalid Petstore object with incorrect status") + def test_find_pets_by_tags(self): + yield self.pet_api.add_pet(body=self.pet) + pets = yield self.pet_api.find_pets_by_tags(tags=[self.tag.name]) + self.assertIn( + self.pet.id, + list(map(lambda x: getattr(x, 'id'), pets)) + ) + + @gen_test + def test_update_pet_with_form(self): + yield self.pet_api.add_pet(body=self.pet) + + name = "hello kity with form updated" + status = "pending" + yield self.pet_api.update_pet_with_form(pet_id=self.pet.id, name=name, status=status) + + fetched = yield self.pet_api.get_pet_by_id(pet_id=self.pet.id) + self.assertEqual(self.pet.id, fetched.id) + self.assertEqual(name, fetched.name) + self.assertEqual(status, fetched.status) + + @gen_test(timeout=10) + def test_upload_file(self): + # upload file with form parameter + try: + additional_metadata = "special" + yield self.pet_api.upload_file( + pet_id=self.pet.id, + additional_metadata=additional_metadata, + file=self.foo + ) + except ApiException as e: + self.fail("upload_file() raised {0} unexpectedly".format(type(e))) + + # upload only file + try: + yield self.pet_api.upload_file(pet_id=self.pet.id, file=self.foo) + except ApiException as e: + self.fail("upload_file() raised {0} unexpectedly".format(type(e))) + + @gen_test + def test_delete_pet(self): + yield self.pet_api.add_pet(body=self.pet) + yield self.pet_api.delete_pet(pet_id=self.pet.id, api_key="special-key") + + try: + yield self.pet_api.get_pet_by_id(pet_id=self.pet.id) + raise Exception("expected an error") + except ApiException as e: + self.assertEqual(404, e.status) + + +if __name__ == '__main__': + import logging + logging.basicConfig(level=logging.DEBUG) + unittest.main() diff --git a/samples/client/petstore/python-tornado/tests/util.py b/samples/client/petstore/python-tornado/tests/util.py new file mode 100644 index 00000000000..113d7dcc547 --- /dev/null +++ b/samples/client/petstore/python-tornado/tests/util.py @@ -0,0 +1,8 @@ +# flake8: noqa + +import random + + +def id_gen(bits=32): + """ Returns a n-bit randomly generated int """ + return int(random.getrandbits(bits)) diff --git a/samples/client/petstore/python/petstore_api/api_client.py b/samples/client/petstore/python/petstore_api/api_client.py index c507888bc3c..ec4e3cd5c42 100644 --- a/samples/client/petstore/python/petstore_api/api_client.py +++ b/samples/client/petstore/python/petstore_api/api_client.py @@ -525,7 +525,7 @@ class ApiClient(object): content_disposition).group(1) path = os.path.join(os.path.dirname(path), filename) - with open(path, "w") as f: + with open(path, "wb") as f: f.write(response.data) return path diff --git a/samples/client/petstore/qt5cpp/client/SWGApiResponse.cpp b/samples/client/petstore/qt5cpp/client/SWGApiResponse.cpp index 8beb7e8187b..8835d53325b 100644 --- a/samples/client/petstore/qt5cpp/client/SWGApiResponse.cpp +++ b/samples/client/petstore/qt5cpp/client/SWGApiResponse.cpp @@ -44,12 +44,10 @@ SWGApiResponse::init() { void SWGApiResponse::cleanup() { - if(type != nullptr) { delete type; } - if(message != nullptr) { delete message; } @@ -84,11 +82,8 @@ SWGApiResponse::asJson () QJsonObject* SWGApiResponse::asJsonObject() { QJsonObject* obj = new QJsonObject(); - obj->insert("code", QJsonValue(code)); - toJsonValue(QString("type"), type, obj, QString("QString")); - toJsonValue(QString("message"), message, obj, QString("QString")); return obj; diff --git a/samples/client/petstore/qt5cpp/client/SWGApiResponse.h b/samples/client/petstore/qt5cpp/client/SWGApiResponse.h index 745c1fd6565..864cf964353 100644 --- a/samples/client/petstore/qt5cpp/client/SWGApiResponse.h +++ b/samples/client/petstore/qt5cpp/client/SWGApiResponse.h @@ -26,7 +26,6 @@ #include "SWGObject.h" - namespace Swagger { class SWGApiResponse: public SWGObject { diff --git a/samples/client/petstore/qt5cpp/client/SWGCategory.cpp b/samples/client/petstore/qt5cpp/client/SWGCategory.cpp index 9e5c3ed75c3..916492f2f51 100644 --- a/samples/client/petstore/qt5cpp/client/SWGCategory.cpp +++ b/samples/client/petstore/qt5cpp/client/SWGCategory.cpp @@ -43,7 +43,6 @@ SWGCategory::init() { void SWGCategory::cleanup() { - if(name != nullptr) { delete name; @@ -78,9 +77,7 @@ SWGCategory::asJson () QJsonObject* SWGCategory::asJsonObject() { QJsonObject* obj = new QJsonObject(); - obj->insert("id", QJsonValue(id)); - toJsonValue(QString("name"), name, obj, QString("QString")); return obj; diff --git a/samples/client/petstore/qt5cpp/client/SWGCategory.h b/samples/client/petstore/qt5cpp/client/SWGCategory.h index 229669eff8c..6b9fcb34773 100644 --- a/samples/client/petstore/qt5cpp/client/SWGCategory.h +++ b/samples/client/petstore/qt5cpp/client/SWGCategory.h @@ -26,7 +26,6 @@ #include "SWGObject.h" - namespace Swagger { class SWGCategory: public SWGObject { diff --git a/samples/client/petstore/qt5cpp/client/SWGOrder.cpp b/samples/client/petstore/qt5cpp/client/SWGOrder.cpp index bf4f09d4647..8092e3cf428 100644 --- a/samples/client/petstore/qt5cpp/client/SWGOrder.cpp +++ b/samples/client/petstore/qt5cpp/client/SWGOrder.cpp @@ -47,14 +47,12 @@ SWGOrder::init() { void SWGOrder::cleanup() { - if(ship_date != nullptr) { delete ship_date; } - if(status != nullptr) { delete status; } @@ -93,17 +91,11 @@ SWGOrder::asJson () QJsonObject* SWGOrder::asJsonObject() { QJsonObject* obj = new QJsonObject(); - obj->insert("id", QJsonValue(id)); - obj->insert("petId", QJsonValue(pet_id)); - obj->insert("quantity", QJsonValue(quantity)); - toJsonValue(QString("shipDate"), ship_date, obj, QString("QDateTime")); - toJsonValue(QString("status"), status, obj, QString("QString")); - obj->insert("complete", QJsonValue(complete)); return obj; diff --git a/samples/client/petstore/qt5cpp/client/SWGOrder.h b/samples/client/petstore/qt5cpp/client/SWGOrder.h index 13f1b205f0b..ef061bffe2e 100644 --- a/samples/client/petstore/qt5cpp/client/SWGOrder.h +++ b/samples/client/petstore/qt5cpp/client/SWGOrder.h @@ -27,7 +27,6 @@ #include "SWGObject.h" - namespace Swagger { class SWGOrder: public SWGObject { diff --git a/samples/client/petstore/qt5cpp/client/SWGPet.cpp b/samples/client/petstore/qt5cpp/client/SWGPet.cpp index be6f08fbd4f..6c377a057b0 100644 --- a/samples/client/petstore/qt5cpp/client/SWGPet.cpp +++ b/samples/client/petstore/qt5cpp/client/SWGPet.cpp @@ -47,16 +47,13 @@ SWGPet::init() { void SWGPet::cleanup() { - if(category != nullptr) { delete category; } - if(name != nullptr) { delete name; } - if(photo_urls != nullptr) { QList* arr = photo_urls; foreach(QString* o, *arr) { @@ -64,7 +61,6 @@ SWGPet::cleanup() { } delete photo_urls; } - if(tags != nullptr) { QList* arr = tags; foreach(SWGTag* o, *arr) { @@ -72,7 +68,6 @@ SWGPet::cleanup() { } delete tags; } - if(status != nullptr) { delete status; } @@ -92,12 +87,8 @@ SWGPet::fromJsonObject(QJsonObject &pJson) { ::Swagger::setValue(&id, pJson["id"], "qint64", ""); ::Swagger::setValue(&category, pJson["category"], "SWGCategory", "SWGCategory"); ::Swagger::setValue(&name, pJson["name"], "QString", "QString"); - ::Swagger::setValue(&photo_urls, pJson["photoUrls"], "QList", "QString"); - - ::Swagger::setValue(&tags, pJson["tags"], "QList", "SWGTag"); - ::Swagger::setValue(&status, pJson["status"], "QString", "QString"); } @@ -114,21 +105,15 @@ SWGPet::asJson () QJsonObject* SWGPet::asJsonObject() { QJsonObject* obj = new QJsonObject(); - obj->insert("id", QJsonValue(id)); - toJsonValue(QString("category"), category, obj, QString("SWGCategory")); - toJsonValue(QString("name"), name, obj, QString("QString")); - QJsonArray photo_urlsJsonArray; toJsonArray((QList*)photo_urls, &photo_urlsJsonArray, "photo_urls", "QString"); obj->insert("photoUrls", photo_urlsJsonArray); - QJsonArray tagsJsonArray; toJsonArray((QList*)tags, &tagsJsonArray, "tags", "SWGTag"); obj->insert("tags", tagsJsonArray); - toJsonValue(QString("status"), status, obj, QString("QString")); return obj; diff --git a/samples/client/petstore/qt5cpp/client/SWGPet.h b/samples/client/petstore/qt5cpp/client/SWGPet.h index 55142740d96..a3b58bceaf6 100644 --- a/samples/client/petstore/qt5cpp/client/SWGPet.h +++ b/samples/client/petstore/qt5cpp/client/SWGPet.h @@ -29,7 +29,6 @@ #include "SWGObject.h" - namespace Swagger { class SWGPet: public SWGObject { diff --git a/samples/client/petstore/qt5cpp/client/SWGTag.cpp b/samples/client/petstore/qt5cpp/client/SWGTag.cpp index 7a622a68be1..febee3a6a76 100644 --- a/samples/client/petstore/qt5cpp/client/SWGTag.cpp +++ b/samples/client/petstore/qt5cpp/client/SWGTag.cpp @@ -43,7 +43,6 @@ SWGTag::init() { void SWGTag::cleanup() { - if(name != nullptr) { delete name; @@ -78,9 +77,7 @@ SWGTag::asJson () QJsonObject* SWGTag::asJsonObject() { QJsonObject* obj = new QJsonObject(); - obj->insert("id", QJsonValue(id)); - toJsonValue(QString("name"), name, obj, QString("QString")); return obj; diff --git a/samples/client/petstore/qt5cpp/client/SWGTag.h b/samples/client/petstore/qt5cpp/client/SWGTag.h index d192718670d..ee562bc8665 100644 --- a/samples/client/petstore/qt5cpp/client/SWGTag.h +++ b/samples/client/petstore/qt5cpp/client/SWGTag.h @@ -26,7 +26,6 @@ #include "SWGObject.h" - namespace Swagger { class SWGTag: public SWGObject { diff --git a/samples/client/petstore/qt5cpp/client/SWGUser.cpp b/samples/client/petstore/qt5cpp/client/SWGUser.cpp index 372ca77bf75..e915cd05a4a 100644 --- a/samples/client/petstore/qt5cpp/client/SWGUser.cpp +++ b/samples/client/petstore/qt5cpp/client/SWGUser.cpp @@ -49,28 +49,22 @@ SWGUser::init() { void SWGUser::cleanup() { - if(username != nullptr) { delete username; } - if(first_name != nullptr) { delete first_name; } - if(last_name != nullptr) { delete last_name; } - if(email != nullptr) { delete email; } - if(password != nullptr) { delete password; } - if(phone != nullptr) { delete phone; } @@ -111,21 +105,13 @@ SWGUser::asJson () QJsonObject* SWGUser::asJsonObject() { QJsonObject* obj = new QJsonObject(); - obj->insert("id", QJsonValue(id)); - toJsonValue(QString("username"), username, obj, QString("QString")); - toJsonValue(QString("firstName"), first_name, obj, QString("QString")); - toJsonValue(QString("lastName"), last_name, obj, QString("QString")); - toJsonValue(QString("email"), email, obj, QString("QString")); - toJsonValue(QString("password"), password, obj, QString("QString")); - toJsonValue(QString("phone"), phone, obj, QString("QString")); - obj->insert("userStatus", QJsonValue(user_status)); return obj; diff --git a/samples/client/petstore/qt5cpp/client/SWGUser.h b/samples/client/petstore/qt5cpp/client/SWGUser.h index 30a9ca5271b..bdd4e77a56a 100644 --- a/samples/client/petstore/qt5cpp/client/SWGUser.h +++ b/samples/client/petstore/qt5cpp/client/SWGUser.h @@ -26,7 +26,6 @@ #include "SWGObject.h" - namespace Swagger { class SWGUser: public SWGObject { diff --git a/samples/client/petstore/swift4/default/.swagger-codegen/VERSION b/samples/client/petstore/swift4/default/.swagger-codegen/VERSION index f9f7450d135..717311e32e3 100644 --- a/samples/client/petstore/swift4/default/.swagger-codegen/VERSION +++ b/samples/client/petstore/swift4/default/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +unset \ No newline at end of file diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/FakeClassnameTags123API.swift new file mode 100644 index 00000000000..228cee8ffbc --- /dev/null +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/APIs/FakeClassnameTags123API.swift @@ -0,0 +1,54 @@ +// +// FakeClassnameTags123API.swift +// +// Generated by swagger-codegen +// https://github.com/swagger-api/swagger-codegen +// + +import Foundation +import Alamofire + + + +open class FakeClassnameTags123API { + /** + To test class name in snake case + + - parameter body: (body) client model + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testClassname(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { + testClassnameWithRequestBuilder(body: body).execute { (response, error) -> Void in + completion(response?.body, error); + } + } + + + /** + To test class name in snake case + - PATCH /fake_classname_test + - API Key: + - type: apiKey api_key_query (QUERY) + - name: api_key_query + - examples: [{contentType=application/json, example={ + "client" : "client" +}}] + + - parameter body: (body) client model + + - returns: RequestBuilder + */ + open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/fake_classname_test" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = NSURLComponents(string: URLString) + + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/CodableHelper.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/CodableHelper.swift index d56cb0e7348..befa0594f6a 100644 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/CodableHelper.swift +++ b/samples/client/petstore/swift4/default/PetstoreClient/Classes/Swaggers/CodableHelper.swift @@ -11,14 +11,20 @@ public typealias EncodeResult = (data: Data?, error: Error?) open class CodableHelper { + open static var dateformatter: DateFormatter? + open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T : Decodable { var returnedDecodable: T? = nil var returnedError: Error? = nil let decoder = JSONDecoder() - decoder.dataDecodingStrategy = .base64 - if #available(iOS 10.0, *) { - decoder.dateDecodingStrategy = .iso8601 + if let df = self.dateformatter { + decoder.dateDecodingStrategy = .formatted(df) + } else { + decoder.dataDecodingStrategy = .base64 + if #available(iOS 10.0, *) { + decoder.dateDecodingStrategy = .iso8601 + } } do { diff --git a/samples/client/petstore/swift4/default/git_push.sh b/samples/client/petstore/swift4/default/git_push.sh index ed374619b13..ae01b182ae9 100644 --- a/samples/client/petstore/swift4/default/git_push.sh +++ b/samples/client/petstore/swift4/default/git_push.sh @@ -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://github.com/${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 diff --git a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/CodableHelper.swift b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/CodableHelper.swift index d56cb0e7348..befa0594f6a 100644 --- a/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/CodableHelper.swift +++ b/samples/client/petstore/swift4/promisekit/PetstoreClient/Classes/Swaggers/CodableHelper.swift @@ -11,14 +11,20 @@ public typealias EncodeResult = (data: Data?, error: Error?) open class CodableHelper { + open static var dateformatter: DateFormatter? + open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T : Decodable { var returnedDecodable: T? = nil var returnedError: Error? = nil let decoder = JSONDecoder() - decoder.dataDecodingStrategy = .base64 - if #available(iOS 10.0, *) { - decoder.dateDecodingStrategy = .iso8601 + if let df = self.dateformatter { + decoder.dateDecodingStrategy = .formatted(df) + } else { + decoder.dataDecodingStrategy = .base64 + if #available(iOS 10.0, *) { + decoder.dateDecodingStrategy = .iso8601 + } } do { diff --git a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/CodableHelper.swift b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/CodableHelper.swift index d56cb0e7348..befa0594f6a 100644 --- a/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/CodableHelper.swift +++ b/samples/client/petstore/swift4/rxswift/PetstoreClient/Classes/Swaggers/CodableHelper.swift @@ -11,14 +11,20 @@ public typealias EncodeResult = (data: Data?, error: Error?) open class CodableHelper { + open static var dateformatter: DateFormatter? + open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T : Decodable { var returnedDecodable: T? = nil var returnedError: Error? = nil let decoder = JSONDecoder() - decoder.dataDecodingStrategy = .base64 - if #available(iOS 10.0, *) { - decoder.dateDecodingStrategy = .iso8601 + if let df = self.dateformatter { + decoder.dateDecodingStrategy = .formatted(df) + } else { + decoder.dataDecodingStrategy = .base64 + if #available(iOS 10.0, *) { + decoder.dateDecodingStrategy = .iso8601 + } } do { diff --git a/samples/client/petstore/typescript-node/default/api.ts b/samples/client/petstore/typescript-node/default/api.ts index 6ee6f176454..ed2fce03d5c 100644 --- a/samples/client/petstore/typescript-node/default/api.ts +++ b/samples/client/petstore/typescript-node/default/api.ts @@ -566,7 +566,7 @@ export class PetApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -622,7 +622,7 @@ export class PetApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -680,7 +680,7 @@ export class PetApi { reject(error); } else { body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -738,7 +738,7 @@ export class PetApi { reject(error); } else { body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -793,7 +793,7 @@ export class PetApi { reject(error); } else { body = ObjectSerializer.deserialize(body, "Pet"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -847,7 +847,7 @@ export class PetApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -911,7 +911,7 @@ export class PetApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -977,7 +977,7 @@ export class PetApi { reject(error); } else { body = ObjectSerializer.deserialize(body, "ApiResponse"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1081,7 +1081,7 @@ export class StoreApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1129,7 +1129,7 @@ export class StoreApi { reject(error); } else { body = ObjectSerializer.deserialize(body, "{ [key: string]: number; }"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1182,7 +1182,7 @@ export class StoreApi { reject(error); } else { body = ObjectSerializer.deserialize(body, "Order"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1235,7 +1235,7 @@ export class StoreApi { reject(error); } else { body = ObjectSerializer.deserialize(body, "Order"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1339,7 +1339,7 @@ export class UserApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1391,7 +1391,7 @@ export class UserApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1443,7 +1443,7 @@ export class UserApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1495,7 +1495,7 @@ export class UserApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1548,7 +1548,7 @@ export class UserApi { reject(error); } else { body = ObjectSerializer.deserialize(body, "User"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1614,7 +1614,7 @@ export class UserApi { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1659,7 +1659,7 @@ export class UserApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1718,7 +1718,7 @@ export class UserApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); diff --git a/samples/client/petstore/typescript-node/npm/api.d.ts b/samples/client/petstore/typescript-node/npm/api.d.ts index 9c5d19062ec..bb0e4f5d2ea 100644 --- a/samples/client/petstore/typescript-node/npm/api.d.ts +++ b/samples/client/petstore/typescript-node/npm/api.d.ts @@ -1,6 +1,22 @@ -import request = require('request'); +import localVarRequest = require('request'); import http = require('http'); import Promise = require('bluebird'); +export declare class ApiResponse { + 'code': number; + 'type': string; + 'message': string; + static discriminator: any; + static attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + }[]; +} export declare class Category { 'id': number; 'name': string; @@ -105,34 +121,34 @@ export declare class User { }[]; } export interface Authentication { - applyToRequest(requestOptions: request.Options): void; + applyToRequest(requestOptions: localVarRequest.Options): void; } export declare class HttpBasicAuth implements Authentication { username: string; password: string; - applyToRequest(requestOptions: request.Options): void; + applyToRequest(requestOptions: localVarRequest.Options): void; } export declare class ApiKeyAuth implements Authentication { private location; private paramName; apiKey: string; constructor(location: string, paramName: string); - applyToRequest(requestOptions: request.Options): void; + applyToRequest(requestOptions: localVarRequest.Options): void; } export declare class OAuth implements Authentication { accessToken: string; - applyToRequest(requestOptions: request.Options): void; + applyToRequest(requestOptions: localVarRequest.Options): void; } export declare class VoidAuth implements Authentication { username: string; password: string; - applyToRequest(_: request.Options): void; + applyToRequest(_: localVarRequest.Options): void; } export declare enum PetApiApiKeys { api_key = 0, } export declare class PetApi { - protected basePath: string; + protected _basePath: string; protected defaultHeaders: any; protected _useQuerystring: boolean; protected authentications: { @@ -142,10 +158,11 @@ export declare class PetApi { }; constructor(basePath?: string); useQuerystring: boolean; + basePath: string; + setDefaultAuthentication(auth: Authentication): void; setApiKey(key: PetApiApiKeys, value: string): void; accessToken: string; - private extendObj(objA, objB); - addPet(body?: Pet): Promise<{ + addPet(body: Pet): Promise<{ response: http.ClientResponse; body?: any; }>; @@ -153,11 +170,11 @@ export declare class PetApi { response: http.ClientResponse; body?: any; }>; - findPetsByStatus(status?: Array): Promise<{ + findPetsByStatus(status: Array): Promise<{ response: http.ClientResponse; body: Array; }>; - findPetsByTags(tags?: Array): Promise<{ + findPetsByTags(tags: Array): Promise<{ response: http.ClientResponse; body: Array; }>; @@ -165,24 +182,24 @@ export declare class PetApi { response: http.ClientResponse; body: Pet; }>; - updatePet(body?: Pet): Promise<{ + updatePet(body: Pet): Promise<{ response: http.ClientResponse; body?: any; }>; - updatePetWithForm(petId: string, name?: string, status?: string): Promise<{ + updatePetWithForm(petId: number, name?: string, status?: string): Promise<{ response: http.ClientResponse; body?: any; }>; - uploadFile(petId: number, additionalMetadata?: string, file?: any): Promise<{ + uploadFile(petId: number, additionalMetadata?: string, file?: Buffer): Promise<{ response: http.ClientResponse; - body?: any; + body: ApiResponse; }>; } export declare enum StoreApiApiKeys { api_key = 0, } export declare class StoreApi { - protected basePath: string; + protected _basePath: string; protected defaultHeaders: any; protected _useQuerystring: boolean; protected authentications: { @@ -192,9 +209,10 @@ export declare class StoreApi { }; constructor(basePath?: string); useQuerystring: boolean; + basePath: string; + setDefaultAuthentication(auth: Authentication): void; setApiKey(key: StoreApiApiKeys, value: string): void; accessToken: string; - private extendObj(objA, objB); deleteOrder(orderId: string): Promise<{ response: http.ClientResponse; body?: any; @@ -205,11 +223,11 @@ export declare class StoreApi { [key: string]: number; }; }>; - getOrderById(orderId: string): Promise<{ + getOrderById(orderId: number): Promise<{ response: http.ClientResponse; body: Order; }>; - placeOrder(body?: Order): Promise<{ + placeOrder(body: Order): Promise<{ response: http.ClientResponse; body: Order; }>; @@ -218,7 +236,7 @@ export declare enum UserApiApiKeys { api_key = 0, } export declare class UserApi { - protected basePath: string; + protected _basePath: string; protected defaultHeaders: any; protected _useQuerystring: boolean; protected authentications: { @@ -228,18 +246,19 @@ export declare class UserApi { }; constructor(basePath?: string); useQuerystring: boolean; + basePath: string; + setDefaultAuthentication(auth: Authentication): void; setApiKey(key: UserApiApiKeys, value: string): void; accessToken: string; - private extendObj(objA, objB); - createUser(body?: User): Promise<{ + createUser(body: User): Promise<{ response: http.ClientResponse; body?: any; }>; - createUsersWithArrayInput(body?: Array): Promise<{ + createUsersWithArrayInput(body: Array): Promise<{ response: http.ClientResponse; body?: any; }>; - createUsersWithListInput(body?: Array): Promise<{ + createUsersWithListInput(body: Array): Promise<{ response: http.ClientResponse; body?: any; }>; @@ -251,7 +270,7 @@ export declare class UserApi { response: http.ClientResponse; body: User; }>; - loginUser(username?: string, password?: string): Promise<{ + loginUser(username: string, password: string): Promise<{ response: http.ClientResponse; body: string; }>; @@ -259,7 +278,7 @@ export declare class UserApi { response: http.ClientResponse; body?: any; }>; - updateUser(username: string, body?: User): Promise<{ + updateUser(username: string, body: User): Promise<{ response: http.ClientResponse; body?: any; }>; diff --git a/samples/client/petstore/typescript-node/npm/api.js b/samples/client/petstore/typescript-node/npm/api.js index ea27b029f2e..fd332714097 100644 --- a/samples/client/petstore/typescript-node/npm/api.js +++ b/samples/client/petstore/typescript-node/npm/api.js @@ -1,15 +1,17 @@ "use strict"; -var request = require('request'); +var localVarRequest = require('request'); var Promise = require('bluebird'); var defaultBasePath = 'http://petstore.swagger.io/v2'; -var primitives = ["string", +var primitives = [ + "string", "boolean", "double", "integer", "long", "float", "number", - "any"]; + "any" +]; var ObjectSerializer = (function () { function ObjectSerializer() { } @@ -119,6 +121,32 @@ var ObjectSerializer = (function () { }; return ObjectSerializer; }()); +var ApiResponse = (function () { + function ApiResponse() { + } + ApiResponse.getAttributeTypeMap = function () { + return ApiResponse.attributeTypeMap; + }; + ApiResponse.discriminator = undefined; + ApiResponse.attributeTypeMap = [ + { + "name": "code", + "baseName": "code", + "type": "number" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }]; + return ApiResponse; +}()); +exports.ApiResponse = ApiResponse; var Category = (function () { function Category() { } @@ -317,6 +345,7 @@ var enumsMap = { "Pet.StatusEnum": Pet.StatusEnum, }; var typeMap = { + "ApiResponse": ApiResponse, "Category": Category, "Order": Order, "Pet": Pet, @@ -375,7 +404,7 @@ exports.VoidAuth = VoidAuth; var PetApiApiKeys = exports.PetApiApiKeys; var PetApi = (function () { function PetApi(basePathOrUsername, password, basePath) { - this.basePath = defaultBasePath; + this._basePath = defaultBasePath; this.defaultHeaders = {}; this._useQuerystring = false; this.authentications = { @@ -401,6 +430,19 @@ var PetApi = (function () { enumerable: true, configurable: true }); + Object.defineProperty(PetApi.prototype, "basePath", { + get: function () { + return this._basePath; + }, + set: function (basePath) { + this._basePath = basePath; + }, + enumerable: true, + configurable: true + }); + PetApi.prototype.setDefaultAuthentication = function (auth) { + this.authentications.default = auth; + }; PetApi.prototype.setApiKey = function (key, value) { this.authentications[PetApiApiKeys[key]].apiKey = value; }; @@ -411,46 +453,41 @@ var PetApi = (function () { enumerable: true, configurable: true }); - PetApi.prototype.extendObj = function (objA, objB) { - for (var key in objB) { - if (objB.hasOwnProperty(key)) { - objA[key] = objB[key]; - } - } - return objA; - }; PetApi.prototype.addPet = function (body) { var localVarPath = this.basePath + '/pet'; - var queryParameters = {}; - var headerParams = this.extendObj({}, this.defaultHeaders); - var formParams = {}; - var useFormData = false; - var requestOptions = { + var localVarQueryParameters = {}; + var localVarHeaderParams = Object.assign({}, this.defaultHeaders); + var localVarFormParams = {}; + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling addPet.'); + } + var localVarUseFormData = false; + var localVarRequestOptions = { method: 'POST', - qs: queryParameters, - headers: headerParams, + qs: localVarQueryParameters, + headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "Pet") }; - this.authentications.petstore_auth.applyToRequest(requestOptions); - this.authentications.default.applyToRequest(requestOptions); - if (Object.keys(formParams).length) { - if (useFormData) { - requestOptions.formData = formParams; + this.authentications.petstore_auth.applyToRequest(localVarRequestOptions); + this.authentications.default.applyToRequest(localVarRequestOptions); + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; } else { - requestOptions.form = formParams; + localVarRequestOptions.form = localVarFormParams; } } return new Promise(function (resolve, reject) { - request(requestOptions, function (error, response, body) { + localVarRequest(localVarRequestOptions, function (error, response, body) { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -462,40 +499,40 @@ var PetApi = (function () { }; PetApi.prototype.deletePet = function (petId, apiKey) { var localVarPath = this.basePath + '/pet/{petId}' - .replace('{' + 'petId' + '}', String(petId)); - var queryParameters = {}; - var headerParams = this.extendObj({}, this.defaultHeaders); - var formParams = {}; + .replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); + var localVarQueryParameters = {}; + var localVarHeaderParams = Object.assign({}, this.defaultHeaders); + var localVarFormParams = {}; if (petId === null || petId === undefined) { throw new Error('Required parameter petId was null or undefined when calling deletePet.'); } - headerParams['api_key'] = ObjectSerializer.serialize(apiKey, "string"); - var useFormData = false; - var requestOptions = { + localVarHeaderParams['api_key'] = ObjectSerializer.serialize(apiKey, "string"); + var localVarUseFormData = false; + var localVarRequestOptions = { method: 'DELETE', - qs: queryParameters, - headers: headerParams, + qs: localVarQueryParameters, + headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; - this.authentications.petstore_auth.applyToRequest(requestOptions); - this.authentications.default.applyToRequest(requestOptions); - if (Object.keys(formParams).length) { - if (useFormData) { - requestOptions.formData = formParams; + this.authentications.petstore_auth.applyToRequest(localVarRequestOptions); + this.authentications.default.applyToRequest(localVarRequestOptions); + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; } else { - requestOptions.form = formParams; + localVarRequestOptions.form = localVarFormParams; } } return new Promise(function (resolve, reject) { - request(requestOptions, function (error, response, body) { + localVarRequest(localVarRequestOptions, function (error, response, body) { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -507,39 +544,42 @@ var PetApi = (function () { }; PetApi.prototype.findPetsByStatus = function (status) { var localVarPath = this.basePath + '/pet/findByStatus'; - var queryParameters = {}; - var headerParams = this.extendObj({}, this.defaultHeaders); - var formParams = {}; - if (status !== undefined) { - queryParameters['status'] = ObjectSerializer.serialize(status, "Array<string>"); + var localVarQueryParameters = {}; + var localVarHeaderParams = Object.assign({}, this.defaultHeaders); + var localVarFormParams = {}; + if (status === null || status === undefined) { + throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); } - var useFormData = false; - var requestOptions = { + if (status !== undefined) { + localVarQueryParameters['status'] = ObjectSerializer.serialize(status, "Array"); + } + var localVarUseFormData = false; + var localVarRequestOptions = { method: 'GET', - qs: queryParameters, - headers: headerParams, + qs: localVarQueryParameters, + headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; - this.authentications.petstore_auth.applyToRequest(requestOptions); - this.authentications.default.applyToRequest(requestOptions); - if (Object.keys(formParams).length) { - if (useFormData) { - requestOptions.formData = formParams; + this.authentications.petstore_auth.applyToRequest(localVarRequestOptions); + this.authentications.default.applyToRequest(localVarRequestOptions); + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; } else { - requestOptions.form = formParams; + localVarRequestOptions.form = localVarFormParams; } } return new Promise(function (resolve, reject) { - request(requestOptions, function (error, response, body) { + localVarRequest(localVarRequestOptions, function (error, response, body) { if (error) { reject(error); } else { - body = ObjectSerializer.deserialize(body, "Array<Pet>"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -551,39 +591,42 @@ var PetApi = (function () { }; PetApi.prototype.findPetsByTags = function (tags) { var localVarPath = this.basePath + '/pet/findByTags'; - var queryParameters = {}; - var headerParams = this.extendObj({}, this.defaultHeaders); - var formParams = {}; - if (tags !== undefined) { - queryParameters['tags'] = ObjectSerializer.serialize(tags, "Array<string>"); + var localVarQueryParameters = {}; + var localVarHeaderParams = Object.assign({}, this.defaultHeaders); + var localVarFormParams = {}; + if (tags === null || tags === undefined) { + throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); } - var useFormData = false; - var requestOptions = { + if (tags !== undefined) { + localVarQueryParameters['tags'] = ObjectSerializer.serialize(tags, "Array"); + } + var localVarUseFormData = false; + var localVarRequestOptions = { method: 'GET', - qs: queryParameters, - headers: headerParams, + qs: localVarQueryParameters, + headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; - this.authentications.petstore_auth.applyToRequest(requestOptions); - this.authentications.default.applyToRequest(requestOptions); - if (Object.keys(formParams).length) { - if (useFormData) { - requestOptions.formData = formParams; + this.authentications.petstore_auth.applyToRequest(localVarRequestOptions); + this.authentications.default.applyToRequest(localVarRequestOptions); + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; } else { - requestOptions.form = formParams; + localVarRequestOptions.form = localVarFormParams; } } return new Promise(function (resolve, reject) { - request(requestOptions, function (error, response, body) { + localVarRequest(localVarRequestOptions, function (error, response, body) { if (error) { reject(error); } else { - body = ObjectSerializer.deserialize(body, "Array<Pet>"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -595,41 +638,40 @@ var PetApi = (function () { }; PetApi.prototype.getPetById = function (petId) { var localVarPath = this.basePath + '/pet/{petId}' - .replace('{' + 'petId' + '}', String(petId)); - var queryParameters = {}; - var headerParams = this.extendObj({}, this.defaultHeaders); - var formParams = {}; + .replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); + var localVarQueryParameters = {}; + var localVarHeaderParams = Object.assign({}, this.defaultHeaders); + var localVarFormParams = {}; if (petId === null || petId === undefined) { throw new Error('Required parameter petId was null or undefined when calling getPetById.'); } - var useFormData = false; - var requestOptions = { + var localVarUseFormData = false; + var localVarRequestOptions = { method: 'GET', - qs: queryParameters, - headers: headerParams, + qs: localVarQueryParameters, + headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; - this.authentications.petstore_auth.applyToRequest(requestOptions); - this.authentications.api_key.applyToRequest(requestOptions); - this.authentications.default.applyToRequest(requestOptions); - if (Object.keys(formParams).length) { - if (useFormData) { - requestOptions.formData = formParams; + this.authentications.api_key.applyToRequest(localVarRequestOptions); + this.authentications.default.applyToRequest(localVarRequestOptions); + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; } else { - requestOptions.form = formParams; + localVarRequestOptions.form = localVarFormParams; } } return new Promise(function (resolve, reject) { - request(requestOptions, function (error, response, body) { + localVarRequest(localVarRequestOptions, function (error, response, body) { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "Pet"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -641,36 +683,39 @@ var PetApi = (function () { }; PetApi.prototype.updatePet = function (body) { var localVarPath = this.basePath + '/pet'; - var queryParameters = {}; - var headerParams = this.extendObj({}, this.defaultHeaders); - var formParams = {}; - var useFormData = false; - var requestOptions = { + var localVarQueryParameters = {}; + var localVarHeaderParams = Object.assign({}, this.defaultHeaders); + var localVarFormParams = {}; + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling updatePet.'); + } + var localVarUseFormData = false; + var localVarRequestOptions = { method: 'PUT', - qs: queryParameters, - headers: headerParams, + qs: localVarQueryParameters, + headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "Pet") }; - this.authentications.petstore_auth.applyToRequest(requestOptions); - this.authentications.default.applyToRequest(requestOptions); - if (Object.keys(formParams).length) { - if (useFormData) { - requestOptions.formData = formParams; + this.authentications.petstore_auth.applyToRequest(localVarRequestOptions); + this.authentications.default.applyToRequest(localVarRequestOptions); + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; } else { - requestOptions.form = formParams; + localVarRequestOptions.form = localVarFormParams; } } return new Promise(function (resolve, reject) { - request(requestOptions, function (error, response, body) { + localVarRequest(localVarRequestOptions, function (error, response, body) { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -682,45 +727,45 @@ var PetApi = (function () { }; PetApi.prototype.updatePetWithForm = function (petId, name, status) { var localVarPath = this.basePath + '/pet/{petId}' - .replace('{' + 'petId' + '}', String(petId)); - var queryParameters = {}; - var headerParams = this.extendObj({}, this.defaultHeaders); - var formParams = {}; + .replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); + var localVarQueryParameters = {}; + var localVarHeaderParams = Object.assign({}, this.defaultHeaders); + var localVarFormParams = {}; if (petId === null || petId === undefined) { throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); } - var useFormData = false; + var localVarUseFormData = false; if (name !== undefined) { - formParams['name'] = ObjectSerializer.serialize(name, "string"); + localVarFormParams['name'] = ObjectSerializer.serialize(name, "string"); } if (status !== undefined) { - formParams['status'] = ObjectSerializer.serialize(status, "string"); + localVarFormParams['status'] = ObjectSerializer.serialize(status, "string"); } - var requestOptions = { + var localVarRequestOptions = { method: 'POST', - qs: queryParameters, - headers: headerParams, + qs: localVarQueryParameters, + headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; - this.authentications.petstore_auth.applyToRequest(requestOptions); - this.authentications.default.applyToRequest(requestOptions); - if (Object.keys(formParams).length) { - if (useFormData) { - requestOptions.formData = formParams; + this.authentications.petstore_auth.applyToRequest(localVarRequestOptions); + this.authentications.default.applyToRequest(localVarRequestOptions); + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; } else { - requestOptions.form = formParams; + localVarRequestOptions.form = localVarFormParams; } } return new Promise(function (resolve, reject) { - request(requestOptions, function (error, response, body) { + localVarRequest(localVarRequestOptions, function (error, response, body) { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -732,46 +777,47 @@ var PetApi = (function () { }; PetApi.prototype.uploadFile = function (petId, additionalMetadata, file) { var localVarPath = this.basePath + '/pet/{petId}/uploadImage' - .replace('{' + 'petId' + '}', String(petId)); - var queryParameters = {}; - var headerParams = this.extendObj({}, this.defaultHeaders); - var formParams = {}; + .replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); + var localVarQueryParameters = {}; + var localVarHeaderParams = Object.assign({}, this.defaultHeaders); + var localVarFormParams = {}; if (petId === null || petId === undefined) { throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); } - var useFormData = false; + var localVarUseFormData = false; if (additionalMetadata !== undefined) { - formParams['additionalMetadata'] = ObjectSerializer.serialize(additionalMetadata, "string"); + localVarFormParams['additionalMetadata'] = ObjectSerializer.serialize(additionalMetadata, "string"); } if (file !== undefined) { - formParams['file'] = file; + localVarFormParams['file'] = file; } - useFormData = true; - var requestOptions = { + localVarUseFormData = true; + var localVarRequestOptions = { method: 'POST', - qs: queryParameters, - headers: headerParams, + qs: localVarQueryParameters, + headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; - this.authentications.petstore_auth.applyToRequest(requestOptions); - this.authentications.default.applyToRequest(requestOptions); - if (Object.keys(formParams).length) { - if (useFormData) { - requestOptions.formData = formParams; + this.authentications.petstore_auth.applyToRequest(localVarRequestOptions); + this.authentications.default.applyToRequest(localVarRequestOptions); + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; } else { - requestOptions.form = formParams; + localVarRequestOptions.form = localVarFormParams; } } return new Promise(function (resolve, reject) { - request(requestOptions, function (error, response, body) { + localVarRequest(localVarRequestOptions, function (error, response, body) { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "ApiResponse"); + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -790,7 +836,7 @@ exports.PetApi = PetApi; var StoreApiApiKeys = exports.StoreApiApiKeys; var StoreApi = (function () { function StoreApi(basePathOrUsername, password, basePath) { - this.basePath = defaultBasePath; + this._basePath = defaultBasePath; this.defaultHeaders = {}; this._useQuerystring = false; this.authentications = { @@ -816,6 +862,19 @@ var StoreApi = (function () { enumerable: true, configurable: true }); + Object.defineProperty(StoreApi.prototype, "basePath", { + get: function () { + return this._basePath; + }, + set: function (basePath) { + this._basePath = basePath; + }, + enumerable: true, + configurable: true + }); + StoreApi.prototype.setDefaultAuthentication = function (auth) { + this.authentications.default = auth; + }; StoreApi.prototype.setApiKey = function (key, value) { this.authentications[StoreApiApiKeys[key]].apiKey = value; }; @@ -826,48 +885,40 @@ var StoreApi = (function () { enumerable: true, configurable: true }); - StoreApi.prototype.extendObj = function (objA, objB) { - for (var key in objB) { - if (objB.hasOwnProperty(key)) { - objA[key] = objB[key]; - } - } - return objA; - }; StoreApi.prototype.deleteOrder = function (orderId) { var localVarPath = this.basePath + '/store/order/{orderId}' - .replace('{' + 'orderId' + '}', String(orderId)); - var queryParameters = {}; - var headerParams = this.extendObj({}, this.defaultHeaders); - var formParams = {}; + .replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId))); + var localVarQueryParameters = {}; + var localVarHeaderParams = Object.assign({}, this.defaultHeaders); + var localVarFormParams = {}; if (orderId === null || orderId === undefined) { throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); } - var useFormData = false; - var requestOptions = { + var localVarUseFormData = false; + var localVarRequestOptions = { method: 'DELETE', - qs: queryParameters, - headers: headerParams, + qs: localVarQueryParameters, + headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; - this.authentications.default.applyToRequest(requestOptions); - if (Object.keys(formParams).length) { - if (useFormData) { - requestOptions.formData = formParams; + this.authentications.default.applyToRequest(localVarRequestOptions); + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; } else { - requestOptions.form = formParams; + localVarRequestOptions.form = localVarFormParams; } } return new Promise(function (resolve, reject) { - request(requestOptions, function (error, response, body) { + localVarRequest(localVarRequestOptions, function (error, response, body) { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -879,36 +930,36 @@ var StoreApi = (function () { }; StoreApi.prototype.getInventory = function () { var localVarPath = this.basePath + '/store/inventory'; - var queryParameters = {}; - var headerParams = this.extendObj({}, this.defaultHeaders); - var formParams = {}; - var useFormData = false; - var requestOptions = { + var localVarQueryParameters = {}; + var localVarHeaderParams = Object.assign({}, this.defaultHeaders); + var localVarFormParams = {}; + var localVarUseFormData = false; + var localVarRequestOptions = { method: 'GET', - qs: queryParameters, - headers: headerParams, + qs: localVarQueryParameters, + headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; - this.authentications.api_key.applyToRequest(requestOptions); - this.authentications.default.applyToRequest(requestOptions); - if (Object.keys(formParams).length) { - if (useFormData) { - requestOptions.formData = formParams; + this.authentications.api_key.applyToRequest(localVarRequestOptions); + this.authentications.default.applyToRequest(localVarRequestOptions); + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; } else { - requestOptions.form = formParams; + localVarRequestOptions.form = localVarFormParams; } } return new Promise(function (resolve, reject) { - request(requestOptions, function (error, response, body) { + localVarRequest(localVarRequestOptions, function (error, response, body) { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "{ [key: string]: number; }"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -920,39 +971,39 @@ var StoreApi = (function () { }; StoreApi.prototype.getOrderById = function (orderId) { var localVarPath = this.basePath + '/store/order/{orderId}' - .replace('{' + 'orderId' + '}', String(orderId)); - var queryParameters = {}; - var headerParams = this.extendObj({}, this.defaultHeaders); - var formParams = {}; + .replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId))); + var localVarQueryParameters = {}; + var localVarHeaderParams = Object.assign({}, this.defaultHeaders); + var localVarFormParams = {}; if (orderId === null || orderId === undefined) { throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); } - var useFormData = false; - var requestOptions = { + var localVarUseFormData = false; + var localVarRequestOptions = { method: 'GET', - qs: queryParameters, - headers: headerParams, + qs: localVarQueryParameters, + headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; - this.authentications.default.applyToRequest(requestOptions); - if (Object.keys(formParams).length) { - if (useFormData) { - requestOptions.formData = formParams; + this.authentications.default.applyToRequest(localVarRequestOptions); + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; } else { - requestOptions.form = formParams; + localVarRequestOptions.form = localVarFormParams; } } return new Promise(function (resolve, reject) { - request(requestOptions, function (error, response, body) { + localVarRequest(localVarRequestOptions, function (error, response, body) { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "Order"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -964,36 +1015,39 @@ var StoreApi = (function () { }; StoreApi.prototype.placeOrder = function (body) { var localVarPath = this.basePath + '/store/order'; - var queryParameters = {}; - var headerParams = this.extendObj({}, this.defaultHeaders); - var formParams = {}; - var useFormData = false; - var requestOptions = { + var localVarQueryParameters = {}; + var localVarHeaderParams = Object.assign({}, this.defaultHeaders); + var localVarFormParams = {}; + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling placeOrder.'); + } + var localVarUseFormData = false; + var localVarRequestOptions = { method: 'POST', - qs: queryParameters, - headers: headerParams, + qs: localVarQueryParameters, + headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "Order") }; - this.authentications.default.applyToRequest(requestOptions); - if (Object.keys(formParams).length) { - if (useFormData) { - requestOptions.formData = formParams; + this.authentications.default.applyToRequest(localVarRequestOptions); + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; } else { - requestOptions.form = formParams; + localVarRequestOptions.form = localVarFormParams; } } return new Promise(function (resolve, reject) { - request(requestOptions, function (error, response, body) { + localVarRequest(localVarRequestOptions, function (error, response, body) { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "Order"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -1012,7 +1066,7 @@ exports.StoreApi = StoreApi; var UserApiApiKeys = exports.UserApiApiKeys; var UserApi = (function () { function UserApi(basePathOrUsername, password, basePath) { - this.basePath = defaultBasePath; + this._basePath = defaultBasePath; this.defaultHeaders = {}; this._useQuerystring = false; this.authentications = { @@ -1038,6 +1092,19 @@ var UserApi = (function () { enumerable: true, configurable: true }); + Object.defineProperty(UserApi.prototype, "basePath", { + get: function () { + return this._basePath; + }, + set: function (basePath) { + this._basePath = basePath; + }, + enumerable: true, + configurable: true + }); + UserApi.prototype.setDefaultAuthentication = function (auth) { + this.authentications.default = auth; + }; UserApi.prototype.setApiKey = function (key, value) { this.authentications[UserApiApiKeys[key]].apiKey = value; }; @@ -1048,45 +1115,40 @@ var UserApi = (function () { enumerable: true, configurable: true }); - UserApi.prototype.extendObj = function (objA, objB) { - for (var key in objB) { - if (objB.hasOwnProperty(key)) { - objA[key] = objB[key]; - } - } - return objA; - }; UserApi.prototype.createUser = function (body) { var localVarPath = this.basePath + '/user'; - var queryParameters = {}; - var headerParams = this.extendObj({}, this.defaultHeaders); - var formParams = {}; - var useFormData = false; - var requestOptions = { + var localVarQueryParameters = {}; + var localVarHeaderParams = Object.assign({}, this.defaultHeaders); + var localVarFormParams = {}; + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createUser.'); + } + var localVarUseFormData = false; + var localVarRequestOptions = { method: 'POST', - qs: queryParameters, - headers: headerParams, + qs: localVarQueryParameters, + headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "User") }; - this.authentications.default.applyToRequest(requestOptions); - if (Object.keys(formParams).length) { - if (useFormData) { - requestOptions.formData = formParams; + this.authentications.default.applyToRequest(localVarRequestOptions); + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; } else { - requestOptions.form = formParams; + localVarRequestOptions.form = localVarFormParams; } } return new Promise(function (resolve, reject) { - request(requestOptions, function (error, response, body) { + localVarRequest(localVarRequestOptions, function (error, response, body) { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -1098,35 +1160,38 @@ var UserApi = (function () { }; UserApi.prototype.createUsersWithArrayInput = function (body) { var localVarPath = this.basePath + '/user/createWithArray'; - var queryParameters = {}; - var headerParams = this.extendObj({}, this.defaultHeaders); - var formParams = {}; - var useFormData = false; - var requestOptions = { + var localVarQueryParameters = {}; + var localVarHeaderParams = Object.assign({}, this.defaultHeaders); + var localVarFormParams = {}; + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); + } + var localVarUseFormData = false; + var localVarRequestOptions = { method: 'POST', - qs: queryParameters, - headers: headerParams, + qs: localVarQueryParameters, + headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "Array<User>") + body: ObjectSerializer.serialize(body, "Array") }; - this.authentications.default.applyToRequest(requestOptions); - if (Object.keys(formParams).length) { - if (useFormData) { - requestOptions.formData = formParams; + this.authentications.default.applyToRequest(localVarRequestOptions); + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; } else { - requestOptions.form = formParams; + localVarRequestOptions.form = localVarFormParams; } } return new Promise(function (resolve, reject) { - request(requestOptions, function (error, response, body) { + localVarRequest(localVarRequestOptions, function (error, response, body) { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -1138,35 +1203,38 @@ var UserApi = (function () { }; UserApi.prototype.createUsersWithListInput = function (body) { var localVarPath = this.basePath + '/user/createWithList'; - var queryParameters = {}; - var headerParams = this.extendObj({}, this.defaultHeaders); - var formParams = {}; - var useFormData = false; - var requestOptions = { + var localVarQueryParameters = {}; + var localVarHeaderParams = Object.assign({}, this.defaultHeaders); + var localVarFormParams = {}; + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); + } + var localVarUseFormData = false; + var localVarRequestOptions = { method: 'POST', - qs: queryParameters, - headers: headerParams, + qs: localVarQueryParameters, + headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, - body: ObjectSerializer.serialize(body, "Array<User>") + body: ObjectSerializer.serialize(body, "Array") }; - this.authentications.default.applyToRequest(requestOptions); - if (Object.keys(formParams).length) { - if (useFormData) { - requestOptions.formData = formParams; + this.authentications.default.applyToRequest(localVarRequestOptions); + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; } else { - requestOptions.form = formParams; + localVarRequestOptions.form = localVarFormParams; } } return new Promise(function (resolve, reject) { - request(requestOptions, function (error, response, body) { + localVarRequest(localVarRequestOptions, function (error, response, body) { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -1178,38 +1246,38 @@ var UserApi = (function () { }; UserApi.prototype.deleteUser = function (username) { var localVarPath = this.basePath + '/user/{username}' - .replace('{' + 'username' + '}', String(username)); - var queryParameters = {}; - var headerParams = this.extendObj({}, this.defaultHeaders); - var formParams = {}; + .replace('{' + 'username' + '}', encodeURIComponent(String(username))); + var localVarQueryParameters = {}; + var localVarHeaderParams = Object.assign({}, this.defaultHeaders); + var localVarFormParams = {}; if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling deleteUser.'); } - var useFormData = false; - var requestOptions = { + var localVarUseFormData = false; + var localVarRequestOptions = { method: 'DELETE', - qs: queryParameters, - headers: headerParams, + qs: localVarQueryParameters, + headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; - this.authentications.default.applyToRequest(requestOptions); - if (Object.keys(formParams).length) { - if (useFormData) { - requestOptions.formData = formParams; + this.authentications.default.applyToRequest(localVarRequestOptions); + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; } else { - requestOptions.form = formParams; + localVarRequestOptions.form = localVarFormParams; } } return new Promise(function (resolve, reject) { - request(requestOptions, function (error, response, body) { + localVarRequest(localVarRequestOptions, function (error, response, body) { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -1221,39 +1289,39 @@ var UserApi = (function () { }; UserApi.prototype.getUserByName = function (username) { var localVarPath = this.basePath + '/user/{username}' - .replace('{' + 'username' + '}', String(username)); - var queryParameters = {}; - var headerParams = this.extendObj({}, this.defaultHeaders); - var formParams = {}; + .replace('{' + 'username' + '}', encodeURIComponent(String(username))); + var localVarQueryParameters = {}; + var localVarHeaderParams = Object.assign({}, this.defaultHeaders); + var localVarFormParams = {}; if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling getUserByName.'); } - var useFormData = false; - var requestOptions = { + var localVarUseFormData = false; + var localVarRequestOptions = { method: 'GET', - qs: queryParameters, - headers: headerParams, + qs: localVarQueryParameters, + headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; - this.authentications.default.applyToRequest(requestOptions); - if (Object.keys(formParams).length) { - if (useFormData) { - requestOptions.formData = formParams; + this.authentications.default.applyToRequest(localVarRequestOptions); + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; } else { - requestOptions.form = formParams; + localVarRequestOptions.form = localVarFormParams; } } return new Promise(function (resolve, reject) { - request(requestOptions, function (error, response, body) { + localVarRequest(localVarRequestOptions, function (error, response, body) { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "User"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -1265,41 +1333,47 @@ var UserApi = (function () { }; UserApi.prototype.loginUser = function (username, password) { var localVarPath = this.basePath + '/user/login'; - var queryParameters = {}; - var headerParams = this.extendObj({}, this.defaultHeaders); - var formParams = {}; + var localVarQueryParameters = {}; + var localVarHeaderParams = Object.assign({}, this.defaultHeaders); + var localVarFormParams = {}; + if (username === null || username === undefined) { + throw new Error('Required parameter username was null or undefined when calling loginUser.'); + } + if (password === null || password === undefined) { + throw new Error('Required parameter password was null or undefined when calling loginUser.'); + } if (username !== undefined) { - queryParameters['username'] = ObjectSerializer.serialize(username, "string"); + localVarQueryParameters['username'] = ObjectSerializer.serialize(username, "string"); } if (password !== undefined) { - queryParameters['password'] = ObjectSerializer.serialize(password, "string"); + localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string"); } - var useFormData = false; - var requestOptions = { + var localVarUseFormData = false; + var localVarRequestOptions = { method: 'GET', - qs: queryParameters, - headers: headerParams, + qs: localVarQueryParameters, + headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; - this.authentications.default.applyToRequest(requestOptions); - if (Object.keys(formParams).length) { - if (useFormData) { - requestOptions.formData = formParams; + this.authentications.default.applyToRequest(localVarRequestOptions); + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; } else { - requestOptions.form = formParams; + localVarRequestOptions.form = localVarFormParams; } } return new Promise(function (resolve, reject) { - request(requestOptions, function (error, response, body) { + localVarRequest(localVarRequestOptions, function (error, response, body) { if (error) { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -1311,34 +1385,34 @@ var UserApi = (function () { }; UserApi.prototype.logoutUser = function () { var localVarPath = this.basePath + '/user/logout'; - var queryParameters = {}; - var headerParams = this.extendObj({}, this.defaultHeaders); - var formParams = {}; - var useFormData = false; - var requestOptions = { + var localVarQueryParameters = {}; + var localVarHeaderParams = Object.assign({}, this.defaultHeaders); + var localVarFormParams = {}; + var localVarUseFormData = false; + var localVarRequestOptions = { method: 'GET', - qs: queryParameters, - headers: headerParams, + qs: localVarQueryParameters, + headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; - this.authentications.default.applyToRequest(requestOptions); - if (Object.keys(formParams).length) { - if (useFormData) { - requestOptions.formData = formParams; + this.authentications.default.applyToRequest(localVarRequestOptions); + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; } else { - requestOptions.form = formParams; + localVarRequestOptions.form = localVarFormParams; } } return new Promise(function (resolve, reject) { - request(requestOptions, function (error, response, body) { + localVarRequest(localVarRequestOptions, function (error, response, body) { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { @@ -1350,39 +1424,42 @@ var UserApi = (function () { }; UserApi.prototype.updateUser = function (username, body) { var localVarPath = this.basePath + '/user/{username}' - .replace('{' + 'username' + '}', String(username)); - var queryParameters = {}; - var headerParams = this.extendObj({}, this.defaultHeaders); - var formParams = {}; + .replace('{' + 'username' + '}', encodeURIComponent(String(username))); + var localVarQueryParameters = {}; + var localVarHeaderParams = Object.assign({}, this.defaultHeaders); + var localVarFormParams = {}; if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling updateUser.'); } - var useFormData = false; - var requestOptions = { + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling updateUser.'); + } + var localVarUseFormData = false; + var localVarRequestOptions = { method: 'PUT', - qs: queryParameters, - headers: headerParams, + qs: localVarQueryParameters, + headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, body: ObjectSerializer.serialize(body, "User") }; - this.authentications.default.applyToRequest(requestOptions); - if (Object.keys(formParams).length) { - if (useFormData) { - requestOptions.formData = formParams; + this.authentications.default.applyToRequest(localVarRequestOptions); + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + localVarRequestOptions.formData = localVarFormParams; } else { - requestOptions.form = formParams; + localVarRequestOptions.form = localVarFormParams; } } return new Promise(function (resolve, reject) { - request(requestOptions, function (error, response, body) { + localVarRequest(localVarRequestOptions, function (error, response, body) { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { diff --git a/samples/client/petstore/typescript-node/npm/api.js.map b/samples/client/petstore/typescript-node/npm/api.js.map index 92891a66be6..a8a6ef9ab79 100644 --- a/samples/client/petstore/typescript-node/npm/api.js.map +++ b/samples/client/petstore/typescript-node/npm/api.js.map @@ -1 +1 @@ -{"version":3,"file":"api.js","sourceRoot":"","sources":["api.ts"],"names":[],"mappings":";AAYA,IAAO,OAAO,WAAW,SAAS,CAAC,CAAC;AAEpC,IAAO,OAAO,WAAW,UAAU,CAAC,CAAC;AAErC,IAAI,eAAe,GAAG,+BAA+B,CAAC;AAOtD,IAAI,UAAU,GAAG,CAAC,QAAQ;IACV,SAAS;IACT,QAAQ;IACR,SAAS;IACT,MAAM;IACN,OAAO;IACP,QAAQ;IACR,KAAK,CAAC,CAAC;AAEtB;IAAA;IAuGD,CAAC;IArGe,gCAAe,GAA7B,UAA8B,IAAS,EAAE,YAAoB;QAC7D,EAAE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C,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YACzC,EAAE,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC;gBAChB,sBAAuB,CAAC,QAAQ,GAAG,kBAAkB,CAAC;YAChE,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,sBAAsB,CAAC,IAAI,GAAG,kBAAkB,CAAC;YACrD,CAAC;QACL,CAAC;QACD,MAAM,CAAC,IAAI,OAAO,CAAkD,UAAC,OAAO,EAAE,MAAM;YAChF,eAAe,CAAC,sBAAsB,EAAE,UAAC,KAAK,EAAE,QAAQ,EAAE,IAAI;gBAC1D,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;oBACR,MAAM,CAAC,KAAK,CAAC,CAAC;gBAClB,CAAC;gBAAC,IAAI,CAAC,CAAC;oBACJ,EAAE,CAAC,CAAC,QAAQ,CAAC,UAAU,IAAI,QAAQ,CAAC,UAAU,IAAI,GAAG,IAAI,QAAQ,CAAC,UAAU,IAAI,GAAG,CAAC,CAAC,CAAC;wBAClF,OAAO,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;oBAChD,CAAC;oBAAC,IAAI,CAAC,CAAC;wBACJ,MAAM,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;oBAC/C,CAAC;gBACL,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;IACL,cAAC;AAAD,CAAC,AA9dD,IA8dC;AA9dY,eAAO,UA8dnB,CAAA"} \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/npm/api.ts b/samples/client/petstore/typescript-node/npm/api.ts index 6ee6f176454..ed2fce03d5c 100644 --- a/samples/client/petstore/typescript-node/npm/api.ts +++ b/samples/client/petstore/typescript-node/npm/api.ts @@ -566,7 +566,7 @@ export class PetApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -622,7 +622,7 @@ export class PetApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -680,7 +680,7 @@ export class PetApi { reject(error); } else { body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -738,7 +738,7 @@ export class PetApi { reject(error); } else { body = ObjectSerializer.deserialize(body, "Array"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -793,7 +793,7 @@ export class PetApi { reject(error); } else { body = ObjectSerializer.deserialize(body, "Pet"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -847,7 +847,7 @@ export class PetApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -911,7 +911,7 @@ export class PetApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -977,7 +977,7 @@ export class PetApi { reject(error); } else { body = ObjectSerializer.deserialize(body, "ApiResponse"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1081,7 +1081,7 @@ export class StoreApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1129,7 +1129,7 @@ export class StoreApi { reject(error); } else { body = ObjectSerializer.deserialize(body, "{ [key: string]: number; }"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1182,7 +1182,7 @@ export class StoreApi { reject(error); } else { body = ObjectSerializer.deserialize(body, "Order"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1235,7 +1235,7 @@ export class StoreApi { reject(error); } else { body = ObjectSerializer.deserialize(body, "Order"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1339,7 +1339,7 @@ export class UserApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1391,7 +1391,7 @@ export class UserApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1443,7 +1443,7 @@ export class UserApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1495,7 +1495,7 @@ export class UserApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1548,7 +1548,7 @@ export class UserApi { reject(error); } else { body = ObjectSerializer.deserialize(body, "User"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1614,7 +1614,7 @@ export class UserApi { reject(error); } else { body = ObjectSerializer.deserialize(body, "string"); - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1659,7 +1659,7 @@ export class UserApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); @@ -1718,7 +1718,7 @@ export class UserApi { if (error) { reject(error); } else { - if (response.statusCode >= 200 && response.statusCode <= 299) { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); } else { reject({ response: response, body: body }); diff --git a/samples/client/petstore/typescript-node/npm/client.js b/samples/client/petstore/typescript-node/npm/client.js index 74b85df1371..b5ef9cd8608 100644 --- a/samples/client/petstore/typescript-node/npm/client.js +++ b/samples/client/petstore/typescript-node/npm/client.js @@ -4,9 +4,9 @@ var fs = require('fs'); function deepCheck(objectA, objectB) { var a = objectA; var b = objectB; - var isString = (typeof a == "string" && typeof b == "string"); - var isBool = (typeof a == "boolean" && typeof b == "boolean"); - var isNumber = (typeof a == "number" && typeof b == "number"); + var isString = (typeof a === "string" && typeof b === "string"); + var isBool = (typeof a === "boolean" && typeof b === "boolean"); + var isNumber = (typeof a === "number" && typeof b === "number"); if (a instanceof Array && b instanceof Array) { for (var i = 0; i < a.length; i++) { if (!deepCheck(a[i], b[i])) { @@ -18,7 +18,7 @@ function deepCheck(objectA, objectB) { else if (isString || isBool || isNumber) { return a === b; } - else if (typeof a == "object" && typeof b == "object") { + else if (typeof a === "object" && typeof b === "object") { for (var key in a) { if (!deepCheck(a[key], b[key])) { return false; @@ -114,7 +114,7 @@ petApi.addPet(pet) }) .then(function (res) { console.log('Updated pet using POST form'); - return petApi.uploadFile(petId, undefined, fs.createReadStream('sample.png')); + return petApi.uploadFile(petId, undefined, fs.readFileSync('sample.png')); }) .then(function (res) { console.log('Uploaded image'); diff --git a/samples/client/petstore/typescript-node/npm/client.js.map b/samples/client/petstore/typescript-node/npm/client.js.map index a81b19de489..0ab215bb74b 100644 --- a/samples/client/petstore/typescript-node/npm/client.js.map +++ b/samples/client/petstore/typescript-node/npm/client.js.map @@ -1 +1 @@ -{"version":3,"file":"client.js","sourceRoot":"","sources":["client.ts"],"names":[],"mappings":";AAAA,IAAO,GAAG,WAAW,OAAO,CAAC,CAAC;AAC9B,IAAO,EAAE,WAAW,IAAI,CAAC,CAAC;AAG1B,mBAAmB,OAAY,EAAE,OAAY;IACzC,IAAI,CAAC,GAAG,OAAO,CAAC;IAChB,IAAI,CAAC,GAAG,OAAO,CAAC;IAChB,IAAI,QAAQ,GAAY,CAAC,OAAO,CAAC,IAAI,QAAQ,IAAI,OAAO,CAAC,IAAI,QAAQ,CAAC,CAAC;IACvE,IAAI,MAAM,GAAY,CAAC,OAAO,CAAC,IAAI,SAAS,IAAI,OAAO,CAAC,IAAI,SAAS,CAAC,CAAC;IACvE,IAAI,QAAQ,GAAY,CAAC,OAAO,CAAC,IAAI,QAAQ,IAAI,OAAO,CAAC,IAAI,QAAQ,CAAC,CAAC;IAEvE,EAAE,CAAC,CAAC,CAAC,YAAY,KAAK,IAAI,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC;QAC3C,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,C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C,UAAU,CAAC,OAAO,CAAC,CAAC;IACvD,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,OAAO,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACpE,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACjC,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;QAChD,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC7C,CAAC;AACL,CAAC,CAAC;KACD,KAAK,CAAC,UAAC,GAAQ;IACZ,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnB,QAAQ,GAAG,CAAC,CAAC;AACjB,CAAC,CAAC;KACD,IAAI,CAAC;IACF,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC,CAAC;KACD,IAAI,CAAC,UAAC,GAAG;IACN,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC3B,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC3B,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/npm/package-lock.json b/samples/client/petstore/typescript-node/npm/package-lock.json new file mode 100644 index 00000000000..f68b69830ad --- /dev/null +++ b/samples/client/petstore/typescript-node/npm/package-lock.json @@ -0,0 +1,1572 @@ +{ + "name": "@swagger/angular2-typescript-petstore", + "version": "0.0.1-SNAPSHOT.201605241654", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "agent-base": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", + "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", + "dev": true, + "requires": { + "extend": "3.0.1", + "semver": "5.0.3" + } + }, + "ajv": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.3.0.tgz", + "integrity": "sha1-RBT/dKUIecII7l/cgm4ywwNUnto=", + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.0.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", + "dev": true + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" + }, + "boom": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", + "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", + "requires": { + "hoek": "4.2.0" + } + }, + "boxen": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-0.3.1.tgz", + "integrity": "sha1-p9iYJDrmIvertrtgTXQKdsalRhs=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "filled-array": "1.1.0", + "object-assign": "4.1.1", + "repeating": "2.0.1", + "string-width": "1.0.2", + "widest-line": "1.0.0" + } + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "capture-stack-trace": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", + "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "clone": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz", + "integrity": "sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=", + "dev": true + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "columnify": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz", + "integrity": "sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs=", + "dev": true, + "requires": { + "strip-ansi": "3.0.1", + "wcwidth": "1.0.1" + } + }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "requires": { + "delayed-stream": "1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "typedarray": "0.0.6" + } + }, + "configstore": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-2.1.0.tgz", + "integrity": "sha1-c3o6cDbpiGECqmCZ5HuzOrGroaE=", + "dev": true, + "requires": { + "dot-prop": "3.0.0", + "graceful-fs": "4.1.11", + "mkdirp": "0.5.1", + "object-assign": "4.1.1", + "os-tmpdir": "1.0.2", + "osenv": "0.1.4", + "uuid": "2.0.3", + "write-file-atomic": "1.3.4", + "xdg-basedir": "2.0.0" + }, + "dependencies": { + "uuid": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", + "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=", + "dev": true + } + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "create-error-class": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "dev": true, + "requires": { + "capture-stack-trace": "1.0.0" + } + }, + "cryptiles": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", + "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", + "requires": { + "boom": "5.2.0" + }, + "dependencies": { + "boom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", + "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", + "requires": { + "hoek": "4.2.0" + } + } + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "1.0.0" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", + "dev": true + }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "requires": { + "clone": "1.0.3" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "2.0.1" + } + }, + "dot-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", + "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", + "dev": true, + "requires": { + "is-obj": "1.0.1" + } + }, + "duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", + "dev": true, + "requires": { + "readable-stream": "2.3.3" + } + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "dev": true, + "requires": { + "is-arrayish": "0.2.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", + "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "filled-array": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/filled-array/-/filled-array-1.1.0.tgz", + "integrity": "sha1-w8T2xmO5I0WamqKZEtLQMfFQf4Q=", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", + "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "1.0.0" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "got": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/got/-/got-5.7.1.tgz", + "integrity": "sha1-X4FjWmHkplifGAVp6k44FoClHzU=", + "dev": true, + "requires": { + "create-error-class": "3.0.2", + "duplexer2": "0.1.4", + "is-redirect": "1.0.0", + "is-retry-allowed": "1.1.0", + "is-stream": "1.1.0", + "lowercase-keys": "1.0.0", + "node-status-codes": "1.0.0", + "object-assign": "4.1.1", + "parse-json": "2.2.0", + "pinkie-promise": "2.0.1", + "read-all-stream": "3.1.0", + "readable-stream": "2.3.3", + "timed-out": "3.1.3", + "unzip-response": "1.0.2", + "url-parse-lax": "1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "requires": { + "ajv": "5.3.0", + "har-schema": "2.0.0" + } + }, + "has": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", + "dev": true, + "requires": { + "function-bind": "1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "hawk": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", + "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", + "requires": { + "boom": "4.3.1", + "cryptiles": "3.1.2", + "hoek": "4.2.0", + "sntp": "2.1.0" + } + }, + "hoek": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", + "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==" + }, + "http-proxy-agent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz", + "integrity": "sha1-zBzjjkU7+YSg93AtLdWcc9CBKEo=", + "dev": true, + "requires": { + "agent-base": "2.1.1", + "debug": "2.6.9", + "extend": "3.0.1" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "1.0.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" + } + }, + "https-proxy-agent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", + "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", + "dev": true, + "requires": { + "agent-base": "2.1.1", + "debug": "2.6.9", + "extend": "3.0.1" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ini": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", + "dev": true + }, + "invariant": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", + "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "dev": true, + "requires": { + "loose-envify": "1.3.1" + } + }, + "is-absolute": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz", + "integrity": "sha1-IN5p89uULvLYe5wto28XIjWxtes=", + "dev": true, + "requires": { + "is-relative": "0.2.1", + "is-windows": "0.2.0" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-npm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", + "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", + "dev": true + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-redirect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", + "dev": true + }, + "is-relative": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz", + "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=", + "dev": true, + "requires": { + "is-unc-path": "0.1.2" + } + }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-unc-path": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz", + "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=", + "dev": true, + "requires": { + "unc-path-regex": "0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz", + "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "latest-version": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-2.0.0.tgz", + "integrity": "sha1-VvjWE5YghHuAF/jx9NeOIRMkFos=", + "dev": true, + "requires": { + "package-json": "2.4.0" + } + }, + "listify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/listify/-/listify-1.0.0.tgz", + "integrity": "sha1-A8p7otFQ1CZ3c/dOV1WNEFPSvuM=", + "dev": true + }, + "lockfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/lockfile/-/lockfile-1.0.3.tgz", + "integrity": "sha1-Jjj8OaAzHpysGgS3F5mTHJxQ33k=", + "dev": true + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "dev": true, + "requires": { + "js-tokens": "3.0.2" + } + }, + "lowercase-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", + "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", + "dev": true + }, + "make-error": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.0.tgz", + "integrity": "sha1-Uq06M5zPEM5itAQLcI/nByRLi5Y=", + "dev": true + }, + "make-error-cause": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/make-error-cause/-/make-error-cause-1.2.2.tgz", + "integrity": "sha1-3wOI/NCzeBbf8KX7gQiTl3fcvJ0=", + "dev": true, + "requires": { + "make-error": "1.3.0" + } + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, + "mime-db": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" + }, + "mime-types": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "requires": { + "mime-db": "1.30.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node-status-codes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-status-codes/-/node-status-codes-1.0.0.tgz", + "integrity": "sha1-WuVUHQJGRdMqWPzdyc7s6nrjrC8=", + "dev": true + }, + "nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", + "dev": true, + "requires": { + "abbrev": "1.1.1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "3.0.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "osenv": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", + "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", + "dev": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "package-json": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-2.4.0.tgz", + "integrity": "sha1-DRW9Z9HLvduyyiIv8u24a8sxqLs=", + "dev": true, + "requires": { + "got": "5.7.1", + "registry-auth-token": "3.3.1", + "registry-url": "3.1.0", + "semver": "5.4.1" + }, + "dependencies": { + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true + } + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "1.3.1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + }, + "popsicle": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/popsicle/-/popsicle-5.0.1.tgz", + "integrity": "sha1-lWBtmf5cEsPFmqrqKiomwsUBysY=", + "dev": true, + "requires": { + "any-promise": "1.3.0", + "arrify": "1.0.1", + "concat-stream": "1.6.0", + "form-data": "0.2.0", + "make-error-cause": "1.2.2", + "methods": "1.1.2", + "tough-cookie": "2.3.3", + "xtend": "4.0.1" + }, + "dependencies": { + "combined-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", + "integrity": "sha1-ATfmV7qlp1QcV6w3rF/AfXO03B8=", + "dev": true, + "requires": { + "delayed-stream": "0.0.5" + } + }, + "delayed-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", + "integrity": "sha1-1LH0OpPoKW3+AmlPRoC8N6MTxz8=", + "dev": true + }, + "form-data": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.2.0.tgz", + "integrity": "sha1-Jvi8JtpkQOKZy9z7aQNcT3em5GY=", + "dev": true, + "requires": { + "async": "0.9.2", + "combined-stream": "0.0.7", + "mime-types": "2.0.14" + } + }, + "mime-db": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.12.0.tgz", + "integrity": "sha1-PQxjGA9FjrENMlqqN9fFiuMS6dc=", + "dev": true + }, + "mime-types": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.14.tgz", + "integrity": "sha1-MQ4VnbI+B3+Lsit0jav6SVcUCqY=", + "dev": true, + "requires": { + "mime-db": "1.12.0" + } + } + } + }, + "popsicle-proxy-agent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/popsicle-proxy-agent/-/popsicle-proxy-agent-1.0.0.tgz", + "integrity": "sha1-W4jV0SU6CmAcummGjLpvXbxdCCk=", + "dev": true, + "requires": { + "http-proxy-agent": "1.0.0", + "https-proxy-agent": "1.0.0" + } + }, + "popsicle-retry": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/popsicle-retry/-/popsicle-retry-2.0.0.tgz", + "integrity": "sha1-oLRFWMe1BktQ5KvQoFmhmbatGl8=", + "dev": true, + "requires": { + "any-promise": "1.3.0" + } + }, + "popsicle-status": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/popsicle-status/-/popsicle-status-1.0.2.tgz", + "integrity": "sha1-oCQWcnWAckQS4J0TA/BnzqPKDhM=", + "dev": true + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, + "promise-finally": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/promise-finally/-/promise-finally-2.2.1.tgz", + "integrity": "sha1-ImFsS6kCkW6Yi9RsVNfKoIkQzXc=", + "dev": true, + "requires": { + "any-promise": "1.3.0" + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + }, + "rc": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.2.tgz", + "integrity": "sha1-2M6ctX6NZNnHut2YdsfDTL48cHc=", + "dev": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.4", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + } + }, + "read-all-stream": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/read-all-stream/-/read-all-stream-3.1.0.tgz", + "integrity": "sha1-NcPhd/IHjveJ7kv6+kNzB06u9Po=", + "dev": true, + "requires": { + "pinkie-promise": "2.0.1", + "readable-stream": "2.3.3" + } + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "registry-auth-token": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.1.tgz", + "integrity": "sha1-+w0yie4Nmtosu1KvXf5mywcNMAY=", + "dev": true, + "requires": { + "rc": "1.2.2", + "safe-buffer": "5.1.1" + } + }, + "registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", + "dev": true, + "requires": { + "rc": "1.2.2" + } + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "1.0.2" + } + }, + "request": { + "version": "2.83.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", + "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", + "requires": { + "aws-sign2": "0.7.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.3.1", + "har-validator": "5.0.3", + "hawk": "6.0.2", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "6.5.1", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.6.0", + "uuid": "3.1.0" + } + }, + "rewire": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/rewire/-/rewire-2.5.2.tgz", + "integrity": "sha1-ZCfee3/u+n02QBUH62SlOFvFjcc=" + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "semver": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz", + "integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=", + "dev": true + }, + "semver-diff": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", + "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "dev": true, + "requires": { + "semver": "5.0.3" + } + }, + "slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", + "dev": true + }, + "sntp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", + "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", + "requires": { + "hoek": "4.2.0" + } + }, + "sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "dev": true, + "requires": { + "is-plain-obj": "1.1.0" + } + }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + } + }, + "string-template": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/string-template/-/string-template-1.0.0.tgz", + "integrity": "sha1-np8iM9wA8hhxjsN5oopWc+zKi5Y=", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "thenify": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz", + "integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=", + "dev": true, + "requires": { + "any-promise": "1.3.0" + } + }, + "throat": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/throat/-/throat-2.0.2.tgz", + "integrity": "sha1-qfzoCLaeEzpjJZB4DzQsMKYkmwI=", + "dev": true + }, + "timed-out": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-3.1.3.tgz", + "integrity": "sha1-lYYL/MXHbCd/j4Mm/Q9bLiDrohc=", + "dev": true + }, + "touch": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-1.0.0.tgz", + "integrity": "sha1-RJy+LbrlqMgDjjDXH6D/RklHxN4=", + "dev": true, + "requires": { + "nopt": "1.0.10" + } + }, + "tough-cookie": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", + "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "requires": { + "punycode": "1.4.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "optional": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "typescript": { + "version": "1.8.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-1.8.10.tgz", + "integrity": "sha1-tHXW4N/wv1DyluXKbvn7tccyDx4=", + "dev": true + }, + "typings": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/typings/-/typings-0.8.1.tgz", + "integrity": "sha1-lP3uTK0MEoM9h2YMXMH6YtriHaQ=", + "dev": true, + "requires": { + "any-promise": "1.3.0", + "archy": "1.0.0", + "bluebird": "3.5.1", + "chalk": "1.1.3", + "columnify": "1.5.4", + "listify": "1.0.0", + "minimist": "1.2.0", + "typings-core": "0.3.1", + "update-notifier": "0.6.3", + "wordwrap": "1.0.0", + "xtend": "4.0.1" + } + }, + "typings-core": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/typings-core/-/typings-core-0.3.1.tgz", + "integrity": "sha1-v/0mjjFVyeDL+7mXUCQMCeUf3sY=", + "dev": true, + "requires": { + "any-promise": "1.3.0", + "array-uniq": "1.0.3", + "configstore": "2.1.0", + "debug": "2.6.9", + "detect-indent": "4.0.0", + "graceful-fs": "4.1.11", + "has": "1.0.1", + "invariant": "2.2.2", + "is-absolute": "0.2.6", + "lockfile": "1.0.3", + "make-error-cause": "1.2.2", + "mkdirp": "0.5.1", + "object.pick": "1.3.0", + "parse-json": "2.2.0", + "popsicle": "5.0.1", + "popsicle-proxy-agent": "1.0.0", + "popsicle-retry": "2.0.0", + "popsicle-status": "1.0.2", + "promise-finally": "2.2.1", + "rc": "1.2.2", + "rimraf": "2.6.2", + "sort-keys": "1.1.2", + "string-template": "1.0.0", + "strip-bom": "2.0.0", + "thenify": "3.3.0", + "throat": "2.0.2", + "touch": "1.0.0", + "typescript": "1.8.10", + "xtend": "4.0.1", + "zip-object": "0.1.0" + } + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true + }, + "unzip-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-1.0.2.tgz", + "integrity": "sha1-uYTwh3/AqJwsdzzB73tbIytbBv4=", + "dev": true + }, + "update-notifier": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-0.6.3.tgz", + "integrity": "sha1-d23sjaoT6WKjQeih2YNUMGtnrgg=", + "dev": true, + "requires": { + "boxen": "0.3.1", + "chalk": "1.1.3", + "configstore": "2.1.0", + "is-npm": "1.0.0", + "latest-version": "2.0.0", + "semver-diff": "2.1.0" + } + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "1.0.4" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "uuid": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + } + }, + "wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "dev": true, + "requires": { + "defaults": "1.0.3" + } + }, + "widest-line": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-1.0.0.tgz", + "integrity": "sha1-DAnIXCqUaD0Nfq+O4JfVZL8OEFw=", + "dev": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write-file-atomic": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", + "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "slide": "1.1.6" + } + }, + "xdg-basedir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-2.0.0.tgz", + "integrity": "sha1-7byQPMOF/ARSPZZqM1UEtVBNG9I=", + "dev": true, + "requires": { + "os-homedir": "1.0.2" + } + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "zip-object": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/zip-object/-/zip-object-0.1.0.tgz", + "integrity": "sha1-waDaBMiMg3dW4khoCgP/kC7D9To=", + "dev": true + } + } +} diff --git a/samples/client/petstore/typescript-node/npm/package.json b/samples/client/petstore/typescript-node/npm/package.json index 9680fa89acb..17de827438b 100644 --- a/samples/client/petstore/typescript-node/npm/package.json +++ b/samples/client/petstore/typescript-node/npm/package.json @@ -24,4 +24,4 @@ "publishConfig": { "registry": "https://skimdb.npmjs.com/registry" } -} \ No newline at end of file +}