diff --git a/bin/go-petstore-withxml.sh b/bin/go-petstore-withxml.sh index 0e5390b5fce..222fd35cf2f 100755 --- a/bin/go-petstore-withxml.sh +++ b/bin/go-petstore-withxml.sh @@ -30,6 +30,6 @@ rm -rf samples/client/petstore/go/go-petstore-withXml # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/go -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g go -o samples/client/petstore/go/go-petstore-withXml -DpackageName=petstore,withXml=true $@" +ags="generate -t modules/openapi-generator/src/main/resources/go -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g go -o samples/client/petstore/go/go-petstore-withXml -DpackageName=petstore,withXml=true,withGoCodegenComment=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date index 34e6f480f8f..26975fdd3e1 100755 --- a/bin/utils/ensure-up-to-date +++ b/bin/utils/ensure-up-to-date @@ -29,6 +29,7 @@ sleep 5 ./bin/typescript-fetch-petstore-all.sh > /dev/null 2>&1 ./bin/typescript-node-petstore-all.sh > /dev/null 2>&1 ./bin/typescript-inversify-petstore.sh > /dev/null 2>&1 +./bin/rust-server-petstore.sh > /dev/null 2>&1 # Check: diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java index 0d5780a775e..34676479f3d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java @@ -56,6 +56,9 @@ public class CodegenConstants { public static final String PYTHON_PACKAGE_NAME = "pythonPackageName"; public static final String PYTHON_PACKAGE_NAME_DESC = "package name for generated python code"; + public static final String WITH_GO_CODEGEN_COMMENT = "withGoCodegenComment"; + public static final String WITH_GO_CODEGEN_COMMENT_DESC = "whether to include Go codegen comment to disable Go Lint and collapse by default GitHub in PRs and diffs"; + public static final String GROUP_ID = "groupId"; public static final String GROUP_ID_DESC = "groupId in generated pom.xml"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java index b19eff1dd6b..da21e3416bc 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java @@ -54,7 +54,7 @@ public class CodegenProperty implements Cloneable { public boolean exclusiveMinimum; public boolean exclusiveMaximum; public boolean hasMore, required, secondaryParam; - public boolean hasMoreNonReadOnly; // for model constructor, true if next properyt is not readonly + public boolean hasMoreNonReadOnly; // for model constructor, true if next property is not readonly public boolean isPrimitiveType, isContainer, isNotContainer; public boolean isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isByteArray, isBinary, isFile, isBoolean, isDate, isDateTime, isUuid; public boolean isListContainer, isMapContainer; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java index dc288e74dd4..a710c6c852a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java @@ -37,6 +37,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege private static final Logger LOGGER = LoggerFactory.getLogger(AbstractGoCodegen.class); + protected boolean withGoCodegenComment = false; protected boolean withXml = false; protected String packageName = "openapi"; @@ -584,6 +585,10 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege } } + public void setWithGoCodegenComment(boolean withGoCodegenComment) { + this.withGoCodegenComment = withGoCodegenComment; + } + public void setWithXml(boolean withXml) { this.withXml = withXml; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java index ff5765b4650..dd173e43ccb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java @@ -30,6 +30,7 @@ public class GoClientCodegen extends AbstractGoCodegen { protected String packageVersion = "1.0.0"; protected String apiDocPath = "docs/"; protected String modelDocPath = "docs/"; + public static final String WITH_GO_CODEGEN_COMMENT = "withGoCodegenComment"; public static final String WITH_XML = "withXml"; public GoClientCodegen() { @@ -49,8 +50,10 @@ public class GoClientCodegen extends AbstractGoCodegen { cliOptions.add(new CliOption(CodegenConstants.PACKAGE_VERSION, "Go package version.") .defaultValue("1.0.0")); + cliOptions.add(CliOption.newBoolean(WITH_GO_CODEGEN_COMMENT, "whether to include Go codegen comment to disable Go Lint and collapse by default GitHub in PRs and diffs")); cliOptions.add(CliOption.newBoolean(WITH_XML, "whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)")); + // option to change the order of form/body parameter cliOptions.add(CliOption.newBoolean( CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, @@ -93,6 +96,13 @@ public class GoClientCodegen extends AbstractGoCodegen { supportingFiles.add(new SupportingFile("response.mustache", "", "response.go")); supportingFiles.add(new SupportingFile(".travis.yml", "", ".travis.yml")); + if (additionalProperties.containsKey(WITH_GO_CODEGEN_COMMENT)) { + setWithGoCodegenComment(Boolean.parseBoolean(additionalProperties.get(WITH_GO_CODEGEN_COMMENT).toString())); + if (withGoCodegenComment) { + additionalProperties.put(WITH_GO_CODEGEN_COMMENT, "true"); + } + } + if (additionalProperties.containsKey(WITH_XML)) { setWithXml(Boolean.parseBoolean(additionalProperties.get(WITH_XML).toString())); if (withXml) { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/ApiClient.mustache index f447d645807..ad1fcc649dd 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/ApiClient.mustache @@ -638,7 +638,7 @@ public class ApiClient { for (Entry defaultHeaderEnrty: defaultHeaderMap.entrySet()) { if (!headerParams.containsKey(defaultHeaderEnrty.getKey())) { - String value = defaultHeaderEnrty.getKey(); + String value = defaultHeaderEnrty.getValue(); if (value != null) { invocationBuilder = invocationBuilder.header(defaultHeaderEnrty.getKey(), value); } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache index fc2cd18dbea..ac2cb6fab8e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache @@ -117,8 +117,9 @@ if(hasProperty('target') && target == 'android') { } ext { - swagger_annotations_version = "1.5.8" - jackson_version = "2.6.4" + swagger_annotations_version = "1.5.18" + jackson_version = "2.8.6" + threetenbp_version = "2.6.4" jersey_version = "2.22.2" resteasy_version = "3.1.3.Final" {{^java8}} @@ -142,7 +143,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version" - compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_version" + compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$threetenbp_version" {{#java8}} compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" {{/java8}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache index 348d29d96d1..cdfc4f848fd 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache @@ -9,17 +9,21 @@ lazy val root = (project in file(".")). publishArtifact in (Compile, packageDoc) := false, resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( - "io.swagger" % "swagger-annotations" % "1.5.8", + "io.swagger" % "swagger-annotations" % "1.5.18", "org.glassfish.jersey.core" % "jersey-client" % "2.22.2", "org.glassfish.jersey.media" % "jersey-media-multipart" % "2.22.2", "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.22.2", - "com.fasterxml.jackson.core" % "jackson-core" % "2.7.5", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.7.5", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.7.5", + "org.jboss.resteasy" % "resteasy-client" % "3.1.3.Final", + "org.jboss.resteasy" % "resteasy-multipart-provider" % "3.1.3.Final", + "org.jboss.resteasy" % "resteasy-jackson2-provider" % "3.1.3.Final", + "com.fasterxml.jackson.core" % "jackson-core" % "2.8.6", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.8.6", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.8.6", + "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.6.4", {{#java8}} - "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.7.5", - {{/java8}} - {{^java8}} + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.8.6", + {{/java8}} + {{^java8}} "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.7.5", "joda-time" % "joda-time" % "2.9.4", "com.brsanthu" % "migbase64" % "2.2", diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache index 479c22ba75c..f2f7fa53a40 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache @@ -247,7 +247,7 @@ com.github.joschi.jackson jackson-datatype-threetenbp - ${jackson-version} + ${threetenbp-version} @@ -261,7 +261,8 @@ UTF-8 1.5.18 3.1.3.Final - 2.6.4 + 2.8.6 + 2.6.4 {{^java8}} 2.9.9 {{/java8}} diff --git a/modules/openapi-generator/src/main/resources/go/partial_header.mustache b/modules/openapi-generator/src/main/resources/go/partial_header.mustache index 23edcdfb691..e23b21520a9 100644 --- a/modules/openapi-generator/src/main/resources/go/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/go/partial_header.mustache @@ -13,5 +13,11 @@ {{#infoEmail}} * Contact: {{{infoEmail}}} {{/infoEmail}} +{{^withGoCodegenComment}} * Generated by: OpenAPI Generator (https://openapi-generator.tech) +{{/withGoCodegenComment}} */ +{{#withGoCodegenComment}} + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +{{/withGoCodegenComment}} diff --git a/modules/openapi-generator/src/main/resources/php-symfony/Controller.mustache b/modules/openapi-generator/src/main/resources/php-symfony/Controller.mustache index f406ba075cf..c698d8da8ce 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/Controller.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/Controller.mustache @@ -19,6 +19,7 @@ namespace {{controllerPackage}}; +use Symfony\Bundle\FrameworkBundle\Controller\Controller as BaseController; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\HttpException; use {{servicePackage}}\SerializerInterface; @@ -32,7 +33,7 @@ use {{servicePackage}}\ValidatorInterface; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class Controller +class Controller extends BaseController { protected $validator; protected $serializer; diff --git a/modules/openapi-generator/src/main/resources/rust-server/client-mod.mustache b/modules/openapi-generator/src/main/resources/rust-server/client-mod.mustache index 70e5b333a32..0e78e327394 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/client-mod.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/client-mod.mustache @@ -65,26 +65,37 @@ fn into_base_path(input: &str, correct_scheme: Option<&'static str>) -> Result, Response=hyper::Response, Error=hyper::Error, Future=hyper::client::FutureResponse>>>, +pub struct Client where + F: Future + 'static { + client_service: Arc, Response=hyper::Response, Error=hyper::Error, Future=F>>>, base_path: String, } -impl fmt::Debug for Client { +impl fmt::Debug for Client where + F: Future + 'static { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Client {{ base_path: {} }}", self.base_path) } } -impl Client { +impl Clone for Client where + F: Future + 'static { + fn clone(&self) -> Self { + Client { + client_service: self.client_service.clone(), + base_path: self.base_path.clone() + } + } +} + +impl Client { /// Create an HTTP client. /// /// # Arguments /// * `handle` - tokio reactor handle to use for execution /// * `base_path` - base path of the client API, i.e. "www.my-api-implementation.com" - pub fn try_new_http(handle: Handle, base_path: &str) -> Result { + pub fn try_new_http(handle: Handle, base_path: &str) -> Result, ClientInitError> { let http_connector = swagger::http_connector(); Self::try_new_with_connector::( handle, @@ -104,7 +115,7 @@ impl Client { handle: Handle, base_path: &str, ca_certificate: CA, - ) -> Result + ) -> Result, ClientInitError> where CA: AsRef, { @@ -125,13 +136,13 @@ impl Client { /// * `ca_certificate` - Path to CA certificate used to authenticate the server /// * `client_key` - Path to the client private key /// * `client_certificate` - Path to the client's public certificate associated with the private key - pub fn try_new_https_mutual( + pub fn try_new_https_mutual( handle: Handle, base_path: &str, ca_certificate: CA, client_key: K, client_certificate: C, - ) -> Result + ) -> Result, ClientInitError> where CA: AsRef, K: AsRef, @@ -168,17 +179,17 @@ impl Client { base_path: &str, protocol: Option<&'static str>, connector_fn: Box C + Send + Sync>, - ) -> Result + ) -> Result, ClientInitError> where C: hyper::client::Connect + hyper::client::Service, { let connector = connector_fn(&handle); - let hyper_client = Box::new(hyper::Client::configure().connector(connector).build( + let client_service = Box::new(hyper::Client::configure().connector(connector).build( &handle, )); Ok(Client { - hyper_client: Arc::new(hyper_client), + client_service: Arc::new(client_service), base_path: into_base_path(base_path, protocol)?, }) } @@ -192,19 +203,41 @@ impl Client { /// The reason for this function's existence is to support legacy test code, which did mocking at the hyper layer. /// This is not a recommended way to write new tests. If other reasons are found for using this function, they /// should be mentioned here. - pub fn try_new_with_hyper_client(hyper_client: Arc, Response=hyper::Response, Error=hyper::Error, Future=hyper::client::FutureResponse>>>, - handle: Handle, - base_path: &str) - -> Result + #[deprecated(note="Use try_new_with_client_service instead")] + pub fn try_new_with_hyper_client( + hyper_client: Arc, Response=hyper::Response, Error=hyper::Error, Future=hyper::client::FutureResponse>>>, + handle: Handle, + base_path: &str + ) -> Result, ClientInitError> { Ok(Client { - hyper_client: hyper_client, + client_service: hyper_client, base_path: into_base_path(base_path, None)?, }) } } -impl Api for Client where C: Has {{#hasAuthMethods}}+ Has>{{/hasAuthMethods}}{ +impl Client where + F: Future + 'static +{ + /// Constructor for creating a `Client` by passing in a pre-made `hyper` client Service. + /// + /// This allows adding custom wrappers around the underlying transport, for example for logging. + pub fn try_new_with_client_service(client_service: Arc, Response=hyper::Response, Error=hyper::Error, Future=F>>>, + handle: Handle, + base_path: &str) + -> Result, ClientInitError> + { + Ok(Client { + client_service: client_service, + base_path: into_base_path(base_path, None)?, + }) + } +} + +impl Api for Client where + F: Future + 'static, + C: Has {{#hasAuthMethods}}+ Has>{{/hasAuthMethods}}{ {{#apiInfo}}{{#apis}}{{#operations}}{{#operation}} fn {{#vendorExtensions}}{{operation_id}}{{/vendorExtensions}}(&self{{#allParams}}, param_{{paramName}}: {{^required}}{{#isFile}}Box{{#isFile}}, Error=Error> + Send>{{/isFile}}{{/required}}{{/allParams}}, context: &C) -> Box> { {{#queryParams}}{{#-first}} @@ -312,13 +345,13 @@ impl Api for Client where C: Has {{#hasAuthMethods}}+ Has { -{{#headers}} header! { (Response{{nameInCamelCase}}, "{{baseName}}") => [{{{dataType}}}] } +{{#headers}} header! { (Response{{nameInCamelCase}}, "{{baseName}}") => [{{{datatype}}}] } let response_{{name}} = match response.headers().get::() { Some(response_{{name}}) => response_{{name}}.0.clone(), None => return Box::new(future::err(ApiError(String::from("Required response header {{baseName}} for response {{code}} was not found.")))) as Box>, diff --git a/modules/openapi-generator/src/main/resources/rust-server/server-mod.mustache b/modules/openapi-generator/src/main/resources/rust-server/server-mod.mustache index 70c07a2e980..a32d7031e0f 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/server-mod.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/server-mod.mustache @@ -36,7 +36,7 @@ use std::io; use std::collections::BTreeSet; pub use swagger::auth::Authorization; -use swagger::{ApiError, XSpanId, XSpanIdString, Has}; +use swagger::{ApiError, XSpanId, XSpanIdString, Has, RequestParser}; use swagger::auth::Scopes; use {Api{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}, @@ -127,6 +127,9 @@ where let api_impl = self.api_impl.clone(); let (method, uri, _, headers, body) = req.deconstruct(); let path = paths::GLOBAL_REGEX_SET.matches(uri.path()); + + // This match statement is duplicated below in `parse_operation_id()`. + // Please update both places if changing how this code is autogenerated. match &method { {{#apiInfo}}{{#apis}}{{#operations}}{{#operation}} // {{operationId}} - {{httpMethod}} {{path}} @@ -462,3 +465,18 @@ fn multipart_boundary<'a>(headers: &'a Headers) -> Option<&'a str> { }) } {{/apiHasFile}} + +/// Request parser for `Api`. +pub struct ApiRequestParser; + +impl RequestParser for ApiRequestParser { + fn parse_operation_id(request: &Request) -> Result<&'static str, ()> { + let path = paths::GLOBAL_REGEX_SET.matches(request.uri().path()); + match request.method() { +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}} + // {{operationId}} - {{httpMethod}} {{path}} + &hyper::Method::{{vendorExtensions.HttpMethod}} if path.matched(paths::ID_{{vendorExtensions.PATH_ID}}) => Ok("{{operationId}}"), +{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} _ => Err(()), + } + } +} diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/api.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/api.mustache index d149d5ff2ee..d791ace1d7a 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/api.mustache @@ -44,7 +44,7 @@ export interface FetchArgs { * @class BaseAPI */ export class BaseAPI { - protected configuration: Configuration; + protected configuration: Configuration | undefined; constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected fetch: FetchAPI = portableFetch) { if (configuration) { @@ -61,7 +61,7 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: "RequiredError" + name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); } diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/modelEnum.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/modelEnum.mustache index 5fa32c28b88..dc04cb0bd63 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/modelEnum.mustache @@ -6,7 +6,7 @@ export enum {{classname}} { {{#allowableValues}} {{#enumVars}} - {{{name}}} = {{{value}}}{{^-last}},{{/-last}} + {{{name}}} = {{{value}}}{{^-last}},{{/-last}} {{/enumVars}} {{/allowableValues}} } diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache index d4ba9f7b862..3aa462ea3a8 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache @@ -32,7 +32,7 @@ export namespace {{classname}} { export enum {{enumName}} { {{#allowableValues}} {{#enumVars}} - {{{name}}} = {{{value}}}{{^-last}},{{/-last}} + {{{name}}} = {{{value}}}{{^-last}},{{/-last}} {{/enumVars}} {{/allowableValues}} } diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/package.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/package.mustache index 88c86ffde58..5234e1034a2 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/package.mustache @@ -22,7 +22,7 @@ }, "devDependencies": { "@types/node": "^8.0.9", - "typescript": "^2.0" + "typescript": "^2.4" }{{#npmRepository}},{{/npmRepository}} {{#npmRepository}} "publishConfig":{ diff --git a/modules/openapi-generator/src/main/resources/typescript-jquery/api.mustache b/modules/openapi-generator/src/main/resources/typescript-jquery/api.mustache index 5f4cf7db208..71678eada2b 100644 --- a/modules/openapi-generator/src/main/resources/typescript-jquery/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-jquery/api.mustache @@ -56,7 +56,10 @@ export class {{classname}} { * @param {{paramName}} {{description}} {{/allParams}} */ - public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; {{#returnType}}body: {{{returnType}}}; {{/returnType}}{{^returnType}}body?: any; {{/returnType}} }> { + public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< + { response: JQueryXHR; {{#returnType}}body: {{{returnType}}}; {{/returnType}}{{^returnType}}body?: any; {{/returnType}} }, + { response: JQueryXHR; errorThrown: string } + > { let localVarPath = this.basePath + '{{{path}}}'{{#pathParams}}.replace('{' + '{{baseName}}' + '}', encodeURIComponent(String({{paramName}}))){{/pathParams}}; let queryParameters: any = {}; @@ -229,12 +232,15 @@ export class {{classname}} { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } - let dfd = $.Deferred(); + let dfd = $.Deferred< + { response: JQueryXHR; {{#returnType}}body: {{{returnType}}}; {{/returnType}}{{^returnType}}body?: any; {{/returnType}} }, + { response: JQueryXHR; errorThrown: string } + >(); $.ajax(requestOptions).then( (data: {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}any{{/returnType}}, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), + dfd.resolve({response: jqXHR, body: data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject(xhr, errorThrown) + dfd.reject({response: xhr, errorThrown: errorThrown}) ); return dfd.promise(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientOptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientOptionsTest.java index 9b8a33b1b09..a86cae6fde7 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientOptionsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientOptionsTest.java @@ -47,6 +47,8 @@ public class GoClientOptionsTest extends AbstractOptionsTest { times = 1; clientCodegen.setPackageName(GoClientOptionsProvider.PACKAGE_NAME_VALUE); times = 1; + clientCodegen.setWithGoCodegenComment(GoClientOptionsProvider.WITH_GO_CODEGEN_COMMENT_VALUE); + times = 1; clientCodegen.setWithXml(GoClientOptionsProvider.WITH_XML_VALUE); times = 1; clientCodegen.setPrependFormOrBodyParameters(Boolean.valueOf(GoClientOptionsProvider.PREPEND_FORM_OR_BODY_PARAMETERS_VALUE)); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoClientOptionsProvider.java index feedadf500a..ed96aa800dc 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoClientOptionsProvider.java @@ -28,6 +28,7 @@ public class GoClientOptionsProvider implements OptionsProvider { public static final String PACKAGE_VERSION_VALUE = "1.0.0"; public static final String PACKAGE_NAME_VALUE = "Go"; + public static final boolean WITH_GO_CODEGEN_COMMENT_VALUE = true; public static final boolean WITH_XML_VALUE = true; public static final Boolean PREPEND_FORM_OR_BODY_PARAMETERS_VALUE = true; @@ -43,6 +44,7 @@ public class GoClientOptionsProvider implements OptionsProvider { .put(CodegenConstants.PACKAGE_VERSION, PACKAGE_VERSION_VALUE) .put(CodegenConstants.PACKAGE_NAME, PACKAGE_NAME_VALUE) .put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, "true") + .put(CodegenConstants.WITH_GO_CODEGEN_COMMENT, "true") .put(CodegenConstants.WITH_XML, "true") .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, "true") .build(); diff --git a/samples/client/petstore/c/api/petAPI.c b/samples/client/petstore/c/api/petAPI.c index 2eef6bed3b7..d9e8f4368f8 100644 --- a/samples/client/petstore/c/api/petAPI.c +++ b/samples/client/petstore/c/api/petAPI.c @@ -15,6 +15,10 @@ pet_t *petApi_getPetById(apiClient_t *apiClient, long petId) { apiClient_invoke(apiClient, "pet", petIdString, + NULL, + NULL, + NULL, + NULL, NULL); pet = pet_parseFromJSON(apiClient->dataReceived); free(apiClient->dataReceived); @@ -38,7 +42,11 @@ void *petApi_addPet(apiClient_t *apiClient, pet_t *pet) { apiClient_invoke(apiClient, "pet", NULL, - petJSONString); + NULL, + NULL, + NULL, + petJSONString, + "POST"); free(apiClient->dataReceived); free(petJSONString); cJSON_Delete(petJSONObject); diff --git a/samples/client/petstore/c/include/apiClient.h b/samples/client/petstore/c/include/apiClient.h index 352a196ff3f..7b493a42286 100644 --- a/samples/client/petstore/c/include/apiClient.h +++ b/samples/client/petstore/c/include/apiClient.h @@ -1,9 +1,11 @@ #ifndef INCLUDE_API_CLIENT_H #define INCLUDE_API_CLIENT_H -#ifdef API_KEY #include "list.h" -#endif // API_KEY + +typedef int bool; +#define true 1 +#define false 0 typedef struct apiClient_t { char *basePath; @@ -25,6 +27,6 @@ typedef struct apiClient_t { apiClient_t* apiClient_create(); void apiClient_free(apiClient_t *apiClient); -void apiClient_invoke(apiClient_t *apiClient, char* operationName, char* operationParameter, char *dataToPost); +void apiClient_invoke(apiClient_t *apiClient, char* operationName, char* operationParameter, list_t *queryParameters, list_t *headerParameters, list_t *formParameters, char *bodyParameters, char *requestType); #endif // INCLUDE_API_CLIENT_H \ No newline at end of file diff --git a/samples/client/petstore/c/include/keyValuePair.h b/samples/client/petstore/c/include/keyValuePair.h new file mode 100644 index 00000000000..bcc212d82d1 --- /dev/null +++ b/samples/client/petstore/c/include/keyValuePair.h @@ -0,0 +1,7 @@ +typedef struct keyValuePair_t { + char* key; + char* value; +} keyValuePair_t; + +keyValuePair_t *keyValuePair_create(char *key, char *value); +void keyValuePair_free(keyValuePair_t *keyValuePair); \ No newline at end of file diff --git a/samples/client/petstore/c/src/apiClient.c b/samples/client/petstore/c/src/apiClient.c index 69be9b22218..58a593e28f2 100644 --- a/samples/client/petstore/c/src/apiClient.c +++ b/samples/client/petstore/c/src/apiClient.c @@ -3,10 +3,8 @@ #include #include "apiClient.h" #include "pet.h" +#include "keyValuePair.h" -#ifdef API_KEY -#include "apiKey.h" -#endif size_t writeDataCallback(void *buffer, size_t size, size_t nmemb, void *userp); apiClient_t *apiClient_create() { @@ -28,25 +26,77 @@ void apiClient_free(apiClient_t *apiClient) { curl_global_cleanup(); } +void replaceSpaceWithPlus(char *stringToProcess) { + for(int i = 0; i < strlen(stringToProcess); i++) { + if(stringToProcess[i] == ' ') { + stringToProcess[i] = '+'; + } + } +} + char *assembleTargetUrl(char *basePath, char *operationName, - char *operationParameter) { + char *operationParameter, + list_t *queryParameters) { + int neededBufferSizeForQueryParameters = 0; + listEntry_t *listEntry; + + if(queryParameters != NULL) { + list_ForEach(listEntry, queryParameters) { + keyValuePair_t *pair = listEntry->data; + neededBufferSizeForQueryParameters += + strlen(pair->key) + strlen(pair->value); + } + + neededBufferSizeForQueryParameters += + (queryParameters->count * 2); // each keyValuePair is separated by a = and a & except the last, but this makes up for the ? at the beginning + } + + int operationParameterLength = 0; + int basePathLength = strlen(basePath); + bool slashNeedsToBeAppendedToBasePath = false; + + if(operationParameter != NULL) { + operationParameterLength = (1 + strlen(operationParameter)); + } + if(basePath[strlen(basePath) - 1] != '/') { + slashNeedsToBeAppendedToBasePath = true; + basePathLength++; + } + char *targetUrl = - malloc(strlen(operationName) + strlen( - basePath) + - ((operationParameter == NULL) ? 1 : (2 + strlen( - operationParameter)))); + malloc(strlen( + operationName) + neededBufferSizeForQueryParameters + basePathLength + operationParameterLength + 1 + ); strcpy(targetUrl, basePath); + if(slashNeedsToBeAppendedToBasePath) { + strcat(targetUrl, "/"); + } strcat(targetUrl, operationName); if(operationParameter != NULL) { strcat(targetUrl, "/"); strcat(targetUrl, operationParameter); } + if(queryParameters != NULL) { + strcat(targetUrl, "?"); + list_ForEach(listEntry, queryParameters) { + keyValuePair_t *pair = listEntry->data; + replaceSpaceWithPlus(pair->key); + strcat(targetUrl, pair->key); + strcat(targetUrl, "="); + replaceSpaceWithPlus(pair->value); + strcat(targetUrl, pair->value); + if(listEntry->nextListEntry != NULL) { + strcat(targetUrl, "&"); + } + } + } + return targetUrl; } -char *assembleHeader(char *key, char *value) { +char *assembleHeaderField(char *key, char *value) { char *header = malloc(strlen(key) + strlen(value) + 3); strcpy(header, key), @@ -56,40 +106,83 @@ char *assembleHeader(char *key, char *value) { return header; } -void postData(CURL *handle, char *dataToPost) { - curl_easy_setopt(handle, CURLOPT_POSTFIELDS, dataToPost); +void postData(CURL *handle, char *bodyParameters) { + curl_easy_setopt(handle, CURLOPT_POSTFIELDS, bodyParameters); curl_easy_setopt(handle, CURLOPT_POSTFIELDSIZE_LARGE, - strlen(dataToPost)); - curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, "POST"); + strlen(bodyParameters)); } void apiClient_invoke(apiClient_t *apiClient, char *operationName, char *operationParameter, - char *dataToPost) { + list_t *queryParameters, + list_t *headerParameters, + list_t *formParameters, + char *bodyParameters, + char *requestType) { CURL *handle = curl_easy_init(); CURLcode res; if(handle) { + listEntry_t *listEntry; + curl_mime *mime = NULL; struct curl_slist *headers = NULL; + headers = curl_slist_append(headers, "accept: application/json"); headers = curl_slist_append(headers, "Content-Type: application/json"); + if(requestType != NULL) { + curl_easy_setopt(handle, + CURLOPT_CUSTOMREQUEST, + requestType); + } + if(formParameters != NULL) { + mime = curl_mime_init(handle); + list_ForEach(listEntry, formParameters) { + keyValuePair_t *keyValuePair = listEntry->data; + if((keyValuePair->key != NULL) && + (keyValuePair->value != NULL) ) + { + curl_mimepart *part = curl_mime_addpart( + mime); + curl_mime_data(part, + keyValuePair->key, + CURL_ZERO_TERMINATED); + curl_mime_name(part, + keyValuePair->value); + } + } + curl_easy_setopt(handle, CURLOPT_MIMEPOST, mime); + } + + list_ForEach(listEntry, headerParameters) { + keyValuePair_t *keyValuePair = listEntry->data; + if((keyValuePair->key != NULL) && + (keyValuePair->value != NULL) ) + { + char *headerValueToWrite = + assembleHeaderField( + keyValuePair->key, + keyValuePair->value); + curl_slist_append(headers, headerValueToWrite); + free(headerValueToWrite); + } + } // this would only be generated for apiKey authentication #ifdef API_KEY - listEntry_t *listEntry; list_ForEach(listEntry, apiClient->apiKeys) { - apiKey_t *apiKey = listEntry->data; + keyValuePair_t *apiKey = listEntry->data; if((apiKey->key != NULL) && (apiKey->value != NULL) ) { - char *headerValueToWrite = assembleHeader( - apiKey->key, - apiKey->value); + char *headerValueToWrite = + assembleHeaderField( + apiKey->key, + apiKey->value); curl_slist_append(headers, headerValueToWrite); free(headerValueToWrite); } @@ -99,7 +192,8 @@ void apiClient_invoke(apiClient_t *apiClient, char *targetUrl = assembleTargetUrl(apiClient->basePath, operationName, - operationParameter); + operationParameter, + queryParameters); curl_easy_setopt(handle, CURLOPT_URL, targetUrl); curl_easy_setopt(handle, @@ -148,8 +242,8 @@ void apiClient_invoke(apiClient_t *apiClient, #endif // BASIC_AUTH - if(dataToPost != NULL) { - postData(handle, dataToPost); + if(bodyParameters != NULL) { + postData(handle, bodyParameters); } res = curl_easy_perform(handle); @@ -170,6 +264,9 @@ void apiClient_invoke(apiClient_t *apiClient, } #endif // BASIC_AUTH curl_easy_cleanup(handle); + if(formParameters != NULL) { + curl_mime_free(mime); + } } } diff --git a/samples/client/petstore/c/src/apiKey.c b/samples/client/petstore/c/src/apiKey.c index 6bb2b8daec6..f6231130487 100644 --- a/samples/client/petstore/c/src/apiKey.c +++ b/samples/client/petstore/c/src/apiKey.c @@ -1,14 +1,14 @@ #include -#include "apiKey.h" +#include "keyValuePair.h" -apiKey_t *apiKey_create(char *key, char *value) { - apiKey_t *apiKey = malloc(sizeof(apiKey_t)); - apiKey->key = key; - apiKey->value = value; +keyValuePair_t *keyValuePair_create(char *key, char *value) { + keyValuePair_t *keyValuePair = malloc(sizeof(keyValuePair_t)); + keyValuePair->key = key; + keyValuePair->value = value; - return apiKey; + return keyValuePair; } -void apiKey_free(apiKey_t *apiKey) { - free(apiKey); +void keyValuePair_free(keyValuePair_t *keyValuePair) { + free(keyValuePair); } \ No newline at end of file diff --git a/samples/client/petstore/c/unit-tests/apiKey.c b/samples/client/petstore/c/unit-tests/apiKey.c index f2ea1b2bdfd..7cef9194511 100644 --- a/samples/client/petstore/c/unit-tests/apiKey.c +++ b/samples/client/petstore/c/unit-tests/apiKey.c @@ -1,6 +1,6 @@ -#include "apiKey.h" +#include "keyValuePair.h" int main() { - apiKey_t *apiKey = apiKey_create("key", "value"); - apiKey_free(apiKey); + keyValuePair_t *keyValuePair = keyValuePair_create("key", "value"); + keyValuePair_free(keyValuePair); } \ No newline at end of file diff --git a/samples/client/petstore/c/unit-tests/test-api-client-parameters.c b/samples/client/petstore/c/unit-tests/test-api-client-parameters.c new file mode 100644 index 00000000000..869989d7dc2 --- /dev/null +++ b/samples/client/petstore/c/unit-tests/test-api-client-parameters.c @@ -0,0 +1,68 @@ +#include +#include +#include +#include +#include "apiClient.h" +#include "list.h" +#include "keyValuePair.h" + +#define EXAMPLE_BASE_PATH "localhost" +#define EXAMPLE_OPERATION_NAME "pets" +#define OPERATION_PARAMETER "5" +#define EXAMPLE_KEY_1 "skin color" +#define EXAMPLE_VALUE_1 "red" +#define EXAMPLE_KEY_2 "legs" +#define EXAMPLE_VALUE_2 "4" + +#define OUTPUT_URL_1 "localhost/pets/5?skin+color=red" +#define OUTPUT_URL_2 "localhost/pets/5?skin+color=red&legs=4" + +char *assembleTargetUrl(char *basePath, + char *operationName, + char *operationParameter, + list_t *queryParameters); + +int main() { + char *keyOne = malloc(strlen(EXAMPLE_KEY_1) + 1); + char *valueOne = malloc(strlen(EXAMPLE_VALUE_1) + 1); + + strcpy(keyOne, EXAMPLE_KEY_1); + strcpy(valueOne, EXAMPLE_VALUE_1); + + keyValuePair_t *keyValuePairOne = keyValuePair_create(keyOne, valueOne); + list_t *list = list_create(); + list_addElement(list, keyValuePairOne); + + char *exampleUrlOne = assembleTargetUrl(EXAMPLE_BASE_PATH, + EXAMPLE_OPERATION_NAME, + OPERATION_PARAMETER, + list); + + assert(strcmp(exampleUrlOne, OUTPUT_URL_1) == 0); + + char *keyTwo = malloc(strlen(EXAMPLE_KEY_2) + 1); + char *valueTwo = malloc(strlen(EXAMPLE_VALUE_2) + 1); + + strcpy(keyTwo, EXAMPLE_KEY_2); + strcpy(valueTwo, EXAMPLE_VALUE_2); + + keyValuePair_t *keyValuePairTwo = keyValuePair_create(keyTwo, valueTwo); + list_addElement(list, keyValuePairTwo); + + char *exampleUrlTwo = assembleTargetUrl(EXAMPLE_BASE_PATH, + EXAMPLE_OPERATION_NAME, + OPERATION_PARAMETER, + list); + + assert(strcmp(exampleUrlTwo, OUTPUT_URL_2) == 0); + + free(keyOne); + free(keyTwo); + free(valueOne); + free(valueTwo); + free(exampleUrlOne); + free(exampleUrlTwo); + keyValuePair_free(keyValuePairOne); + keyValuePair_free(keyValuePairTwo); + list_free(list); +} \ No newline at end of file diff --git a/samples/client/petstore/c/unit-tests/test-api-client.c b/samples/client/petstore/c/unit-tests/test-api-client.c index 161cbaf3e5a..c63dbf358f0 100644 --- a/samples/client/petstore/c/unit-tests/test-api-client.c +++ b/samples/client/petstore/c/unit-tests/test-api-client.c @@ -1,18 +1,21 @@ #include +#include #include "apiClient.h" #include "cJSON.h" #include "pet.h" -#ifdef API_KEY #include "list.h" -#include "apiKey.h" -#endif // API_KEY +#include "keyValuePair.h" #ifdef DEBUG #include #endif // DEBUG #define EXAMPLE_OPERATION_NAME "pet" -#define EXAMPLE_OPERATION_PARAMETER "3" +#define EXAMPLE_OPERATION_PARAMETER "5" +#define EXAMPLE_KEYNAME_1 "MyExampleKey" +#define EXAMPLE_VALUENAME_1 "MyExampleValue" +#define EXAMPLE_KEYNAME_2 "MyExampleKeyTwo" +#define EXAMPLE_VALUENAME_2 "MyExampleValueTwo" int main() { apiClient_t *apiClient = apiClient_create(); @@ -21,13 +24,36 @@ int main() { #endif // OAUTH2 #ifdef API_KEY apiClient->apiKeys = list_create(); - apiKey_t *apiKey = apiKey_create("X-API-Key", "abcdef12345"); + keyValuePair_t *apiKey = apiKey_create("X-API-Key", "abcdef12345"); list_addElement(apiClient->apiKeys, apiKey); #endif // API_KEY + list_t *customHeaderFields = list_create(); + char *keyOne = malloc(strlen(EXAMPLE_KEYNAME_1) + 1); + char *valueOne = malloc(strlen(EXAMPLE_VALUENAME_1) + 1); + strcpy(keyOne, EXAMPLE_KEYNAME_1); + strcpy(valueOne, EXAMPLE_VALUENAME_1); + + char *keyTwo = malloc(strlen(EXAMPLE_KEYNAME_2) + 1); + char *valueTwo = malloc(strlen(EXAMPLE_VALUENAME_2) + 1); + strcpy(keyTwo, EXAMPLE_KEYNAME_2); + strcpy(valueTwo, EXAMPLE_VALUENAME_2); + + keyValuePair_t *firstCustomField = + keyValuePair_create(keyOne, valueOne); + keyValuePair_t *secondCustomField = + keyValuePair_create(keyTwo, valueTwo); + + list_addElement(customHeaderFields, firstCustomField); + list_addElement(customHeaderFields, secondCustomField); + apiClient_invoke(apiClient, EXAMPLE_OPERATION_NAME, EXAMPLE_OPERATION_PARAMETER, + NULL, + customHeaderFields, + NULL, + NULL, NULL); pet_t *pet = pet_parseFromJSON(apiClient->dataReceived); if(pet == NULL) { @@ -49,7 +75,13 @@ int main() { free(apiKey); list_free(apiClient->apiKeys); #endif // API_KEY - + free(keyOne); + free(valueOne); + free(keyTwo); + free(valueTwo); + keyValuePair_free(firstCustomField); + keyValuePair_free(secondCustomField); + list_free(customHeaderFields); apiClient_free(apiClient); pet_free(pet); } \ No newline at end of file diff --git a/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION b/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION index 0628777500b..dde25ef08e8 100644 --- a/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION +++ b/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION @@ -1 +1 @@ -3.1.0-SNAPSHOT \ No newline at end of file +3.1.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml index d8726d724fd..1843427a4fc 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml @@ -1008,12 +1008,12 @@ paths: additionalMetadata: description: Additional data to pass to server type: string - file: + requiredFile: description: file to upload format: binary type: string required: - - file + - requiredFile required: true responses: 200: @@ -1507,6 +1507,7 @@ components: $ref: '#/components/schemas/Animal' type: array File: + description: Must be named `File` for test. example: sourceURI: sourceURI properties: diff --git a/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go b/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go index b9676e5e8bc..947356f0b8c 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore import ( @@ -34,9 +35,10 @@ To test special tags func (a *AnotherFakeApiService) TestSpecialTags(ctx context.Context, client Client) (Client, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Patch") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte localVarReturnValue Client ) @@ -66,7 +68,7 @@ func (a *AnotherFakeApiService) TestSpecialTags(ctx context.Context, client Clie } // body params localVarPostBody = &client - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } diff --git a/samples/client/petstore/go/go-petstore-withXml/api_fake.go b/samples/client/petstore/go/go-petstore-withXml/api_fake.go index 52536427dad..5802c0ab477 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_fake.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_fake.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore import ( @@ -42,9 +43,10 @@ type FakeOuterBooleanSerializeOpts struct { func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte localVarReturnValue bool ) @@ -77,7 +79,7 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVar localVarPostBody = localVarOptionals.Body.Value() } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } @@ -138,9 +140,10 @@ type FakeOuterCompositeSerializeOpts struct { func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte localVarReturnValue OuterComposite ) @@ -177,7 +180,7 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localV localVarPostBody = &localVarOptionalOuterComposite } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } @@ -238,9 +241,10 @@ type FakeOuterNumberSerializeOpts struct { func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte localVarReturnValue float32 ) @@ -273,7 +277,7 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context, localVarO localVarPostBody = localVarOptionals.Body.Value() } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } @@ -334,9 +338,10 @@ type FakeOuterStringSerializeOpts struct { func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte localVarReturnValue string ) @@ -369,7 +374,7 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context, localVarO localVarPostBody = localVarOptionals.Body.Value() } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } @@ -423,9 +428,10 @@ For this test, the body for this request much reference a schema named `Fil func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context, fileSchemaTestClass FileSchemaTestClass) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte ) // create path and map variables @@ -454,7 +460,7 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context, fileSchemaT } // body params localVarPostBody = &fileSchemaTestClass - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } @@ -490,9 +496,10 @@ FakeApiService func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context, query string, user User) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte ) // create path and map variables @@ -522,7 +529,7 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context, query stri } // body params localVarPostBody = &user - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } @@ -559,9 +566,10 @@ To test \"client\" model func (a *FakeApiService) TestClientModel(ctx context.Context, client Client) (Client, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Patch") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte localVarReturnValue Client ) @@ -591,7 +599,7 @@ func (a *FakeApiService) TestClientModel(ctx context.Context, client Client) (Cl } // body params localVarPostBody = &client - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } @@ -673,9 +681,10 @@ type TestEndpointParametersOpts struct { func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte ) // create path and map variables @@ -733,6 +742,7 @@ func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number floa } localVarFormParams.Add("pattern_without_delimiter", parameterToString(patternWithoutDelimiter, "")) localVarFormParams.Add("byte", parameterToString(byte_, "")) + localVarFormFileName = "binary" var localVarFile *os.File if localVarOptionals != nil && localVarOptionals.Binary.IsSet() { localVarFileOk := false @@ -759,7 +769,7 @@ func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number floa if localVarOptionals != nil && localVarOptionals.Callback.IsSet() { localVarFormParams.Add("callback", parameterToString(localVarOptionals.Callback.Value(), "")) } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } @@ -815,9 +825,10 @@ type TestEnumParametersOpts struct { func (a *FakeApiService) TestEnumParameters(ctx context.Context, localVarOptionals *TestEnumParametersOpts) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte ) // create path and map variables @@ -868,7 +879,7 @@ func (a *FakeApiService) TestEnumParameters(ctx context.Context, localVarOptiona if localVarOptionals != nil && localVarOptionals.EnumFormString.IsSet() { localVarFormParams.Add("enum_form_string", parameterToString(localVarOptionals.EnumFormString.Value(), "")) } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } @@ -903,9 +914,10 @@ FakeApiService test inline additionalProperties func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context, requestBody map[string]string) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte ) // create path and map variables @@ -934,7 +946,7 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context, req } // body params localVarPostBody = &requestBody - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } @@ -970,9 +982,10 @@ FakeApiService test json serialization of form data func (a *FakeApiService) TestJsonFormData(ctx context.Context, param string, param2 string) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte ) // create path and map variables @@ -1001,7 +1014,7 @@ func (a *FakeApiService) TestJsonFormData(ctx context.Context, param string, par } localVarFormParams.Add("param", parameterToString(param, "")) localVarFormParams.Add("param2", parameterToString(param2, "")) - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } diff --git a/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go b/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go index 78a0effb2b0..b2748822bb8 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore import ( @@ -34,9 +35,10 @@ To test class name in snake case func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, client Client) (Client, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Patch") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte localVarReturnValue Client ) @@ -79,7 +81,7 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, clie } } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } diff --git a/samples/client/petstore/go/go-petstore-withXml/api_pet.go b/samples/client/petstore/go/go-petstore-withXml/api_pet.go index 9c933feeb54..2a7fc7f0172 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_pet.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_pet.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore import ( @@ -35,9 +36,10 @@ PetApiService Add a new pet to the store func (a *PetApiService) AddPet(ctx context.Context, pet Pet) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte ) // create path and map variables @@ -66,7 +68,7 @@ func (a *PetApiService) AddPet(ctx context.Context, pet Pet) (*http.Response, er } // body params localVarPostBody = &pet - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } @@ -108,9 +110,10 @@ type DeletePetOpts struct { func (a *PetApiService) DeletePet(ctx context.Context, petId int64, localVarOptionals *DeletePetOpts) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Delete") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte ) // create path and map variables @@ -141,7 +144,7 @@ func (a *PetApiService) DeletePet(ctx context.Context, petId int64, localVarOpti if localVarOptionals != nil && localVarOptionals.ApiKey.IsSet() { localVarHeaderParams["api_key"] = parameterToString(localVarOptionals.ApiKey.Value(), "") } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } @@ -178,9 +181,10 @@ Multiple status values can be provided with comma separated strings func (a *PetApiService) FindPetsByStatus(ctx context.Context, status []string) ([]Pet, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte localVarReturnValue []Pet ) @@ -209,7 +213,7 @@ func (a *PetApiService) FindPetsByStatus(ctx context.Context, status []string) ( if localVarHttpHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } @@ -264,9 +268,10 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 func (a *PetApiService) FindPetsByTags(ctx context.Context, tags []string) ([]Pet, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte localVarReturnValue []Pet ) @@ -295,7 +300,7 @@ func (a *PetApiService) FindPetsByTags(ctx context.Context, tags []string) ([]Pe if localVarHttpHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } @@ -350,9 +355,10 @@ Returns a single pet func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte localVarReturnValue Pet ) @@ -394,7 +400,7 @@ func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http } } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } @@ -447,9 +453,10 @@ PetApiService Update an existing pet func (a *PetApiService) UpdatePet(ctx context.Context, pet Pet) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte ) // create path and map variables @@ -478,7 +485,7 @@ func (a *PetApiService) UpdatePet(ctx context.Context, pet Pet) (*http.Response, } // body params localVarPostBody = &pet - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } @@ -522,9 +529,10 @@ type UpdatePetWithFormOpts struct { func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte ) // create path and map variables @@ -558,7 +566,7 @@ func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, loca if localVarOptionals != nil && localVarOptionals.Status.IsSet() { localVarFormParams.Add("status", parameterToString(localVarOptionals.Status.Value(), "")) } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } @@ -603,9 +611,10 @@ type UploadFileOpts struct { func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte localVarReturnValue ApiResponse ) @@ -637,6 +646,7 @@ func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOpt if localVarOptionals != nil && localVarOptionals.AdditionalMetadata.IsSet() { localVarFormParams.Add("additionalMetadata", parameterToString(localVarOptionals.AdditionalMetadata.Value(), "")) } + localVarFormFileName = "file" var localVarFile *os.File if localVarOptionals != nil && localVarOptionals.File.IsSet() { localVarFileOk := false @@ -651,7 +661,7 @@ func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOpt localVarFileName = localVarFile.Name() localVarFile.Close() } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } @@ -700,7 +710,7 @@ func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOpt PetApiService uploads an image (required) * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param petId ID of pet to update - * @param file file to upload + * @param requiredFile file to upload * @param optional nil or *UploadFileWithRequiredFileOpts - Optional Parameters: * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server @return ApiResponse @@ -710,12 +720,13 @@ type UploadFileWithRequiredFileOpts struct { AdditionalMetadata optional.String } -func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64, file *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *http.Response, error) { +func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte localVarReturnValue ApiResponse ) @@ -747,14 +758,15 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId in if localVarOptionals != nil && localVarOptionals.AdditionalMetadata.IsSet() { localVarFormParams.Add("additionalMetadata", parameterToString(localVarOptionals.AdditionalMetadata.Value(), "")) } - localVarFile := file + localVarFormFileName = "requiredFile" + localVarFile := requiredFile if localVarFile != nil { fbs, _ := ioutil.ReadAll(localVarFile) localVarFileBytes = fbs localVarFileName = localVarFile.Name() localVarFile.Close() } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } diff --git a/samples/client/petstore/go/go-petstore-withXml/api_store.go b/samples/client/petstore/go/go-petstore-withXml/api_store.go index e628e134281..37bfbd9d1e6 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_store.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_store.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore import ( @@ -34,9 +35,10 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Delete") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte ) // create path and map variables @@ -64,7 +66,7 @@ func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (*htt if localVarHttpHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } @@ -100,9 +102,10 @@ Returns a map of status codes to quantities func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte localVarReturnValue map[string]int32 ) @@ -143,7 +146,7 @@ func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, * } } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } @@ -198,9 +201,10 @@ For valid response try integer IDs with value <= 5 or > 10. Other val func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Order, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte localVarReturnValue Order ) @@ -235,7 +239,7 @@ func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Orde if localVarHttpHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } @@ -289,9 +293,10 @@ StoreApiService Place an order for a pet func (a *StoreApiService) PlaceOrder(ctx context.Context, order Order) (Order, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte localVarReturnValue Order ) @@ -321,7 +326,7 @@ func (a *StoreApiService) PlaceOrder(ctx context.Context, order Order) (Order, * } // body params localVarPostBody = &order - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } diff --git a/samples/client/petstore/go/go-petstore-withXml/api_user.go b/samples/client/petstore/go/go-petstore-withXml/api_user.go index c24eeacc702..5fb7bae8892 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_user.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_user.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore import ( @@ -34,9 +35,10 @@ This can only be done by the logged in user. func (a *UserApiService) CreateUser(ctx context.Context, user User) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte ) // create path and map variables @@ -65,7 +67,7 @@ func (a *UserApiService) CreateUser(ctx context.Context, user User) (*http.Respo } // body params localVarPostBody = &user - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } @@ -100,9 +102,10 @@ UserApiService Creates list of users with given input array func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context, user []User) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte ) // create path and map variables @@ -131,7 +134,7 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context, user []U } // body params localVarPostBody = &user - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } @@ -166,9 +169,10 @@ UserApiService Creates list of users with given input array func (a *UserApiService) CreateUsersWithListInput(ctx context.Context, user []User) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte ) // create path and map variables @@ -197,7 +201,7 @@ func (a *UserApiService) CreateUsersWithListInput(ctx context.Context, user []Us } // body params localVarPostBody = &user - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } @@ -233,9 +237,10 @@ This can only be done by the logged in user. func (a *UserApiService) DeleteUser(ctx context.Context, username string) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Delete") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte ) // create path and map variables @@ -263,7 +268,7 @@ func (a *UserApiService) DeleteUser(ctx context.Context, username string) (*http if localVarHttpHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } @@ -299,9 +304,10 @@ UserApiService Get user by user name func (a *UserApiService) GetUserByName(ctx context.Context, username string) (User, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte localVarReturnValue User ) @@ -330,7 +336,7 @@ func (a *UserApiService) GetUserByName(ctx context.Context, username string) (Us if localVarHttpHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } @@ -385,9 +391,10 @@ UserApiService Logs user into the system func (a *UserApiService) LoginUser(ctx context.Context, username string, password string) (string, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte localVarReturnValue string ) @@ -417,7 +424,7 @@ func (a *UserApiService) LoginUser(ctx context.Context, username string, passwor if localVarHttpHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } @@ -469,9 +476,10 @@ UserApiService Logs out current logged in user session func (a *UserApiService) LogoutUser(ctx context.Context) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte ) // create path and map variables @@ -498,7 +506,7 @@ func (a *UserApiService) LogoutUser(ctx context.Context) (*http.Response, error) if localVarHttpHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } @@ -535,9 +543,10 @@ This can only be done by the logged in user. func (a *UserApiService) UpdateUser(ctx context.Context, username string, user User) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte ) // create path and map variables @@ -567,7 +576,7 @@ func (a *UserApiService) UpdateUser(ctx context.Context, username string, user U } // body params localVarPostBody = &user - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } diff --git a/samples/client/petstore/go/go-petstore-withXml/client.go b/samples/client/petstore/go/go-petstore-withXml/client.go index c3908518e9e..7f6ae237a71 100644 --- a/samples/client/petstore/go/go-petstore-withXml/client.go +++ b/samples/client/petstore/go/go-petstore-withXml/client.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore import ( @@ -153,6 +154,8 @@ func parameterToString(obj interface{}, collectionFormat string) string { if reflect.TypeOf(obj).Kind() == reflect.Slice { return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") + } else if t, ok := obj.(time.Time); ok { + return t.Format(time.RFC3339) } return fmt.Sprintf("%v", obj) @@ -176,6 +179,7 @@ func (c *APIClient) prepareRequest( headerParams map[string]string, queryParams url.Values, formParams url.Values, + formFileName string, fileName string, fileBytes []byte) (localVarRequest *http.Request, err error) { @@ -218,7 +222,7 @@ func (c *APIClient) prepareRequest( if len(fileBytes) > 0 && fileName != "" { w.Boundary() //_, fileNm := filepath.Split(fileName) - part, err := w.CreateFormFile("file", filepath.Base(fileName)) + part, err := w.CreateFormFile(formFileName, filepath.Base(fileName)) if err != nil { return nil, err } @@ -438,8 +442,9 @@ func CacheExpires(r *http.Response) time.Time { lifetime, err := time.ParseDuration(maxAge + "s") if err != nil { expires = now + } else { + expires = now.Add(lifetime) } - expires = now.Add(lifetime) } else { expiresHeader := r.Header.Get("Expires") if expiresHeader != "" { diff --git a/samples/client/petstore/go/go-petstore-withXml/configuration.go b/samples/client/petstore/go/go-petstore-withXml/configuration.go index 19ccc325fa9..3819712b071 100644 --- a/samples/client/petstore/go/go-petstore-withXml/configuration.go +++ b/samples/client/petstore/go/go-petstore-withXml/configuration.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore import ( diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md index 327cc1739cd..481ce5e80e5 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md @@ -259,7 +259,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile(ctx, petId, file, optional) +> ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional) uploads an image (required) ### Required Parameters @@ -268,7 +268,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **petId** | **int64**| ID of pet to update | - **file** | ***os.File*****os.File**| file to upload | + **requiredFile** | ***os.File*****os.File**| file to upload | **optional** | ***UploadFileWithRequiredFileOpts** | optional parameters | nil if no parameters ### Optional Parameters diff --git a/samples/client/petstore/go/go-petstore-withXml/model_200_response.go b/samples/client/petstore/go/go-petstore-withXml/model_200_response.go index ee0b7ff8279..c595db80775 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_200_response.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_200_response.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore // Model for testing model name starting with number diff --git a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go index e5e0dc313d9..afa3de3d955 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type AdditionalPropertiesClass struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_animal.go b/samples/client/petstore/go/go-petstore-withXml/model_animal.go index 7963f947355..69c91c1b357 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_animal.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_animal.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type Animal struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_animal_farm.go b/samples/client/petstore/go/go-petstore-withXml/model_animal_farm.go index e3ff77813ee..a6631942e3e 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_animal_farm.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_animal_farm.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type AnimalFarm struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_api_response.go b/samples/client/petstore/go/go-petstore-withXml/model_api_response.go index 7e312fda72d..9f617359fd8 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_api_response.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_api_response.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type ApiResponse struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_array_of_array_of_number_only.go b/samples/client/petstore/go/go-petstore-withXml/model_array_of_array_of_number_only.go index 38eeea64102..ed5167ff2d5 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_array_of_array_of_number_only.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_array_of_array_of_number_only.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type ArrayOfArrayOfNumberOnly struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_array_of_number_only.go b/samples/client/petstore/go/go-petstore-withXml/model_array_of_number_only.go index a0ad11daa3b..1c23a80552a 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_array_of_number_only.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_array_of_number_only.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type ArrayOfNumberOnly struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_array_test_.go b/samples/client/petstore/go/go-petstore-withXml/model_array_test_.go index a8a09bcad95..3a0f7178d2b 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_array_test_.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_array_test_.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type ArrayTest struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_capitalization.go b/samples/client/petstore/go/go-petstore-withXml/model_capitalization.go index 1b0d12cc5bd..66c5fc6c148 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_capitalization.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_capitalization.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type Capitalization struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_cat.go b/samples/client/petstore/go/go-petstore-withXml/model_cat.go index dfbfc92f7b4..f59648881a6 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_cat.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_cat.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type Cat struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_category.go b/samples/client/petstore/go/go-petstore-withXml/model_category.go index 10b89f3d7ed..2da34c43a24 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_category.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_category.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type Category struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_class_model.go b/samples/client/petstore/go/go-petstore-withXml/model_class_model.go index cc17f5274bb..8c7a002dd35 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_class_model.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_class_model.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore // Model for testing model with \"_class\" property diff --git a/samples/client/petstore/go/go-petstore-withXml/model_client.go b/samples/client/petstore/go/go-petstore-withXml/model_client.go index d6fcafc8675..e41f7052af0 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_client.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_client.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type Client struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_dog.go b/samples/client/petstore/go/go-petstore-withXml/model_dog.go index c65af492573..8191c278bb6 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_dog.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_dog.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type Dog struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_enum_arrays.go b/samples/client/petstore/go/go-petstore-withXml/model_enum_arrays.go index d352a219d51..f4c7e5495cc 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_enum_arrays.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_enum_arrays.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type EnumArrays struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_enum_class.go b/samples/client/petstore/go/go-petstore-withXml/model_enum_class.go index 534ce432881..9d3dd60a946 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_enum_class.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_enum_class.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type EnumClass string diff --git a/samples/client/petstore/go/go-petstore-withXml/model_enum_test_.go b/samples/client/petstore/go/go-petstore-withXml/model_enum_test_.go index a9e3f2555b1..02c6c920c31 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_enum_test_.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_enum_test_.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type EnumTest struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_file.go b/samples/client/petstore/go/go-petstore-withXml/model_file.go index 8b8123b47af..f1d827d1e72 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_file.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_file.go @@ -4,11 +4,13 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore +// Must be named `File` for test. type File struct { // Test capitalization SourceURI string `json:"sourceURI,omitempty" xml:"sourceURI"` diff --git a/samples/client/petstore/go/go-petstore-withXml/model_file_schema_test_class.go b/samples/client/petstore/go/go-petstore-withXml/model_file_schema_test_class.go index 1c30a21fd46..6debdd3639b 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_file_schema_test_class.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_file_schema_test_class.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type FileSchemaTestClass struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_format_test_.go b/samples/client/petstore/go/go-petstore-withXml/model_format_test_.go index 9bfa6008c25..dbd780a794e 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_format_test_.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_format_test_.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore import ( "os" diff --git a/samples/client/petstore/go/go-petstore-withXml/model_has_only_read_only.go b/samples/client/petstore/go/go-petstore-withXml/model_has_only_read_only.go index 852b01c849e..15edfc4349a 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_has_only_read_only.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_has_only_read_only.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type HasOnlyReadOnly struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_list.go b/samples/client/petstore/go/go-petstore-withXml/model_list.go index 782133b35c6..86b6d67a5fd 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_list.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_list.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type List struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_map_test_.go b/samples/client/petstore/go/go-petstore-withXml/model_map_test_.go index d8b5f96c423..a15240d0d76 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_map_test_.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_map_test_.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type MapTest struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_mixed_properties_and_additional_properties_class.go b/samples/client/petstore/go/go-petstore-withXml/model_mixed_properties_and_additional_properties_class.go index 5ec5eea193f..099ebd1c28a 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_mixed_properties_and_additional_properties_class.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_mixed_properties_and_additional_properties_class.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore import ( "time" diff --git a/samples/client/petstore/go/go-petstore-withXml/model_name.go b/samples/client/petstore/go/go-petstore-withXml/model_name.go index 0ff30773cd1..684f282beb7 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_name.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_name.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore // Model for testing model name same as property name diff --git a/samples/client/petstore/go/go-petstore-withXml/model_number_only.go b/samples/client/petstore/go/go-petstore-withXml/model_number_only.go index 51113b205b6..9148cddf4ae 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_number_only.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_number_only.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type NumberOnly struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_order.go b/samples/client/petstore/go/go-petstore-withXml/model_order.go index dd4c290a4e4..c4a731b72ca 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_order.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_order.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore import ( "time" diff --git a/samples/client/petstore/go/go-petstore-withXml/model_outer_composite.go b/samples/client/petstore/go/go-petstore-withXml/model_outer_composite.go index f502c5af53b..0a6cc434b97 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_outer_composite.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_outer_composite.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type OuterComposite struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_outer_enum.go b/samples/client/petstore/go/go-petstore-withXml/model_outer_enum.go index 903d31e8269..c6b28556bf2 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_outer_enum.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_outer_enum.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type OuterEnum string diff --git a/samples/client/petstore/go/go-petstore-withXml/model_pet.go b/samples/client/petstore/go/go-petstore-withXml/model_pet.go index ca15bb5e8a2..eb0d4085f77 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_pet.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_pet.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type Pet struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_read_only_first.go b/samples/client/petstore/go/go-petstore-withXml/model_read_only_first.go index 5cf4987f039..47da7a75c83 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_read_only_first.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_read_only_first.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type ReadOnlyFirst struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_return.go b/samples/client/petstore/go/go-petstore-withXml/model_return.go index 407b840f754..7ec34d521ed 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_return.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_return.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore // Model for testing reserved words diff --git a/samples/client/petstore/go/go-petstore-withXml/model_special_model_name.go b/samples/client/petstore/go/go-petstore-withXml/model_special_model_name.go index d4940064a09..be2037eb681 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_special_model_name.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_special_model_name.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type SpecialModelName struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_string_boolean_map.go b/samples/client/petstore/go/go-petstore-withXml/model_string_boolean_map.go index 7cc08c7e895..35c10ad518f 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_string_boolean_map.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_string_boolean_map.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type StringBooleanMap struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_tag.go b/samples/client/petstore/go/go-petstore-withXml/model_tag.go index 940f70e4e3a..fb2232a6bf4 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_tag.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_tag.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type Tag struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/model_user.go b/samples/client/petstore/go/go-petstore-withXml/model_user.go index 1f0a09f34fc..27f1f67e427 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_user.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_user.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore type User struct { diff --git a/samples/client/petstore/go/go-petstore-withXml/response.go b/samples/client/petstore/go/go-petstore-withXml/response.go index 38f373df75e..44caa48b0fd 100644 --- a/samples/client/petstore/go/go-petstore-withXml/response.go +++ b/samples/client/petstore/go/go-petstore-withXml/response.go @@ -4,9 +4,10 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + package petstore import ( diff --git a/samples/client/petstore/java/resteasy/build.gradle b/samples/client/petstore/java/resteasy/build.gradle index d2f9ff5b15b..86e77bee641 100644 --- a/samples/client/petstore/java/resteasy/build.gradle +++ b/samples/client/petstore/java/resteasy/build.gradle @@ -93,8 +93,9 @@ if(hasProperty('target') && target == 'android') { } ext { - swagger_annotations_version = "1.5.8" - jackson_version = "2.6.4" + swagger_annotations_version = "1.5.18" + jackson_version = "2.8.6" + threetenbp_version = "2.6.4" jersey_version = "2.22.2" resteasy_version = "3.1.3.Final" jodatime_version = "2.9.4" @@ -112,7 +113,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version" - compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_version" + compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$threetenbp_version" compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" compile "joda-time:joda-time:$jodatime_version" compile "com.brsanthu:migbase64:2.2" diff --git a/samples/client/petstore/java/resteasy/build.sbt b/samples/client/petstore/java/resteasy/build.sbt index fb8f636d356..166b7b91f8a 100644 --- a/samples/client/petstore/java/resteasy/build.sbt +++ b/samples/client/petstore/java/resteasy/build.sbt @@ -9,13 +9,17 @@ lazy val root = (project in file(".")). publishArtifact in (Compile, packageDoc) := false, resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( - "io.swagger" % "swagger-annotations" % "1.5.8", + "io.swagger" % "swagger-annotations" % "1.5.18", "org.glassfish.jersey.core" % "jersey-client" % "2.22.2", "org.glassfish.jersey.media" % "jersey-media-multipart" % "2.22.2", "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.22.2", - "com.fasterxml.jackson.core" % "jackson-core" % "2.7.5", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.7.5", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.7.5", + "org.jboss.resteasy" % "resteasy-client" % "3.1.3.Final", + "org.jboss.resteasy" % "resteasy-multipart-provider" % "3.1.3.Final", + "org.jboss.resteasy" % "resteasy-jackson2-provider" % "3.1.3.Final", + "com.fasterxml.jackson.core" % "jackson-core" % "2.8.6", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.8.6", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.8.6", + "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.6.4", "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.7.5", "joda-time" % "joda-time" % "2.9.4", "com.brsanthu" % "migbase64" % "2.2", diff --git a/samples/client/petstore/java/resteasy/pom.xml b/samples/client/petstore/java/resteasy/pom.xml index 285ee34865b..ffe295db737 100644 --- a/samples/client/petstore/java/resteasy/pom.xml +++ b/samples/client/petstore/java/resteasy/pom.xml @@ -203,7 +203,7 @@ com.github.joschi.jackson jackson-datatype-threetenbp - ${jackson-version} + ${threetenbp-version} @@ -217,7 +217,8 @@ UTF-8 1.5.18 3.1.3.Final - 2.6.4 + 2.8.6 + 2.6.4 2.9.9 1.0.0 4.12 diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java index 5e80ded364f..b8cbc485421 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java @@ -633,7 +633,7 @@ public class ApiClient { for (Entry defaultHeaderEnrty: defaultHeaderMap.entrySet()) { if (!headerParams.containsKey(defaultHeaderEnrty.getKey())) { - String value = defaultHeaderEnrty.getKey(); + String value = defaultHeaderEnrty.getValue(); if (value != null) { invocationBuilder = invocationBuilder.header(defaultHeaderEnrty.getKey(), value); } diff --git a/samples/client/petstore/typescript-fetch/builds/default/api.ts b/samples/client/petstore/typescript-fetch/builds/default/api.ts index b1af2421c62..d3a2eaade1d 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/api.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/api.ts @@ -55,7 +55,7 @@ export interface FetchArgs { * @class BaseAPI */ export class BaseAPI { - protected configuration: Configuration; + protected configuration: Configuration | undefined; constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected fetch: FetchAPI = portableFetch) { if (configuration) { @@ -72,7 +72,7 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: "RequiredError" + name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); } @@ -178,9 +178,9 @@ export namespace Order { * @enum {string} */ export enum StatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' + Placed = 'placed', + Approved = 'approved', + Delivered = 'delivered' } } @@ -238,9 +238,9 @@ export namespace Pet { * @enum {string} */ export enum StatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' + Available = 'available', + Pending = 'pending', + Sold = 'sold' } } diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/api.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/api.ts index b1af2421c62..d3a2eaade1d 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/api.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/api.ts @@ -55,7 +55,7 @@ export interface FetchArgs { * @class BaseAPI */ export class BaseAPI { - protected configuration: Configuration; + protected configuration: Configuration | undefined; constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected fetch: FetchAPI = portableFetch) { if (configuration) { @@ -72,7 +72,7 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: "RequiredError" + name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); } @@ -178,9 +178,9 @@ export namespace Order { * @enum {string} */ export enum StatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' + Placed = 'placed', + Approved = 'approved', + Delivered = 'delivered' } } @@ -238,9 +238,9 @@ export namespace Pet { * @enum {string} */ export enum StatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' + Available = 'available', + Pending = 'pending', + Sold = 'sold' } } diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/package-lock.json b/samples/client/petstore/typescript-fetch/builds/es6-target/package-lock.json deleted file mode 100644 index 95dd1432a88..00000000000 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/package-lock.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "@swagger/typescript-fetch-petstore", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@types/node": { - "version": "8.10.19", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.19.tgz", - "integrity": "sha512-+PU57o6DtOSx0/algmxgCwWrmCiomwC/K+LPfXonT0tQMbNTjHEqVzwL9dFEhFoPmLFIiSWjRorLH6Z0hJMT+Q==", - "dev": true - }, - "encoding": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", - "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", - "requires": { - "iconv-lite": "~0.4.13" - } - }, - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - }, - "node-fetch": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", - "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", - "requires": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" - } - }, - "portable-fetch": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/portable-fetch/-/portable-fetch-3.0.0.tgz", - "integrity": "sha1-PL9KptvFpXNLQcBBnJJzMTv9mtg=", - "requires": { - "node-fetch": "^1.0.1", - "whatwg-fetch": ">=0.10.0" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "typescript": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.1.tgz", - "integrity": "sha512-h6pM2f/GDchCFlldnriOhs1QHuwbnmj6/v7499eMHqPeW4V2G0elua2eIc2nu8v2NdHV0Gm+tzX83Hr6nUFjQA==", - "dev": true - }, - "whatwg-fetch": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", - "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" - } - } -} diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/package.json b/samples/client/petstore/typescript-fetch/builds/es6-target/package.json index 220573dfd7d..d7147818077 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/package.json +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/package.json @@ -22,7 +22,7 @@ }, "devDependencies": { "@types/node": "^8.0.9", - "typescript": "^2.0" + "typescript": "^2.4" }, "publishConfig":{ "registry":"https://skimdb.npmjs.com/registry" diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/api.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/api.ts index b806c22b2af..ad8e33381c5 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/api.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/api.ts @@ -55,7 +55,7 @@ export interface FetchArgs { * @class BaseAPI */ export class BaseAPI { - protected configuration: Configuration; + protected configuration: Configuration | undefined; constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected fetch: FetchAPI = portableFetch) { if (configuration) { @@ -72,7 +72,7 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: "RequiredError" + name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); } @@ -178,9 +178,9 @@ export namespace Order { * @enum {string} */ export enum StatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' + Placed = 'placed', + Approved = 'approved', + Delivered = 'delivered' } } @@ -238,9 +238,9 @@ export namespace Pet { * @enum {string} */ export enum StatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' + Available = 'available', + Pending = 'pending', + Sold = 'sold' } } diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/api.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/api.ts index b1af2421c62..d3a2eaade1d 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/api.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/api.ts @@ -55,7 +55,7 @@ export interface FetchArgs { * @class BaseAPI */ export class BaseAPI { - protected configuration: Configuration; + protected configuration: Configuration | undefined; constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected fetch: FetchAPI = portableFetch) { if (configuration) { @@ -72,7 +72,7 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: "RequiredError" + name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); } @@ -178,9 +178,9 @@ export namespace Order { * @enum {string} */ export enum StatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' + Placed = 'placed', + Approved = 'approved', + Delivered = 'delivered' } } @@ -238,9 +238,9 @@ export namespace Pet { * @enum {string} */ export enum StatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' + Available = 'available', + Pending = 'pending', + Sold = 'sold' } } diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/package-lock.json b/samples/client/petstore/typescript-fetch/builds/with-npm-version/package-lock.json deleted file mode 100644 index 95dd1432a88..00000000000 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/package-lock.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "@swagger/typescript-fetch-petstore", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@types/node": { - "version": "8.10.19", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.19.tgz", - "integrity": "sha512-+PU57o6DtOSx0/algmxgCwWrmCiomwC/K+LPfXonT0tQMbNTjHEqVzwL9dFEhFoPmLFIiSWjRorLH6Z0hJMT+Q==", - "dev": true - }, - "encoding": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", - "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", - "requires": { - "iconv-lite": "~0.4.13" - } - }, - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - }, - "node-fetch": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", - "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", - "requires": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" - } - }, - "portable-fetch": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/portable-fetch/-/portable-fetch-3.0.0.tgz", - "integrity": "sha1-PL9KptvFpXNLQcBBnJJzMTv9mtg=", - "requires": { - "node-fetch": "^1.0.1", - "whatwg-fetch": ">=0.10.0" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "typescript": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.1.tgz", - "integrity": "sha512-h6pM2f/GDchCFlldnriOhs1QHuwbnmj6/v7499eMHqPeW4V2G0elua2eIc2nu8v2NdHV0Gm+tzX83Hr6nUFjQA==", - "dev": true - }, - "whatwg-fetch": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", - "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" - } - } -} diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/package.json b/samples/client/petstore/typescript-fetch/builds/with-npm-version/package.json index 220573dfd7d..d7147818077 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/package.json +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/package.json @@ -22,7 +22,7 @@ }, "devDependencies": { "@types/node": "^8.0.9", - "typescript": "^2.0" + "typescript": "^2.4" }, "publishConfig":{ "registry":"https://skimdb.npmjs.com/registry" diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/yarn.lock b/samples/client/petstore/typescript-fetch/builds/with-npm-version/yarn.lock deleted file mode 100644 index 097b098c676..00000000000 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/yarn.lock +++ /dev/null @@ -1,47 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@types/isomorphic-fetch@0.0.34": - version "0.0.34" - resolved "https://registry.yarnpkg.com/@types/isomorphic-fetch/-/isomorphic-fetch-0.0.34.tgz#3c3483e606c041378438e951464f00e4e60706d6" - -"@types/node@^8.0.9": - version "8.0.17" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.17.tgz#677bc8c118cfb76013febb62ede1f31d2c7222a1" - -encoding@^0.1.11: - version "0.1.12" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" - dependencies: - iconv-lite "~0.4.13" - -iconv-lite@~0.4.13: - version "0.4.18" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" - -is-stream@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - -isomorphic-fetch@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" - dependencies: - node-fetch "^1.0.1" - whatwg-fetch ">=0.10.0" - -node-fetch@^1.0.1: - version "1.7.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.1.tgz#899cb3d0a3c92f952c47f1b876f4c8aeabd400d5" - dependencies: - encoding "^0.1.11" - is-stream "^1.0.1" - -typescript@^2.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.2.tgz#f8395f85d459276067c988aa41837a8f82870844" - -whatwg-fetch@>=0.10.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" diff --git a/samples/client/petstore/typescript-fetch/tests/default/package-lock.json b/samples/client/petstore/typescript-fetch/tests/default/package-lock.json index 44e99726237..c16f4968148 100644 --- a/samples/client/petstore/typescript-fetch/tests/default/package-lock.json +++ b/samples/client/petstore/typescript-fetch/tests/default/package-lock.json @@ -7,42 +7,49 @@ "@swagger/typescript-fetch-petstore": { "version": "file:../../builds/with-npm-version", "requires": { - "isomorphic-fetch": "2.2.1" + "portable-fetch": "^3.0.0" }, "dependencies": { "encoding": { "version": "0.1.12", "bundled": true, "requires": { - "iconv-lite": "0.4.18" + "iconv-lite": "~0.4.13" } }, "iconv-lite": { - "version": "0.4.18", - "bundled": true + "version": "0.4.23", + "bundled": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } }, "is-stream": { "version": "1.1.0", "bundled": true }, - "isomorphic-fetch": { - "version": "2.2.1", + "node-fetch": { + "version": "1.7.3", "bundled": true, "requires": { - "node-fetch": "1.7.1", - "whatwg-fetch": "2.0.3" + "encoding": "^0.1.11", + "is-stream": "^1.0.1" } }, - "node-fetch": { - "version": "1.7.1", + "portable-fetch": { + "version": "3.0.0", "bundled": true, "requires": { - "encoding": "0.1.12", - "is-stream": "1.1.0" + "node-fetch": "^1.0.1", + "whatwg-fetch": ">=0.10.0" } }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true + }, "whatwg-fetch": { - "version": "2.0.3", + "version": "2.0.4", "bundled": true } } @@ -71,6 +78,16 @@ "integrity": "sha512-VRQB+Q0L3YZWs45uRdpN9oWr82meL/8TrJ6faoKT5tp0uub2l/aRMhtm5fo68h7kjYKH60f9/bay1nF7ZpTW5g==", "dev": true }, + "JSONStream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", + "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", + "dev": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, "abbrev": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", @@ -89,8 +106,8 @@ "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", "dev": true, "requires": { - "extend": "3.0.1", - "semver": "5.0.3" + "extend": "~3.0.0", + "semver": "~5.0.1" }, "dependencies": { "semver": { @@ -107,9 +124,9 @@ "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" } }, "amdefine": { @@ -124,7 +141,7 @@ "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", "dev": true, "requires": { - "string-width": "2.1.1" + "string-width": "^2.0.0" } }, "ansi-escapes": { @@ -144,7 +161,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", "requires": { - "color-convert": "1.9.0" + "color-convert": "^1.9.0" } }, "any-promise": { @@ -159,8 +176,8 @@ "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", "dev": true, "requires": { - "micromatch": "2.3.11", - "normalize-path": "2.1.1" + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" } }, "archy": { @@ -175,7 +192,7 @@ "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "dev": true, "requires": { - "arr-flatten": "1.1.0" + "arr-flatten": "^1.0.1" } }, "arr-flatten": { @@ -225,9 +242,9 @@ "integrity": "sha1-SLokC0WpKA6UdImQull9IWYX/UA=", "dev": true, "requires": { - "bn.js": "4.11.7", - "inherits": "2.0.3", - "minimalistic-assert": "1.0.0" + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" } }, "assert": { @@ -250,7 +267,7 @@ "integrity": "sha1-e9QXhNMkk5h66yOba04cV6hzuRc=", "dev": true, "requires": { - "acorn": "4.0.13" + "acorn": "^4.0.3" } }, "async": { @@ -313,13 +330,13 @@ "integrity": "sha1-DxHn/jRO25OXl3/BPt5/ZNlWSB0=", "dev": true, "requires": { - "ansi-align": "2.0.0", - "camelcase": "4.1.0", - "chalk": "2.0.1", - "cli-boxes": "1.0.0", - "string-width": "2.1.1", - "term-size": "1.2.0", - "widest-line": "1.0.0" + "ansi-align": "^2.0.0", + "camelcase": "^4.0.0", + "chalk": "^2.0.1", + "cli-boxes": "^1.0.0", + "string-width": "^2.0.0", + "term-size": "^1.2.0", + "widest-line": "^1.0.0" } }, "brace-expansion": { @@ -328,7 +345,7 @@ "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -338,9 +355,9 @@ "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", "dev": true, "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" } }, "brorand": { @@ -355,11 +372,11 @@ "integrity": "sha1-+GzWzvT1MAyOY+B6TVEvZfv/RTE=", "dev": true, "requires": { - "combine-source-map": "0.7.2", - "defined": "1.0.0", - "JSONStream": "1.3.1", - "through2": "2.0.3", - "umd": "3.0.1" + "JSONStream": "^1.0.3", + "combine-source-map": "~0.7.1", + "defined": "^1.0.0", + "through2": "^2.0.0", + "umd": "^3.0.0" } }, "browser-resolve": { @@ -391,53 +408,53 @@ "integrity": "sha1-CJo0Y69Y0OSNjNQHCz90ZU1avKk=", "dev": true, "requires": { - "assert": "1.4.1", - "browser-pack": "6.0.2", - "browser-resolve": "1.11.2", - "browserify-zlib": "0.1.4", - "buffer": "5.0.7", - "cached-path-relative": "1.0.1", - "concat-stream": "1.5.2", - "console-browserify": "1.1.0", - "constants-browserify": "1.0.0", - "crypto-browserify": "3.11.1", - "defined": "1.0.0", - "deps-sort": "2.0.0", - "domain-browser": "1.1.7", - "duplexer2": "0.1.4", - "events": "1.1.1", - "glob": "7.1.2", - "has": "1.0.1", - "htmlescape": "1.1.1", - "https-browserify": "1.0.0", - "inherits": "2.0.3", - "insert-module-globals": "7.0.1", - "JSONStream": "1.3.1", - "labeled-stream-splicer": "2.0.0", - "module-deps": "4.1.1", - "os-browserify": "0.1.2", - "parents": "1.0.1", - "path-browserify": "0.0.0", - "process": "0.11.10", - "punycode": "1.4.1", - "querystring-es3": "0.2.1", - "read-only-stream": "2.0.0", - "readable-stream": "2.3.3", - "resolve": "1.4.0", - "shasum": "1.0.2", - "shell-quote": "1.6.1", - "stream-browserify": "2.0.1", - "stream-http": "2.7.2", - "string_decoder": "1.0.3", - "subarg": "1.0.0", - "syntax-error": "1.3.0", - "through2": "2.0.3", - "timers-browserify": "1.4.2", - "tty-browserify": "0.0.0", - "url": "0.11.0", - "util": "0.10.3", - "vm-browserify": "0.0.4", - "xtend": "4.0.1" + "JSONStream": "^1.0.3", + "assert": "^1.4.0", + "browser-pack": "^6.0.1", + "browser-resolve": "^1.11.0", + "browserify-zlib": "~0.1.2", + "buffer": "^5.0.2", + "cached-path-relative": "^1.0.0", + "concat-stream": "~1.5.1", + "console-browserify": "^1.1.0", + "constants-browserify": "~1.0.0", + "crypto-browserify": "^3.0.0", + "defined": "^1.0.0", + "deps-sort": "^2.0.0", + "domain-browser": "~1.1.0", + "duplexer2": "~0.1.2", + "events": "~1.1.0", + "glob": "^7.1.0", + "has": "^1.0.0", + "htmlescape": "^1.1.0", + "https-browserify": "^1.0.0", + "inherits": "~2.0.1", + "insert-module-globals": "^7.0.0", + "labeled-stream-splicer": "^2.0.0", + "module-deps": "^4.0.8", + "os-browserify": "~0.1.1", + "parents": "^1.0.1", + "path-browserify": "~0.0.0", + "process": "~0.11.0", + "punycode": "^1.3.2", + "querystring-es3": "~0.2.0", + "read-only-stream": "^2.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.1.4", + "shasum": "^1.0.0", + "shell-quote": "^1.6.1", + "stream-browserify": "^2.0.0", + "stream-http": "^2.0.0", + "string_decoder": "~1.0.0", + "subarg": "^1.0.0", + "syntax-error": "^1.1.1", + "through2": "^2.0.0", + "timers-browserify": "^1.0.1", + "tty-browserify": "~0.0.0", + "url": "~0.11.0", + "util": "~0.10.1", + "vm-browserify": "~0.0.1", + "xtend": "^4.0.0" } }, "browserify-aes": { @@ -446,11 +463,11 @@ "integrity": "sha1-Xncl297x/Vkw1OurSFZ85FHEigo=", "dev": true, "requires": { - "buffer-xor": "1.0.3", - "cipher-base": "1.0.4", - "create-hash": "1.1.3", - "evp_bytestokey": "1.0.0", - "inherits": "2.0.3" + "buffer-xor": "^1.0.2", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "inherits": "^2.0.1" } }, "browserify-cipher": { @@ -459,9 +476,9 @@ "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=", "dev": true, "requires": { - "browserify-aes": "1.0.6", - "browserify-des": "1.0.0", - "evp_bytestokey": "1.0.0" + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" } }, "browserify-des": { @@ -470,9 +487,9 @@ "integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=", "dev": true, "requires": { - "cipher-base": "1.0.4", - "des.js": "1.0.0", - "inherits": "2.0.3" + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1" } }, "browserify-rsa": { @@ -481,8 +498,8 @@ "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "dev": true, "requires": { - "bn.js": "4.11.7", - "randombytes": "2.0.5" + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" } }, "browserify-sign": { @@ -491,13 +508,13 @@ "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", "dev": true, "requires": { - "bn.js": "4.11.7", - "browserify-rsa": "4.0.1", - "create-hash": "1.1.3", - "create-hmac": "1.1.6", - "elliptic": "6.4.0", - "inherits": "2.0.3", - "parse-asn1": "5.1.0" + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" } }, "browserify-zlib": { @@ -506,7 +523,7 @@ "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", "dev": true, "requires": { - "pako": "0.2.9" + "pako": "~0.2.0" } }, "buffer": { @@ -515,8 +532,8 @@ "integrity": "sha512-NeeHXWh5pCbPQCt2/6rLvXqapZfVsqw/YgRgaHpT3H9Uzgs+S0lSg5SQzouIuDvcmlQRqBe8hOO2scKCu3cxrg==", "dev": true, "requires": { - "base64-js": "1.2.1", - "ieee754": "1.1.8" + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" } }, "buffer-xor": { @@ -555,8 +572,8 @@ "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", "dev": true, "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" } }, "chai": { @@ -564,12 +581,12 @@ "resolved": "https://registry.npmjs.org/chai/-/chai-4.1.0.tgz", "integrity": "sha1-MxoDkbVcOvh0CunDt0WLwcOAXm0=", "requires": { - "assertion-error": "1.0.2", - "check-error": "1.0.2", - "deep-eql": "2.0.2", - "get-func-name": "2.0.0", - "pathval": "1.1.0", - "type-detect": "4.0.3" + "assertion-error": "^1.0.1", + "check-error": "^1.0.1", + "deep-eql": "^2.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.0.0", + "type-detect": "^4.0.0" } }, "chalk": { @@ -577,9 +594,9 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.0.1.tgz", "integrity": "sha512-Mp+FXEI+FrwY/XYV45b2YD3E8i3HwnEAoFcM0qlZzq/RZ9RwWitt2Y/c7cqRAz70U7hfekqx6qNYthuKFO6K0g==", "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.2.1" + "ansi-styles": "^3.1.0", + "escape-string-regexp": "^1.0.5", + "supports-color": "^4.0.0" }, "dependencies": { "has-flag": { @@ -592,7 +609,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.2.1.tgz", "integrity": "sha512-qxzYsob3yv6U+xMzPrv170y8AwGP7i74g+pbixCfD6rgso8BscLT2qXIuz6TpOaiJZ3mFgT5O9lyT9nMU4LfaA==", "requires": { - "has-flag": "2.0.0" + "has-flag": "^2.0.0" } } } @@ -608,14 +625,15 @@ "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "dev": true, "requires": { - "anymatch": "1.3.2", - "async-each": "1.0.1", - "glob-parent": "2.0.0", - "inherits": "2.0.3", - "is-binary-path": "1.0.1", - "is-glob": "2.0.1", - "path-is-absolute": "1.0.1", - "readdirp": "2.1.0" + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" } }, "cipher-base": { @@ -624,8 +642,8 @@ "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "dev": true, "requires": { - "inherits": "2.0.3", - "safe-buffer": "5.1.1" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "cli-boxes": { @@ -640,7 +658,7 @@ "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", "dev": true, "requires": { - "restore-cursor": "1.0.1" + "restore-cursor": "^1.0.1" } }, "cli-truncate": { @@ -649,8 +667,8 @@ "integrity": "sha512-bAtZo0u82gCfaAGfSNxUdTI9mNyza7D8w4CVCcaOsy7sgwDzvx6ekr6cuWJqY3UGzgnQ1+4wgENup5eIhgxEYA==", "dev": true, "requires": { - "slice-ansi": "1.0.0", - "string-width": "2.1.1" + "slice-ansi": "^1.0.0", + "string-width": "^2.0.0" } }, "cliui": { @@ -659,8 +677,8 @@ "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", "dev": true, "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", + "center-align": "^0.1.1", + "right-align": "^0.1.1", "wordwrap": "0.0.2" }, "dependencies": { @@ -689,7 +707,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", "integrity": "sha1-Gsz5fdc5uYO/mU1W/sj5WFNkG3o=", "requires": { - "color-name": "1.1.3" + "color-name": "^1.1.1" } }, "color-name": { @@ -703,8 +721,8 @@ "integrity": "sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs=", "dev": true, "requires": { - "strip-ansi": "3.0.1", - "wcwidth": "1.0.1" + "strip-ansi": "^3.0.0", + "wcwidth": "^1.0.0" } }, "combine-source-map": { @@ -713,10 +731,10 @@ "integrity": "sha1-CHAxKFazB6h8xKxIbzqaYq7MwJ4=", "dev": true, "requires": { - "convert-source-map": "1.1.3", - "inline-source-map": "0.6.2", - "lodash.memoize": "3.0.4", - "source-map": "0.5.6" + "convert-source-map": "~1.1.0", + "inline-source-map": "~0.6.0", + "lodash.memoize": "~3.0.3", + "source-map": "~0.5.3" } }, "combined-stream": { @@ -725,7 +743,7 @@ "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", "dev": true, "requires": { - "delayed-stream": "1.0.0" + "delayed-stream": "~1.0.0" } }, "commander": { @@ -734,7 +752,7 @@ "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", "dev": true, "requires": { - "graceful-readlink": "1.0.1" + "graceful-readlink": ">= 1.0.0" } }, "concat-map": { @@ -749,9 +767,9 @@ "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", "dev": true, "requires": { - "inherits": "2.0.3", - "readable-stream": "2.0.6", - "typedarray": "0.0.6" + "inherits": "~2.0.1", + "readable-stream": "~2.0.0", + "typedarray": "~0.0.5" }, "dependencies": { "readable-stream": { @@ -760,12 +778,12 @@ "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "0.10.31", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" } }, "string_decoder": { @@ -782,12 +800,12 @@ "integrity": "sha512-5oNkD/L++l0O6xGXxb1EWS7SivtjfGQlRyxJsYgE0Z495/L81e2h4/d3r969hoPXuFItzNOKMtsXgYG4c7dYvw==", "dev": true, "requires": { - "dot-prop": "4.2.0", - "graceful-fs": "4.1.11", - "make-dir": "1.0.0", - "unique-string": "1.0.0", - "write-file-atomic": "2.1.0", - "xdg-basedir": "3.0.0" + "dot-prop": "^4.1.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "unique-string": "^1.0.0", + "write-file-atomic": "^2.0.0", + "xdg-basedir": "^3.0.0" } }, "console-browserify": { @@ -796,7 +814,7 @@ "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", "dev": true, "requires": { - "date-now": "0.1.4" + "date-now": "^0.1.4" } }, "constants-browserify": { @@ -823,8 +841,8 @@ "integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=", "dev": true, "requires": { - "bn.js": "4.11.7", - "elliptic": "6.4.0" + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" } }, "create-error-class": { @@ -833,7 +851,7 @@ "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", "dev": true, "requires": { - "capture-stack-trace": "1.0.0" + "capture-stack-trace": "^1.0.0" } }, "create-hash": { @@ -842,10 +860,10 @@ "integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=", "dev": true, "requires": { - "cipher-base": "1.0.4", - "inherits": "2.0.3", - "ripemd160": "2.0.1", - "sha.js": "2.4.8" + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "sha.js": "^2.4.0" } }, "create-hmac": { @@ -854,12 +872,12 @@ "integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=", "dev": true, "requires": { - "cipher-base": "1.0.4", - "create-hash": "1.1.3", - "inherits": "2.0.3", - "ripemd160": "2.0.1", - "safe-buffer": "5.1.1", - "sha.js": "2.4.8" + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } }, "cross-spawn": { @@ -868,9 +886,9 @@ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "lru-cache": "4.1.1", - "shebang-command": "1.2.0", - "which": "1.3.0" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, "crypto-browserify": { @@ -879,16 +897,16 @@ "integrity": "sha512-Na7ZlwCOqoaW5RwUK1WpXws2kv8mNhWdTlzob0UXulk6G9BDbyiJaGTYBIX61Ozn9l1EPPJpICZb4DaOpT9NlQ==", "dev": true, "requires": { - "browserify-cipher": "1.0.0", - "browserify-sign": "4.0.4", - "create-ecdh": "4.0.0", - "create-hash": "1.1.3", - "create-hmac": "1.1.6", - "diffie-hellman": "5.0.2", - "inherits": "2.0.3", - "pbkdf2": "3.0.13", - "public-encrypt": "4.0.0", - "randombytes": "2.0.5" + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0" } }, "crypto-random-string": { @@ -923,7 +941,7 @@ "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-2.0.2.tgz", "integrity": "sha1-sbrAblbwp2d3aG1Qyf63XC7XZ5o=", "requires": { - "type-detect": "3.0.0" + "type-detect": "^3.0.0" }, "dependencies": { "type-detect": { @@ -945,7 +963,7 @@ "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", "dev": true, "requires": { - "clone": "1.0.2" + "clone": "^1.0.2" } }, "defined": { @@ -966,10 +984,10 @@ "integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=", "dev": true, "requires": { - "JSONStream": "1.3.1", - "shasum": "1.0.2", - "subarg": "1.0.0", - "through2": "2.0.3" + "JSONStream": "^1.0.3", + "shasum": "^1.0.0", + "subarg": "^1.0.0", + "through2": "^2.0.0" } }, "des.js": { @@ -978,8 +996,8 @@ "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", "dev": true, "requires": { - "inherits": "2.0.3", - "minimalistic-assert": "1.0.0" + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" } }, "detect-indent": { @@ -994,8 +1012,8 @@ "integrity": "sha1-blqMaybmx6JUsca210kNmOyR7dE=", "dev": true, "requires": { - "acorn": "4.0.13", - "defined": "1.0.0" + "acorn": "^4.0.3", + "defined": "^1.0.0" } }, "diff": { @@ -1009,9 +1027,9 @@ "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=", "dev": true, "requires": { - "bn.js": "4.11.7", - "miller-rabin": "4.0.0", - "randombytes": "2.0.5" + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" } }, "dom-walk": { @@ -1032,7 +1050,7 @@ "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", "dev": true, "requires": { - "is-obj": "1.0.1" + "is-obj": "^1.0.0" } }, "duplexer2": { @@ -1041,7 +1059,7 @@ "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", "dev": true, "requires": { - "readable-stream": "2.3.3" + "readable-stream": "^2.0.2" } }, "duplexer3": { @@ -1062,13 +1080,13 @@ "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", "dev": true, "requires": { - "bn.js": "4.11.7", - "brorand": "1.1.0", - "hash.js": "1.1.3", - "hmac-drbg": "1.0.1", - "inherits": "2.0.3", - "minimalistic-assert": "1.0.0", - "minimalistic-crypto-utils": "1.0.1" + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" } }, "emojis-list": { @@ -1083,10 +1101,10 @@ "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "memory-fs": "0.4.1", - "object-assign": "4.1.1", - "tapable": "0.2.8" + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "object-assign": "^4.0.1", + "tapable": "^0.2.7" } }, "errno": { @@ -1095,7 +1113,7 @@ "integrity": "sha1-uJbiOp5ei6M4cfyZar02NfyaHH0=", "dev": true, "requires": { - "prr": "0.0.0" + "prr": "~0.0.0" } }, "error-ex": { @@ -1104,7 +1122,7 @@ "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "escape-string-regexp": { @@ -1124,7 +1142,7 @@ "integrity": "sha1-SXtmrZ/vZc18CKYYCCS6FHa2blM=", "dev": true, "requires": { - "create-hash": "1.1.3" + "create-hash": "^1.1.1" } }, "execa": { @@ -1133,13 +1151,13 @@ "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" } }, "exit-hook": { @@ -1154,7 +1172,7 @@ "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "dev": true, "requires": { - "is-posix-bracket": "0.1.1" + "is-posix-bracket": "^0.1.0" } }, "expand-range": { @@ -1163,7 +1181,7 @@ "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { - "fill-range": "2.2.3" + "fill-range": "^2.1.0" } }, "extend": { @@ -1178,7 +1196,7 @@ "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "filename-regex": { @@ -1193,11 +1211,11 @@ "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", "dev": true, "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "1.1.7", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^1.1.3", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" } }, "for-in": { @@ -1212,7 +1230,7 @@ "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", "dev": true, "requires": { - "for-in": "1.0.2" + "for-in": "^1.0.1" } }, "form-data": { @@ -1221,9 +1239,9 @@ "integrity": "sha1-ml47kpX5gLJiPPZPojixTOvKcHs=", "dev": true, "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.16" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.5", + "mime-types": "^2.1.12" } }, "fs.realpath": { @@ -1232,6 +1250,535 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "fsevents": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": "^2.1.0" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true, + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true, + "dev": true + } + } + }, "function-bind": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", @@ -1255,12 +1802,12 @@ "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" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "glob-base": { @@ -1269,8 +1816,8 @@ "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", "dev": true, "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" } }, "glob-parent": { @@ -1279,7 +1826,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "2.0.1" + "is-glob": "^2.0.0" } }, "global": { @@ -1288,8 +1835,8 @@ "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", "dev": true, "requires": { - "min-document": "2.19.0", - "process": "0.5.2" + "min-document": "^2.19.0", + "process": "~0.5.1" }, "dependencies": { "process": { @@ -1306,17 +1853,17 @@ "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "dev": true, "requires": { - "create-error-class": "3.0.2", - "duplexer3": "0.1.4", - "get-stream": "3.0.0", - "is-redirect": "1.0.0", - "is-retry-allowed": "1.1.0", - "is-stream": "1.1.0", - "lowercase-keys": "1.0.0", - "safe-buffer": "5.1.1", - "timed-out": "4.0.1", - "unzip-response": "2.0.1", - "url-parse-lax": "1.0.0" + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" } }, "graceful-fs": { @@ -1343,7 +1890,7 @@ "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", "dev": true, "requires": { - "function-bind": "1.1.0" + "function-bind": "^1.0.2" } }, "has-ansi": { @@ -1352,7 +1899,7 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "has-flag": { @@ -1373,7 +1920,7 @@ "integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=", "dev": true, "requires": { - "inherits": "2.0.3" + "inherits": "^2.0.1" } }, "hash.js": { @@ -1382,8 +1929,8 @@ "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", "dev": true, "requires": { - "inherits": "2.0.3", - "minimalistic-assert": "1.0.0" + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" } }, "hmac-drbg": { @@ -1392,9 +1939,9 @@ "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "dev": true, "requires": { - "hash.js": "1.1.3", - "minimalistic-assert": "1.0.0", - "minimalistic-crypto-utils": "1.0.1" + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" } }, "htmlescape": { @@ -1409,9 +1956,9 @@ "integrity": "sha1-zBzjjkU7+YSg93AtLdWcc9CBKEo=", "dev": true, "requires": { - "agent-base": "2.1.1", - "debug": "2.6.8", - "extend": "3.0.1" + "agent-base": "2", + "debug": "2", + "extend": "3" } }, "https-browserify": { @@ -1426,9 +1973,9 @@ "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", "dev": true, "requires": { - "agent-base": "2.1.1", - "debug": "2.6.8", - "extend": "3.0.1" + "agent-base": "2", + "debug": "2", + "extend": "3" } }, "ieee754": { @@ -1461,8 +2008,8 @@ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -1483,7 +2030,7 @@ "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", "dev": true, "requires": { - "source-map": "0.5.6" + "source-map": "~0.5.3" } }, "insert-module-globals": { @@ -1492,14 +2039,14 @@ "integrity": "sha1-wDv04BywhtW15azorQr+eInWOMM=", "dev": true, "requires": { - "combine-source-map": "0.7.2", - "concat-stream": "1.5.2", - "is-buffer": "1.1.5", - "JSONStream": "1.3.1", - "lexical-scope": "1.2.0", - "process": "0.11.10", - "through2": "2.0.3", - "xtend": "4.0.1" + "JSONStream": "^1.0.3", + "combine-source-map": "~0.7.1", + "concat-stream": "~1.5.1", + "is-buffer": "^1.1.0", + "lexical-scope": "^1.2.0", + "process": "~0.11.0", + "through2": "^2.0.0", + "xtend": "^4.0.0" } }, "interpret": { @@ -1514,7 +2061,7 @@ "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", "dev": true, "requires": { - "loose-envify": "1.3.1" + "loose-envify": "^1.0.0" } }, "is-absolute": { @@ -1523,8 +2070,8 @@ "integrity": "sha1-IN5p89uULvLYe5wto28XIjWxtes=", "dev": true, "requires": { - "is-relative": "0.2.1", - "is-windows": "0.2.0" + "is-relative": "^0.2.1", + "is-windows": "^0.2.0" } }, "is-arrayish": { @@ -1539,7 +2086,7 @@ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { - "binary-extensions": "1.9.0" + "binary-extensions": "^1.0.0" } }, "is-buffer": { @@ -1560,7 +2107,7 @@ "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", "dev": true, "requires": { - "is-primitive": "2.0.0" + "is-primitive": "^2.0.0" } }, "is-extendable": { @@ -1587,7 +2134,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "is-npm": { @@ -1602,7 +2149,7 @@ "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-obj": { @@ -1641,7 +2188,7 @@ "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=", "dev": true, "requires": { - "is-unc-path": "0.1.2" + "is-unc-path": "^0.1.1" } }, "is-retry-allowed": { @@ -1662,7 +2209,7 @@ "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=", "dev": true, "requires": { - "unc-path-regex": "0.1.2" + "unc-path-regex": "^0.1.0" } }, "is-utf8": { @@ -1710,7 +2257,7 @@ "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", "dev": true, "requires": { - "jsonify": "0.0.0" + "jsonify": "~0.0.0" } }, "json3": { @@ -1737,31 +2284,21 @@ "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", "dev": true }, - "JSONStream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", - "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", - "dev": true, - "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" - } - }, "jspm-config": { "version": "0.3.4", "resolved": "https://registry.npmjs.org/jspm-config/-/jspm-config-0.3.4.tgz", "integrity": "sha1-RMJpAuSujs4jZs7cn/FrEKXzkcY=", "dev": true, "requires": { - "any-promise": "1.3.0", - "graceful-fs": "4.1.11", - "make-error-cause": "1.2.2", - "object.pick": "1.2.0", - "parse-json": "2.2.0", - "strip-bom": "3.0.0", - "thenify": "3.3.0", - "throat": "3.2.0", - "xtend": "4.0.1" + "any-promise": "^1.3.0", + "graceful-fs": "^4.1.4", + "make-error-cause": "^1.2.1", + "object.pick": "^1.1.2", + "parse-json": "^2.2.0", + "strip-bom": "^3.0.0", + "thenify": "^3.2.0", + "throat": "^3.0.0", + "xtend": "^4.0.1" }, "dependencies": { "strip-bom": { @@ -1778,7 +2315,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.5" + "is-buffer": "^1.1.5" } }, "labeled-stream-splicer": { @@ -1787,9 +2324,9 @@ "integrity": "sha1-pS4dE4AkwAuGscDJH2d5GLiuClk=", "dev": true, "requires": { - "inherits": "2.0.3", - "isarray": "0.0.1", - "stream-splicer": "2.0.0" + "inherits": "^2.0.1", + "isarray": "~0.0.1", + "stream-splicer": "^2.0.0" }, "dependencies": { "isarray": { @@ -1806,7 +2343,7 @@ "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", "dev": true, "requires": { - "package-json": "4.0.1" + "package-json": "^4.0.0" } }, "lazy-cache": { @@ -1821,7 +2358,7 @@ "integrity": "sha1-/Ope3HBKSzqHls3KQZw6CvryLfQ=", "dev": true, "requires": { - "astw": "2.2.0" + "astw": "^2.0.0" } }, "listify": { @@ -1836,9 +2373,9 @@ "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", "dev": true, "requires": { - "big.js": "3.1.3", - "emojis-list": "2.1.0", - "json5": "0.5.1" + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" } }, "lockfile": { @@ -1853,8 +2390,8 @@ "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", "dev": true, "requires": { - "lodash._basecopy": "3.0.1", - "lodash.keys": "3.1.2" + "lodash._basecopy": "^3.0.0", + "lodash.keys": "^3.0.0" } }, "lodash._basecopy": { @@ -1887,9 +2424,9 @@ "integrity": "sha1-1/KEnw29p+BGgruM1yqwIkYd6+c=", "dev": true, "requires": { - "lodash._baseassign": "3.2.0", - "lodash._basecreate": "3.0.3", - "lodash._isiterateecall": "3.0.9" + "lodash._baseassign": "^3.0.0", + "lodash._basecreate": "^3.0.0", + "lodash._isiterateecall": "^3.0.0" } }, "lodash.isarguments": { @@ -1910,9 +2447,9 @@ "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", "dev": true, "requires": { - "lodash._getnative": "3.9.1", - "lodash.isarguments": "3.1.0", - "lodash.isarray": "3.0.4" + "lodash._getnative": "^3.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0" } }, "lodash.memoize": { @@ -1927,8 +2464,8 @@ "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", "dev": true, "requires": { - "ansi-escapes": "1.4.0", - "cli-cursor": "1.0.2" + "ansi-escapes": "^1.0.0", + "cli-cursor": "^1.0.2" } }, "longest": { @@ -1943,7 +2480,7 @@ "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "dev": true, "requires": { - "js-tokens": "3.0.2" + "js-tokens": "^3.0.0" } }, "lowercase-keys": { @@ -1958,8 +2495,8 @@ "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", "dev": true, "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, "make-dir": { @@ -1968,7 +2505,7 @@ "integrity": "sha1-l6ARdR6R3YfPre9Ygy67BJNt6Xg=", "dev": true, "requires": { - "pify": "2.3.0" + "pify": "^2.3.0" } }, "make-error": { @@ -1982,7 +2519,7 @@ "integrity": "sha1-3wOI/NCzeBbf8KX7gQiTl3fcvJ0=", "dev": true, "requires": { - "make-error": "1.3.0" + "make-error": "^1.2.0" } }, "memory-fs": { @@ -1991,8 +2528,8 @@ "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", "dev": true, "requires": { - "errno": "0.1.4", - "readable-stream": "2.3.3" + "errno": "^0.1.3", + "readable-stream": "^2.0.1" } }, "micromatch": { @@ -2001,19 +2538,19 @@ "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", "dev": true, "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.3" + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" } }, "miller-rabin": { @@ -2022,8 +2559,8 @@ "integrity": "sha1-SmL7HUKTPAVYOYL0xxb2+55sbT0=", "dev": true, "requires": { - "bn.js": "4.11.7", - "brorand": "1.1.0" + "bn.js": "^4.0.0", + "brorand": "^1.0.1" } }, "mime-db": { @@ -2038,7 +2575,7 @@ "integrity": "sha1-K4WKUuXs1RbbiXrCvodIeDBpjiM=", "dev": true, "requires": { - "mime-db": "1.29.0" + "mime-db": "~1.29.0" } }, "min-document": { @@ -2047,7 +2584,7 @@ "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", "dev": true, "requires": { - "dom-walk": "0.1.1" + "dom-walk": "^0.1.0" } }, "minimalistic-assert": { @@ -2068,7 +2605,7 @@ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { - "brace-expansion": "1.1.8" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -2116,12 +2653,12 @@ "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=", "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" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } } } @@ -2132,21 +2669,21 @@ "integrity": "sha1-IyFYM/HaE/1gbMuAh7RIUty4If0=", "dev": true, "requires": { - "browser-resolve": "1.11.2", - "cached-path-relative": "1.0.1", - "concat-stream": "1.5.2", - "defined": "1.0.0", - "detective": "4.5.0", - "duplexer2": "0.1.4", - "inherits": "2.0.3", - "JSONStream": "1.3.1", - "parents": "1.0.1", - "readable-stream": "2.3.3", - "resolve": "1.4.0", - "stream-combiner2": "1.1.1", - "subarg": "1.0.0", - "through2": "2.0.3", - "xtend": "4.0.1" + "JSONStream": "^1.0.3", + "browser-resolve": "^1.7.0", + "cached-path-relative": "^1.0.0", + "concat-stream": "~1.5.0", + "defined": "^1.0.0", + "detective": "^4.0.0", + "duplexer2": "^0.1.2", + "inherits": "^2.0.1", + "parents": "^1.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.1.3", + "stream-combiner2": "^1.1.1", + "subarg": "^1.0.0", + "through2": "^2.0.0", + "xtend": "^4.0.0" } }, "ms": { @@ -2155,34 +2692,41 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, + "nan": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", + "dev": true, + "optional": true + }, "node-libs-browser": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-0.7.0.tgz", "integrity": "sha1-PicsCBnjCJNeJmdECNevDhSRuDs=", "dev": true, "requires": { - "assert": "1.4.1", - "browserify-zlib": "0.1.4", - "buffer": "4.9.1", - "console-browserify": "1.1.0", - "constants-browserify": "1.0.0", + "assert": "^1.1.1", + "browserify-zlib": "^0.1.4", + "buffer": "^4.9.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", "crypto-browserify": "3.3.0", - "domain-browser": "1.1.7", - "events": "1.1.1", + "domain-browser": "^1.1.1", + "events": "^1.0.0", "https-browserify": "0.0.1", - "os-browserify": "0.2.1", + "os-browserify": "^0.2.0", "path-browserify": "0.0.0", - "process": "0.11.10", - "punycode": "1.4.1", - "querystring-es3": "0.2.1", - "readable-stream": "2.3.3", - "stream-browserify": "2.0.1", - "stream-http": "2.7.2", - "string_decoder": "0.10.31", - "timers-browserify": "2.0.3", + "process": "^0.11.0", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.0.5", + "stream-browserify": "^2.0.1", + "stream-http": "^2.3.1", + "string_decoder": "^0.10.25", + "timers-browserify": "^2.0.2", "tty-browserify": "0.0.0", - "url": "0.11.0", - "util": "0.10.3", + "url": "^0.11.0", + "util": "^0.10.3", "vm-browserify": "0.0.4" }, "dependencies": { @@ -2192,7 +2736,7 @@ "integrity": "sha1-BnFJtmjfMcS1hTPgLQHoBthgjiw=", "dev": true, "requires": { - "inherits": "2.0.3" + "inherits": "^2.0.1" } }, "buffer": { @@ -2201,9 +2745,9 @@ "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", "dev": true, "requires": { - "base64-js": "1.2.1", - "ieee754": "1.1.8", - "isarray": "1.0.0" + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" } }, "crypto-browserify": { @@ -2254,8 +2798,8 @@ "integrity": "sha512-+JAqyNgg+M8+gXIrq2EeUr4kZqRz47Ysco7X5QKRGScRE9HIHckyHD1asozSFGeqx2nmPCgA8T5tIGVO0ML7/w==", "dev": true, "requires": { - "global": "4.3.2", - "setimmediate": "1.0.5" + "global": "^4.3.2", + "setimmediate": "^1.0.4" } } } @@ -2266,7 +2810,7 @@ "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", "dev": true, "requires": { - "abbrev": "1.1.0" + "abbrev": "1" } }, "normalize-path": { @@ -2275,7 +2819,7 @@ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true, "requires": { - "remove-trailing-separator": "1.0.2" + "remove-trailing-separator": "^1.0.1" } }, "npm-run-path": { @@ -2284,7 +2828,7 @@ "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { - "path-key": "2.0.1" + "path-key": "^2.0.0" } }, "number-is-nan": { @@ -2305,8 +2849,8 @@ "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", "dev": true, "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" } }, "object.pick": { @@ -2315,7 +2859,7 @@ "integrity": "sha1-tTkr7peC2m2ft9avr1OXefEjTCs=", "dev": true, "requires": { - "isobject": "2.1.0" + "isobject": "^2.1.0" } }, "once": { @@ -2324,7 +2868,7 @@ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "onetime": { @@ -2339,8 +2883,8 @@ "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", "dev": true, "requires": { - "minimist": "0.0.10", - "wordwrap": "0.0.3" + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" }, "dependencies": { "minimist": { @@ -2375,10 +2919,10 @@ "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", "dev": true, "requires": { - "got": "6.7.1", - "registry-auth-token": "3.3.1", - "registry-url": "3.1.0", - "semver": "5.4.1" + "got": "^6.7.1", + "registry-auth-token": "^3.0.1", + "registry-url": "^3.0.3", + "semver": "^5.1.0" } }, "pako": { @@ -2393,7 +2937,7 @@ "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", "dev": true, "requires": { - "path-platform": "0.11.15" + "path-platform": "~0.11.15" } }, "parse-asn1": { @@ -2402,11 +2946,11 @@ "integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=", "dev": true, "requires": { - "asn1.js": "4.9.1", - "browserify-aes": "1.0.6", - "create-hash": "1.1.3", - "evp_bytestokey": "1.0.0", - "pbkdf2": "3.0.13" + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3" } }, "parse-glob": { @@ -2415,10 +2959,10 @@ "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", "dev": true, "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" } }, "parse-json": { @@ -2427,7 +2971,7 @@ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "1.3.1" + "error-ex": "^1.2.0" } }, "path-browserify": { @@ -2471,11 +3015,11 @@ "integrity": "sha512-+dCHxDH+djNtjgWmvVC/my3SYBAKpKNqKSjLkp+GtWWYe4XPE+e/PSD2aCanlEZZnqPk2uekTKNC/ccbwd2X2Q==", "dev": true, "requires": { - "create-hash": "1.1.3", - "create-hmac": "1.1.6", - "ripemd160": "2.0.1", - "safe-buffer": "5.1.1", - "sha.js": "2.4.8" + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } }, "pbkdf2-compat": { @@ -2496,10 +3040,10 @@ "integrity": "sha1-T5APONV6V07BcO2kBJbjZAgr/2Y=", "dev": true, "requires": { - "concat-stream": "1.5.2", - "form-data": "2.2.0", - "make-error-cause": "1.2.2", - "tough-cookie": "2.3.2" + "concat-stream": "^1.4.7", + "form-data": "^2.0.0", + "make-error-cause": "^1.2.1", + "tough-cookie": "^2.0.0" } }, "popsicle-proxy-agent": { @@ -2508,8 +3052,8 @@ "integrity": "sha1-uRM8VdlFdZq37mG3cRNkYg066tw=", "dev": true, "requires": { - "http-proxy-agent": "1.0.0", - "https-proxy-agent": "1.0.0" + "http-proxy-agent": "^1.0.0", + "https-proxy-agent": "^1.0.0" } }, "popsicle-retry": { @@ -2518,8 +3062,8 @@ "integrity": "sha1-4G6GZTO0KnoSPrMwy+Y6fOvLoQw=", "dev": true, "requires": { - "any-promise": "1.3.0", - "xtend": "4.0.1" + "any-promise": "^1.1.0", + "xtend": "^4.0.1" } }, "popsicle-rewrite": { @@ -2582,11 +3126,11 @@ "integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=", "dev": true, "requires": { - "bn.js": "4.11.7", - "browserify-rsa": "4.0.1", - "create-hash": "1.1.3", - "parse-asn1": "5.1.0", - "randombytes": "2.0.5" + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1" } }, "punycode": { @@ -2613,8 +3157,8 @@ "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", "dev": true, "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { "is-number": { @@ -2623,7 +3167,7 @@ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -2632,7 +3176,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.5" + "is-buffer": "^1.1.5" } } } @@ -2643,7 +3187,7 @@ "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "dev": true, "requires": { - "is-buffer": "1.1.5" + "is-buffer": "^1.1.5" } } } @@ -2654,7 +3198,7 @@ "integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==", "dev": true, "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "^5.1.0" } }, "rc": { @@ -2663,10 +3207,10 @@ "integrity": "sha1-LgPo5C7kULjLPc5lvhv4l04d/ZU=", "dev": true, "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.4", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" + "deep-extend": "~0.4.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" } }, "read-only-stream": { @@ -2675,7 +3219,7 @@ "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", "dev": true, "requires": { - "readable-stream": "2.3.3" + "readable-stream": "^2.0.2" } }, "readable-stream": { @@ -2684,13 +3228,13 @@ "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" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.0.3", + "util-deprecate": "~1.0.1" } }, "readdirp": { @@ -2699,10 +3243,10 @@ "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "minimatch": "3.0.4", - "readable-stream": "2.3.3", - "set-immediate-shim": "1.0.1" + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" } }, "regex-cache": { @@ -2711,8 +3255,8 @@ "integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=", "dev": true, "requires": { - "is-equal-shallow": "0.1.3", - "is-primitive": "2.0.0" + "is-equal-shallow": "^0.1.3", + "is-primitive": "^2.0.0" } }, "registry-auth-token": { @@ -2721,8 +3265,8 @@ "integrity": "sha1-+w0yie4Nmtosu1KvXf5mywcNMAY=", "dev": true, "requires": { - "rc": "1.2.1", - "safe-buffer": "5.1.1" + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" } }, "registry-url": { @@ -2731,7 +3275,7 @@ "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, "requires": { - "rc": "1.2.1" + "rc": "^1.0.1" } }, "remove-trailing-separator": { @@ -2758,7 +3302,7 @@ "integrity": "sha512-aW7sVKPufyHqOmyyLzg/J+8606v5nevBgaliIlV7nUpVMsDnoBGV/cbSLNjZAg9q0Cfd/+easKVKQ8vOu8fn1Q==", "dev": true, "requires": { - "path-parse": "1.0.5" + "path-parse": "^1.0.5" } }, "restore-cursor": { @@ -2767,8 +3311,8 @@ "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", "dev": true, "requires": { - "exit-hook": "1.1.1", - "onetime": "1.1.0" + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" } }, "right-align": { @@ -2777,7 +3321,7 @@ "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", "dev": true, "requires": { - "align-text": "0.1.4" + "align-text": "^0.1.1" } }, "rimraf": { @@ -2786,7 +3330,7 @@ "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", "dev": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "ripemd160": { @@ -2795,8 +3339,8 @@ "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=", "dev": true, "requires": { - "hash-base": "2.0.2", - "inherits": "2.0.3" + "hash-base": "^2.0.0", + "inherits": "^2.0.1" } }, "safe-buffer": { @@ -2817,7 +3361,7 @@ "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", "dev": true, "requires": { - "semver": "5.4.1" + "semver": "^5.0.3" } }, "set-immediate-shim": { @@ -2838,7 +3382,7 @@ "integrity": "sha1-NwaMLEdra69ALRSknGf1l5IfY08=", "dev": true, "requires": { - "inherits": "2.0.3" + "inherits": "^2.0.1" } }, "shasum": { @@ -2847,8 +3391,8 @@ "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", "dev": true, "requires": { - "json-stable-stringify": "0.0.1", - "sha.js": "2.4.8" + "json-stable-stringify": "~0.0.0", + "sha.js": "~2.4.4" } }, "shebang-command": { @@ -2857,7 +3401,7 @@ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -2872,10 +3416,10 @@ "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", "dev": true, "requires": { - "array-filter": "0.0.1", - "array-map": "0.0.0", - "array-reduce": "0.0.0", - "jsonify": "0.0.0" + "array-filter": "~0.0.0", + "array-map": "~0.0.0", + "array-reduce": "~0.0.0", + "jsonify": "~0.0.0" } }, "signal-exit": { @@ -2890,7 +3434,7 @@ "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0" + "is-fullwidth-code-point": "^2.0.0" } }, "slide": { @@ -2905,7 +3449,7 @@ "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", "dev": true, "requires": { - "is-plain-obj": "1.1.0" + "is-plain-obj": "^1.0.0" } }, "source-list-map": { @@ -2924,7 +3468,7 @@ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.15.tgz", "integrity": "sha1-AyAt9lwG0r2MfsI2KhkwVv7407E=", "requires": { - "source-map": "0.5.6" + "source-map": "^0.5.6" } }, "stream-browserify": { @@ -2933,8 +3477,8 @@ "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", "dev": true, "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3" + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" } }, "stream-combiner2": { @@ -2943,8 +3487,8 @@ "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", "dev": true, "requires": { - "duplexer2": "0.1.4", - "readable-stream": "2.3.3" + "duplexer2": "~0.1.0", + "readable-stream": "^2.0.2" } }, "stream-http": { @@ -2953,11 +3497,11 @@ "integrity": "sha512-c0yTD2rbQzXtSsFSVhtpvY/vS6u066PcXOX9kBB3mSO76RiUQzL340uJkGBWnlBg4/HZzqiUXtaVA7wcRcJgEw==", "dev": true, "requires": { - "builtin-status-codes": "3.0.0", - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "to-arraybuffer": "1.0.1", - "xtend": "4.0.1" + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.2.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" } }, "stream-splicer": { @@ -2966,17 +3510,8 @@ "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=", "dev": true, "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3" - } - }, - "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" + "inherits": "^2.0.1", + "readable-stream": "^2.0.2" } }, "string-template": { @@ -2991,8 +3526,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" }, "dependencies": { "ansi-regex": { @@ -3007,18 +3542,27 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } }, + "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.0" + } + }, "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" + "ansi-regex": "^2.0.0" } }, "strip-bom": { @@ -3027,7 +3571,7 @@ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } }, "strip-eof": { @@ -3047,7 +3591,7 @@ "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", "dev": true, "requires": { - "minimist": "1.2.0" + "minimist": "^1.1.0" } }, "supports-color": { @@ -3056,7 +3600,7 @@ "integrity": "sha1-cqJiiU2dQIuVbKBf83su2KbiotU=", "dev": true, "requires": { - "has-flag": "1.0.0" + "has-flag": "^1.0.0" } }, "syntax-error": { @@ -3065,7 +3609,7 @@ "integrity": "sha1-HtkmbE1AvnXcVb+bsct3Biu5bKE=", "dev": true, "requires": { - "acorn": "4.0.13" + "acorn": "^4.0.3" } }, "tapable": { @@ -3080,7 +3624,7 @@ "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", "dev": true, "requires": { - "execa": "0.7.0" + "execa": "^0.7.0" } }, "thenify": { @@ -3089,7 +3633,7 @@ "integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=", "dev": true, "requires": { - "any-promise": "1.3.0" + "any-promise": "^1.0.0" } }, "throat": { @@ -3110,8 +3654,8 @@ "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "dev": true, "requires": { - "readable-stream": "2.3.3", - "xtend": "4.0.1" + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" } }, "timed-out": { @@ -3126,7 +3670,7 @@ "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", "dev": true, "requires": { - "process": "0.11.10" + "process": "~0.11.0" } }, "to-arraybuffer": { @@ -3141,7 +3685,7 @@ "integrity": "sha1-RJy+LbrlqMgDjjDXH6D/RklHxN4=", "dev": true, "requires": { - "nopt": "1.0.10" + "nopt": "~1.0.10" } }, "tough-cookie": { @@ -3150,7 +3694,7 @@ "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", "dev": true, "requires": { - "punycode": "1.4.1" + "punycode": "^1.4.1" } }, "ts-loader": { @@ -3159,10 +3703,10 @@ "integrity": "sha512-KcQvWwla5nviCMX1511iKVsLfrx97Hbah6l5awE1HNL6eiyAzb3gSO8b5yasB6fK/qGukLpu9czWcd/AGGFy/g==", "dev": true, "requires": { - "chalk": "2.0.1", - "enhanced-resolve": "3.4.1", - "loader-utils": "1.1.0", - "semver": "5.4.1" + "chalk": "^2.0.1", + "enhanced-resolve": "^3.0.0", + "loader-utils": "^1.0.2", + "semver": "^5.0.1" } }, "ts-node": { @@ -3170,16 +3714,16 @@ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-3.3.0.tgz", "integrity": "sha1-wTxqMCTjC+EYDdUwOPwgkonUv2k=", "requires": { - "arrify": "1.0.1", - "chalk": "2.0.1", - "diff": "3.2.0", - "make-error": "1.3.0", - "minimist": "1.2.0", - "mkdirp": "0.5.1", - "source-map-support": "0.4.15", - "tsconfig": "6.0.0", - "v8flags": "3.0.0", - "yn": "2.0.0" + "arrify": "^1.0.0", + "chalk": "^2.0.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.0", + "tsconfig": "^6.0.0", + "v8flags": "^3.0.0", + "yn": "^2.0.0" }, "dependencies": { "strip-bom": { @@ -3192,8 +3736,8 @@ "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-6.0.0.tgz", "integrity": "sha1-aw6DdgA9evGGT434+J3QBZ/80DI=", "requires": { - "strip-bom": "3.0.0", - "strip-json-comments": "2.0.1" + "strip-bom": "^3.0.0", + "strip-json-comments": "^2.0.0" } } } @@ -3204,10 +3748,10 @@ "integrity": "sha1-X0J45wGACWeo/Dg/0ZZIh48qbjo=", "dev": true, "requires": { - "any-promise": "1.3.0", - "parse-json": "2.2.0", - "strip-bom": "2.0.0", - "strip-json-comments": "2.0.1" + "any-promise": "^1.3.0", + "parse-json": "^2.2.0", + "strip-bom": "^2.0.0", + "strip-json-comments": "^2.0.0" } }, "tsify": { @@ -3216,12 +3760,12 @@ "integrity": "sha1-I1Cf87TnEQypZW9sJ8oT7IVgVvY=", "dev": true, "requires": { - "convert-source-map": "1.1.3", - "fs.realpath": "1.0.0", - "object-assign": "4.1.1", - "semver": "5.4.1", - "through2": "2.0.3", - "tsconfig": "5.0.3" + "convert-source-map": "^1.1.0", + "fs.realpath": "^1.0.0", + "object-assign": "^4.1.0", + "semver": "^5.1.0", + "through2": "^2.0.0", + "tsconfig": "^5.0.3" } }, "tty-browserify": { @@ -3253,21 +3797,21 @@ "integrity": "sha1-usxp0lWXCkeOCfdsf2iZddU1p4o=", "dev": true, "requires": { - "archy": "1.0.0", - "bluebird": "3.5.0", - "chalk": "1.1.3", - "cli-truncate": "1.1.0", - "columnify": "1.5.4", - "elegant-spinner": "1.0.1", - "has-unicode": "2.0.1", - "listify": "1.0.0", - "log-update": "1.0.2", - "minimist": "1.2.0", - "promise-finally": "3.0.0", - "typings-core": "2.3.3", - "update-notifier": "2.2.0", - "wordwrap": "1.0.0", - "xtend": "4.0.1" + "archy": "^1.0.0", + "bluebird": "^3.1.1", + "chalk": "^1.0.0", + "cli-truncate": "^1.0.0", + "columnify": "^1.5.2", + "elegant-spinner": "^1.0.1", + "has-unicode": "^2.0.1", + "listify": "^1.0.0", + "log-update": "^1.0.2", + "minimist": "^1.2.0", + "promise-finally": "^3.0.0", + "typings-core": "^2.3.3", + "update-notifier": "^2.0.0", + "wordwrap": "^1.0.0", + "xtend": "^4.0.1" }, "dependencies": { "ansi-styles": { @@ -3282,11 +3826,11 @@ "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" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "supports-color": { @@ -3303,38 +3847,38 @@ "integrity": "sha1-CexUzVsR3V8e8vwKsx03ACyita0=", "dev": true, "requires": { - "array-uniq": "1.0.3", - "configstore": "3.1.1", - "debug": "2.6.8", - "detect-indent": "5.0.0", - "graceful-fs": "4.1.11", - "has": "1.0.1", - "invariant": "2.2.2", - "is-absolute": "0.2.6", - "jspm-config": "0.3.4", - "listify": "1.0.0", - "lockfile": "1.0.3", - "make-error-cause": "1.2.2", - "mkdirp": "0.5.1", - "object.pick": "1.2.0", - "parse-json": "2.2.0", - "popsicle": "9.1.0", - "popsicle-proxy-agent": "3.0.0", - "popsicle-retry": "3.2.1", - "popsicle-rewrite": "1.0.0", - "popsicle-status": "2.0.1", - "promise-finally": "3.0.0", - "rc": "1.2.1", - "rimraf": "2.6.1", - "sort-keys": "1.1.2", - "string-template": "1.0.0", - "strip-bom": "3.0.0", - "thenify": "3.3.0", - "throat": "3.2.0", - "touch": "1.0.0", - "typescript": "2.4.2", - "xtend": "4.0.1", - "zip-object": "0.1.0" + "array-uniq": "^1.0.2", + "configstore": "^3.0.0", + "debug": "^2.2.0", + "detect-indent": "^5.0.0", + "graceful-fs": "^4.1.2", + "has": "^1.0.1", + "invariant": "^2.2.0", + "is-absolute": "^0.2.3", + "jspm-config": "^0.3.0", + "listify": "^1.0.0", + "lockfile": "^1.0.1", + "make-error-cause": "^1.2.1", + "mkdirp": "^0.5.1", + "object.pick": "^1.1.1", + "parse-json": "^2.2.0", + "popsicle": "^9.0.0", + "popsicle-proxy-agent": "^3.0.0", + "popsicle-retry": "^3.2.0", + "popsicle-rewrite": "^1.0.0", + "popsicle-status": "^2.0.0", + "promise-finally": "^3.0.0", + "rc": "^1.1.5", + "rimraf": "^2.4.4", + "sort-keys": "^1.0.0", + "string-template": "^1.0.0", + "strip-bom": "^3.0.0", + "thenify": "^3.1.0", + "throat": "^3.0.0", + "touch": "^1.0.0", + "typescript": "^2.1.4", + "xtend": "^4.0.0", + "zip-object": "^0.1.0" }, "dependencies": { "strip-bom": { @@ -3351,10 +3895,10 @@ "integrity": "sha1-RhLAx7qu4rp8SH3kkErhIgefLKg=", "dev": true, "requires": { - "async": "0.2.10", - "source-map": "0.5.6", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" + "async": "~0.2.6", + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" }, "dependencies": { "async": { @@ -3389,7 +3933,7 @@ "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", "dev": true, "requires": { - "crypto-random-string": "1.0.0" + "crypto-random-string": "^1.0.0" } }, "unzip-response": { @@ -3404,14 +3948,14 @@ "integrity": "sha1-G1g3z5DAc22IYncytmHBOPht5y8=", "dev": true, "requires": { - "boxen": "1.2.1", - "chalk": "1.1.3", - "configstore": "3.1.1", - "import-lazy": "2.1.0", - "is-npm": "1.0.0", - "latest-version": "3.1.0", - "semver-diff": "2.1.0", - "xdg-basedir": "3.0.0" + "boxen": "^1.0.0", + "chalk": "^1.0.0", + "configstore": "^3.0.0", + "import-lazy": "^2.1.0", + "is-npm": "^1.0.0", + "latest-version": "^3.0.0", + "semver-diff": "^2.0.0", + "xdg-basedir": "^3.0.0" }, "dependencies": { "ansi-styles": { @@ -3426,11 +3970,11 @@ "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" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "supports-color": { @@ -3465,7 +4009,7 @@ "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", "dev": true, "requires": { - "prepend-http": "1.0.4" + "prepend-http": "^1.0.1" } }, "user-home": { @@ -3501,7 +4045,7 @@ "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.0.0.tgz", "integrity": "sha512-AGl+C+4qpeSu2g3JxCD/mGFFOs/vVZ3XREkD3ibQXEqr4Y4zgIrPWW124/IKJFHOIVFIoH8miWrLf0o84HYjwA==", "requires": { - "user-home": "1.1.1" + "user-home": "^1.1.1" } }, "vm-browserify": { @@ -3519,9 +4063,9 @@ "integrity": "sha1-Yuqkq15bo1/fwBgnVibjwPXj+ws=", "dev": true, "requires": { - "async": "0.9.2", - "chokidar": "1.7.0", - "graceful-fs": "4.1.11" + "async": "^0.9.0", + "chokidar": "^1.0.0", + "graceful-fs": "^4.1.2" }, "dependencies": { "async": { @@ -3538,7 +4082,7 @@ "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", "dev": true, "requires": { - "defaults": "1.0.3" + "defaults": "^1.0.3" } }, "webpack": { @@ -3547,21 +4091,21 @@ "integrity": "sha1-T/MfU9sDM55VFkqdRo7gMklo/pg=", "dev": true, "requires": { - "acorn": "3.3.0", - "async": "1.5.2", - "clone": "1.0.2", - "enhanced-resolve": "0.9.1", - "interpret": "0.6.6", - "loader-utils": "0.2.17", - "memory-fs": "0.3.0", - "mkdirp": "0.5.1", - "node-libs-browser": "0.7.0", - "optimist": "0.6.1", - "supports-color": "3.1.2", - "tapable": "0.1.10", - "uglify-js": "2.7.5", - "watchpack": "0.2.9", - "webpack-core": "0.6.9" + "acorn": "^3.0.0", + "async": "^1.3.0", + "clone": "^1.0.2", + "enhanced-resolve": "~0.9.0", + "interpret": "^0.6.4", + "loader-utils": "^0.2.11", + "memory-fs": "~0.3.0", + "mkdirp": "~0.5.0", + "node-libs-browser": "^0.7.0", + "optimist": "~0.6.0", + "supports-color": "^3.1.0", + "tapable": "~0.1.8", + "uglify-js": "~2.7.3", + "watchpack": "^0.2.1", + "webpack-core": "~0.6.9" }, "dependencies": { "acorn": { @@ -3576,9 +4120,9 @@ "integrity": "sha1-TW5omzcl+GCQknzMhs2fFjW4ni4=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "memory-fs": "0.2.0", - "tapable": "0.1.10" + "graceful-fs": "^4.1.2", + "memory-fs": "^0.2.0", + "tapable": "^0.1.8" }, "dependencies": { "memory-fs": { @@ -3595,10 +4139,10 @@ "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", "dev": true, "requires": { - "big.js": "3.1.3", - "emojis-list": "2.1.0", - "json5": "0.5.1", - "object-assign": "4.1.1" + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0", + "object-assign": "^4.0.1" } }, "memory-fs": { @@ -3607,8 +4151,8 @@ "integrity": "sha1-e8xrYp46Q+hx1+Kaymrop/FcuyA=", "dev": true, "requires": { - "errno": "0.1.4", - "readable-stream": "2.3.3" + "errno": "^0.1.3", + "readable-stream": "^2.0.1" } }, "tapable": { @@ -3625,8 +4169,8 @@ "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", "dev": true, "requires": { - "source-list-map": "0.1.8", - "source-map": "0.4.4" + "source-list-map": "~0.1.7", + "source-map": "~0.4.1" }, "dependencies": { "source-map": { @@ -3635,7 +4179,7 @@ "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -3646,7 +4190,7 @@ "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "widest-line": { @@ -3655,7 +4199,7 @@ "integrity": "sha1-DAnIXCqUaD0Nfq+O4JfVZL8OEFw=", "dev": true, "requires": { - "string-width": "1.0.2" + "string-width": "^1.0.1" }, "dependencies": { "is-fullwidth-code-point": { @@ -3664,7 +4208,7 @@ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "string-width": { @@ -3673,9 +4217,9 @@ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } } } @@ -3704,9 +4248,9 @@ "integrity": "sha512-0TZ20a+xcIl4u0+Mj5xDH2yOWdmQiXlKf9Hm+TgDXjTMsEYb+gDrmb8e8UNAzMCitX8NBqG4Z/FUQIyzv/R1JQ==", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" } }, "xdg-basedir": { @@ -3733,9 +4277,9 @@ "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "dev": true, "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", "window-size": "0.1.0" }, "dependencies": { diff --git a/samples/client/petstore/typescript-jquery/default/api/PetApi.ts b/samples/client/petstore/typescript-jquery/default/api/PetApi.ts index 68203071fd8..d80ef92fd5b 100644 --- a/samples/client/petstore/typescript-jquery/default/api/PetApi.ts +++ b/samples/client/petstore/typescript-jquery/default/api/PetApi.ts @@ -51,7 +51,10 @@ export class PetApi { * @summary Add a new pet to the store * @param body Pet object that needs to be added to the store */ - public addPet(body: models.Pet, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public addPet(body: models.Pet, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + > { let localVarPath = this.basePath + '/pet'; let queryParameters: any = {}; @@ -107,12 +110,15 @@ export class PetApi { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } - let dfd = $.Deferred(); + let dfd = $.Deferred< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + >(); $.ajax(requestOptions).then( (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), + dfd.resolve({response: jqXHR, body: data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject(xhr, errorThrown) + dfd.reject({response: xhr, errorThrown: errorThrown}) ); return dfd.promise(); } @@ -123,7 +129,10 @@ export class PetApi { * @param petId Pet id to delete * @param apiKey */ - public deletePet(petId: number, apiKey?: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public deletePet(petId: number, apiKey?: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + > { let localVarPath = this.basePath + '/pet/{petId}'.replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); let queryParameters: any = {}; @@ -176,12 +185,15 @@ export class PetApi { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } - let dfd = $.Deferred(); + let dfd = $.Deferred< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + >(); $.ajax(requestOptions).then( (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), + dfd.resolve({response: jqXHR, body: data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject(xhr, errorThrown) + dfd.reject({response: xhr, errorThrown: errorThrown}) ); return dfd.promise(); } @@ -191,7 +203,10 @@ export class PetApi { * @summary Finds Pets by status * @param status Status values that need to be considered for filter */ - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: Array; }> { + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< + { response: JQueryXHR; body: Array; }, + { response: JQueryXHR; errorThrown: string } + > { let localVarPath = this.basePath + '/pet/findByStatus'; let queryParameters: any = {}; @@ -245,12 +260,15 @@ export class PetApi { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } - let dfd = $.Deferred(); + let dfd = $.Deferred< + { response: JQueryXHR; body: Array; }, + { response: JQueryXHR; errorThrown: string } + >(); $.ajax(requestOptions).then( (data: Array, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), + dfd.resolve({response: jqXHR, body: data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject(xhr, errorThrown) + dfd.reject({response: xhr, errorThrown: errorThrown}) ); return dfd.promise(); } @@ -260,7 +278,10 @@ export class PetApi { * @summary Finds Pets by tags * @param tags Tags to filter by */ - public findPetsByTags(tags: Array, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: Array; }> { + public findPetsByTags(tags: Array, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< + { response: JQueryXHR; body: Array; }, + { response: JQueryXHR; errorThrown: string } + > { let localVarPath = this.basePath + '/pet/findByTags'; let queryParameters: any = {}; @@ -314,12 +335,15 @@ export class PetApi { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } - let dfd = $.Deferred(); + let dfd = $.Deferred< + { response: JQueryXHR; body: Array; }, + { response: JQueryXHR; errorThrown: string } + >(); $.ajax(requestOptions).then( (data: Array, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), + dfd.resolve({response: jqXHR, body: data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject(xhr, errorThrown) + dfd.reject({response: xhr, errorThrown: errorThrown}) ); return dfd.promise(); } @@ -329,7 +353,10 @@ export class PetApi { * @summary Find pet by ID * @param petId ID of pet to return */ - public getPetById(petId: number, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: models.Pet; }> { + public getPetById(petId: number, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< + { response: JQueryXHR; body: models.Pet; }, + { response: JQueryXHR; errorThrown: string } + > { let localVarPath = this.basePath + '/pet/{petId}'.replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); let queryParameters: any = {}; @@ -376,12 +403,15 @@ export class PetApi { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } - let dfd = $.Deferred(); + let dfd = $.Deferred< + { response: JQueryXHR; body: models.Pet; }, + { response: JQueryXHR; errorThrown: string } + >(); $.ajax(requestOptions).then( (data: models.Pet, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), + dfd.resolve({response: jqXHR, body: data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject(xhr, errorThrown) + dfd.reject({response: xhr, errorThrown: errorThrown}) ); return dfd.promise(); } @@ -391,7 +421,10 @@ export class PetApi { * @summary Update an existing pet * @param body Pet object that needs to be added to the store */ - public updatePet(body: models.Pet, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public updatePet(body: models.Pet, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + > { let localVarPath = this.basePath + '/pet'; let queryParameters: any = {}; @@ -447,12 +480,15 @@ export class PetApi { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } - let dfd = $.Deferred(); + let dfd = $.Deferred< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + >(); $.ajax(requestOptions).then( (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), + dfd.resolve({response: jqXHR, body: data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject(xhr, errorThrown) + dfd.reject({response: xhr, errorThrown: errorThrown}) ); return dfd.promise(); } @@ -464,7 +500,10 @@ export class PetApi { * @param name Updated name of the pet * @param status Updated status of the pet */ - public updatePetWithForm(petId: number, name?: string, status?: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public updatePetWithForm(petId: number, name?: string, status?: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + > { let localVarPath = this.basePath + '/pet/{petId}'.replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); let queryParameters: any = {}; @@ -533,12 +572,15 @@ export class PetApi { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } - let dfd = $.Deferred(); + let dfd = $.Deferred< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + >(); $.ajax(requestOptions).then( (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), + dfd.resolve({response: jqXHR, body: data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject(xhr, errorThrown) + dfd.reject({response: xhr, errorThrown: errorThrown}) ); return dfd.promise(); } @@ -550,7 +592,10 @@ export class PetApi { * @param additionalMetadata Additional data to pass to server * @param file file to upload */ - public uploadFile(petId: number, additionalMetadata?: string, file?: any, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: models.ApiResponse; }> { + public uploadFile(petId: number, additionalMetadata?: string, file?: any, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< + { response: JQueryXHR; body: models.ApiResponse; }, + { response: JQueryXHR; errorThrown: string } + > { let localVarPath = this.basePath + '/pet/{petId}/uploadImage'.replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); let queryParameters: any = {}; @@ -617,12 +662,15 @@ export class PetApi { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } - let dfd = $.Deferred(); + let dfd = $.Deferred< + { response: JQueryXHR; body: models.ApiResponse; }, + { response: JQueryXHR; errorThrown: string } + >(); $.ajax(requestOptions).then( (data: models.ApiResponse, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), + dfd.resolve({response: jqXHR, body: data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject(xhr, errorThrown) + dfd.reject({response: xhr, errorThrown: errorThrown}) ); return dfd.promise(); } diff --git a/samples/client/petstore/typescript-jquery/default/api/StoreApi.ts b/samples/client/petstore/typescript-jquery/default/api/StoreApi.ts index 1a7b91c282e..3a08a004bae 100644 --- a/samples/client/petstore/typescript-jquery/default/api/StoreApi.ts +++ b/samples/client/petstore/typescript-jquery/default/api/StoreApi.ts @@ -51,7 +51,10 @@ export class StoreApi { * @summary Delete purchase order by ID * @param orderId ID of the order that needs to be deleted */ - public deleteOrder(orderId: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public deleteOrder(orderId: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + > { let localVarPath = this.basePath + '/store/order/{orderId}'.replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId))); let queryParameters: any = {}; @@ -93,12 +96,15 @@ export class StoreApi { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } - let dfd = $.Deferred(); + let dfd = $.Deferred< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + >(); $.ajax(requestOptions).then( (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), + dfd.resolve({response: jqXHR, body: data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject(xhr, errorThrown) + dfd.reject({response: xhr, errorThrown: errorThrown}) ); return dfd.promise(); } @@ -107,7 +113,10 @@ export class StoreApi { * Returns a map of status codes to quantities * @summary Returns pet inventories by status */ - public getInventory(extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: { [key: string]: number; }; }> { + public getInventory(extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< + { response: JQueryXHR; body: { [key: string]: number; }; }, + { response: JQueryXHR; errorThrown: string } + > { let localVarPath = this.basePath + '/store/inventory'; let queryParameters: any = {}; @@ -148,12 +157,15 @@ export class StoreApi { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } - let dfd = $.Deferred(); + let dfd = $.Deferred< + { response: JQueryXHR; body: { [key: string]: number; }; }, + { response: JQueryXHR; errorThrown: string } + >(); $.ajax(requestOptions).then( (data: { [key: string]: number; }, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), + dfd.resolve({response: jqXHR, body: data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject(xhr, errorThrown) + dfd.reject({response: xhr, errorThrown: errorThrown}) ); return dfd.promise(); } @@ -163,7 +175,10 @@ export class StoreApi { * @summary Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ - public getOrderById(orderId: number, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: models.Order; }> { + public getOrderById(orderId: number, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< + { response: JQueryXHR; body: models.Order; }, + { response: JQueryXHR; errorThrown: string } + > { let localVarPath = this.basePath + '/store/order/{orderId}'.replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId))); let queryParameters: any = {}; @@ -205,12 +220,15 @@ export class StoreApi { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } - let dfd = $.Deferred(); + let dfd = $.Deferred< + { response: JQueryXHR; body: models.Order; }, + { response: JQueryXHR; errorThrown: string } + >(); $.ajax(requestOptions).then( (data: models.Order, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), + dfd.resolve({response: jqXHR, body: data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject(xhr, errorThrown) + dfd.reject({response: xhr, errorThrown: errorThrown}) ); return dfd.promise(); } @@ -220,7 +238,10 @@ export class StoreApi { * @summary Place an order for a pet * @param body order placed for purchasing the pet */ - public placeOrder(body: models.Order, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: models.Order; }> { + public placeOrder(body: models.Order, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< + { response: JQueryXHR; body: models.Order; }, + { response: JQueryXHR; errorThrown: string } + > { let localVarPath = this.basePath + '/store/order'; let queryParameters: any = {}; @@ -265,12 +286,15 @@ export class StoreApi { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } - let dfd = $.Deferred(); + let dfd = $.Deferred< + { response: JQueryXHR; body: models.Order; }, + { response: JQueryXHR; errorThrown: string } + >(); $.ajax(requestOptions).then( (data: models.Order, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), + dfd.resolve({response: jqXHR, body: data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject(xhr, errorThrown) + dfd.reject({response: xhr, errorThrown: errorThrown}) ); return dfd.promise(); } diff --git a/samples/client/petstore/typescript-jquery/default/api/UserApi.ts b/samples/client/petstore/typescript-jquery/default/api/UserApi.ts index 3e8308dac35..b896fd794b4 100644 --- a/samples/client/petstore/typescript-jquery/default/api/UserApi.ts +++ b/samples/client/petstore/typescript-jquery/default/api/UserApi.ts @@ -51,7 +51,10 @@ export class UserApi { * @summary Create user * @param body Created user object */ - public createUser(body: models.User, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public createUser(body: models.User, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + > { let localVarPath = this.basePath + '/user'; let queryParameters: any = {}; @@ -96,12 +99,15 @@ export class UserApi { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } - let dfd = $.Deferred(); + let dfd = $.Deferred< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + >(); $.ajax(requestOptions).then( (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), + dfd.resolve({response: jqXHR, body: data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject(xhr, errorThrown) + dfd.reject({response: xhr, errorThrown: errorThrown}) ); return dfd.promise(); } @@ -111,7 +117,10 @@ export class UserApi { * @summary Creates list of users with given input array * @param body List of user object */ - public createUsersWithArrayInput(body: Array, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public createUsersWithArrayInput(body: Array, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + > { let localVarPath = this.basePath + '/user/createWithArray'; let queryParameters: any = {}; @@ -156,12 +165,15 @@ export class UserApi { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } - let dfd = $.Deferred(); + let dfd = $.Deferred< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + >(); $.ajax(requestOptions).then( (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), + dfd.resolve({response: jqXHR, body: data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject(xhr, errorThrown) + dfd.reject({response: xhr, errorThrown: errorThrown}) ); return dfd.promise(); } @@ -171,7 +183,10 @@ export class UserApi { * @summary Creates list of users with given input array * @param body List of user object */ - public createUsersWithListInput(body: Array, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public createUsersWithListInput(body: Array, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + > { let localVarPath = this.basePath + '/user/createWithList'; let queryParameters: any = {}; @@ -216,12 +231,15 @@ export class UserApi { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } - let dfd = $.Deferred(); + let dfd = $.Deferred< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + >(); $.ajax(requestOptions).then( (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), + dfd.resolve({response: jqXHR, body: data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject(xhr, errorThrown) + dfd.reject({response: xhr, errorThrown: errorThrown}) ); return dfd.promise(); } @@ -231,7 +249,10 @@ export class UserApi { * @summary Delete user * @param username The name that needs to be deleted */ - public deleteUser(username: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public deleteUser(username: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + > { let localVarPath = this.basePath + '/user/{username}'.replace('{' + 'username' + '}', encodeURIComponent(String(username))); let queryParameters: any = {}; @@ -273,12 +294,15 @@ export class UserApi { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } - let dfd = $.Deferred(); + let dfd = $.Deferred< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + >(); $.ajax(requestOptions).then( (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), + dfd.resolve({response: jqXHR, body: data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject(xhr, errorThrown) + dfd.reject({response: xhr, errorThrown: errorThrown}) ); return dfd.promise(); } @@ -286,9 +310,12 @@ export class UserApi { /** * * @summary Get user by user name - * @param username The name that needs to be fetched. Use user1 for testing. + * @param username The name that needs to be fetched. Use user1 for testing. */ - public getUserByName(username: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: models.User; }> { + public getUserByName(username: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< + { response: JQueryXHR; body: models.User; }, + { response: JQueryXHR; errorThrown: string } + > { let localVarPath = this.basePath + '/user/{username}'.replace('{' + 'username' + '}', encodeURIComponent(String(username))); let queryParameters: any = {}; @@ -330,12 +357,15 @@ export class UserApi { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } - let dfd = $.Deferred(); + let dfd = $.Deferred< + { response: JQueryXHR; body: models.User; }, + { response: JQueryXHR; errorThrown: string } + >(); $.ajax(requestOptions).then( (data: models.User, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), + dfd.resolve({response: jqXHR, body: data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject(xhr, errorThrown) + dfd.reject({response: xhr, errorThrown: errorThrown}) ); return dfd.promise(); } @@ -346,7 +376,10 @@ export class UserApi { * @param username The user name for login * @param password The password for login in clear text */ - public loginUser(username: string, password: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body: string; }> { + public loginUser(username: string, password: string, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< + { response: JQueryXHR; body: string; }, + { response: JQueryXHR; errorThrown: string } + > { let localVarPath = this.basePath + '/user/login'; let queryParameters: any = {}; @@ -399,12 +432,15 @@ export class UserApi { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } - let dfd = $.Deferred(); + let dfd = $.Deferred< + { response: JQueryXHR; body: string; }, + { response: JQueryXHR; errorThrown: string } + >(); $.ajax(requestOptions).then( (data: string, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), + dfd.resolve({response: jqXHR, body: data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject(xhr, errorThrown) + dfd.reject({response: xhr, errorThrown: errorThrown}) ); return dfd.promise(); } @@ -413,7 +449,10 @@ export class UserApi { * * @summary Logs out current logged in user session */ - public logoutUser(extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public logoutUser(extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + > { let localVarPath = this.basePath + '/user/logout'; let queryParameters: any = {}; @@ -450,12 +489,15 @@ export class UserApi { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } - let dfd = $.Deferred(); + let dfd = $.Deferred< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + >(); $.ajax(requestOptions).then( (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), + dfd.resolve({response: jqXHR, body: data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject(xhr, errorThrown) + dfd.reject({response: xhr, errorThrown: errorThrown}) ); return dfd.promise(); } @@ -466,7 +508,10 @@ export class UserApi { * @param username name that need to be deleted * @param body Updated user object */ - public updateUser(username: string, body: models.User, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQueryPromise<{ response: JQueryXHR; body?: any; }> { + public updateUser(username: string, body: models.User, extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + > { let localVarPath = this.basePath + '/user/{username}'.replace('{' + 'username' + '}', encodeURIComponent(String(username))); let queryParameters: any = {}; @@ -516,12 +561,15 @@ export class UserApi { requestOptions = (Object).assign(requestOptions, this.defaultExtraJQueryAjaxSettings); } - let dfd = $.Deferred(); + let dfd = $.Deferred< + { response: JQueryXHR; body?: any; }, + { response: JQueryXHR; errorThrown: string } + >(); $.ajax(requestOptions).then( (data: any, textStatus: string, jqXHR: JQueryXHR) => - dfd.resolve(jqXHR, data), + dfd.resolve({response: jqXHR, body: data), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => - dfd.reject(xhr, errorThrown) + dfd.reject({response: xhr, errorThrown: errorThrown}) ); return dfd.promise(); } diff --git a/samples/client/petstore/typescript-jquery/default/model/Amount.ts b/samples/client/petstore/typescript-jquery/default/model/Amount.ts new file mode 100644 index 00000000000..5916e491d1c --- /dev/null +++ b/samples/client/petstore/typescript-jquery/default/model/Amount.ts @@ -0,0 +1,26 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import * as models from './models'; + +/** + * some description + */ +export interface Amount { + /** + * some description + */ + value: number; + + currency: models.Currency; + +} diff --git a/samples/client/petstore/typescript-jquery/default/model/Currency.ts b/samples/client/petstore/typescript-jquery/default/model/Currency.ts new file mode 100644 index 00000000000..a5f758cb6c3 --- /dev/null +++ b/samples/client/petstore/typescript-jquery/default/model/Currency.ts @@ -0,0 +1,19 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import * as models from './models'; + +/** + * some description + */ +export interface Currency { +} diff --git a/samples/client/petstore/typescript-jquery/default/model/models.ts b/samples/client/petstore/typescript-jquery/default/model/models.ts index f53c1dd42bd..840919adceb 100644 --- a/samples/client/petstore/typescript-jquery/default/model/models.ts +++ b/samples/client/petstore/typescript-jquery/default/model/models.ts @@ -1,5 +1,7 @@ +export * from './Amount'; export * from './ApiResponse'; export * from './Category'; +export * from './Currency'; export * from './Order'; export * from './Pet'; export * from './Tag'; diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/Controller.php b/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/Controller.php index 5081ae4ec39..e50111d6b38 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/Controller.php +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/Controller.php @@ -29,6 +29,7 @@ namespace OpenAPI\Server\Controller; +use Symfony\Bundle\FrameworkBundle\Controller\Controller as BaseController; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\HttpException; use OpenAPI\Server\Service\SerializerInterface; @@ -42,7 +43,7 @@ use OpenAPI\Server\Service\ValidatorInterface; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class Controller +class Controller extends BaseController { protected $validator; protected $serializer; diff --git a/samples/server/petstore/rust-server/.openapi-generator/VERSION b/samples/server/petstore/rust-server/.openapi-generator/VERSION index dde25ef08e8..0f58aa04141 100644 --- a/samples/server/petstore/rust-server/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/.openapi-generator/VERSION @@ -1 +1 @@ -3.1.1-SNAPSHOT \ No newline at end of file +3.1.2-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/pom.xml b/samples/server/petstore/rust-server/pom.xml index 6255746d0ef..eeefcb808a5 100644 --- a/samples/server/petstore/rust-server/pom.xml +++ b/samples/server/petstore/rust-server/pom.xml @@ -27,7 +27,21 @@ 1.2.1 - bundle-test + build + integration-test + + exec + + + cargo + + build + --examples + + + + + test integration-test exec diff --git a/samples/server/petstore/rust-server/src/client/mod.rs b/samples/server/petstore/rust-server/src/client/mod.rs index 798313d573d..587837a9bd1 100644 --- a/samples/server/petstore/rust-server/src/client/mod.rs +++ b/samples/server/petstore/rust-server/src/client/mod.rs @@ -96,26 +96,37 @@ fn into_base_path(input: &str, correct_scheme: Option<&'static str>) -> Result, Response=hyper::Response, Error=hyper::Error, Future=hyper::client::FutureResponse>>>, +pub struct Client where + F: Future + 'static { + client_service: Arc, Response=hyper::Response, Error=hyper::Error, Future=F>>>, base_path: String, } -impl fmt::Debug for Client { +impl fmt::Debug for Client where + F: Future + 'static { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Client {{ base_path: {} }}", self.base_path) } } -impl Client { +impl Clone for Client where + F: Future + 'static { + fn clone(&self) -> Self { + Client { + client_service: self.client_service.clone(), + base_path: self.base_path.clone() + } + } +} + +impl Client { /// Create an HTTP client. /// /// # Arguments /// * `handle` - tokio reactor handle to use for execution /// * `base_path` - base path of the client API, i.e. "www.my-api-implementation.com" - pub fn try_new_http(handle: Handle, base_path: &str) -> Result { + pub fn try_new_http(handle: Handle, base_path: &str) -> Result, ClientInitError> { let http_connector = swagger::http_connector(); Self::try_new_with_connector::( handle, @@ -135,7 +146,7 @@ impl Client { handle: Handle, base_path: &str, ca_certificate: CA, - ) -> Result + ) -> Result, ClientInitError> where CA: AsRef, { @@ -156,13 +167,13 @@ impl Client { /// * `ca_certificate` - Path to CA certificate used to authenticate the server /// * `client_key` - Path to the client private key /// * `client_certificate` - Path to the client's public certificate associated with the private key - pub fn try_new_https_mutual( + pub fn try_new_https_mutual( handle: Handle, base_path: &str, ca_certificate: CA, client_key: K, client_certificate: C, - ) -> Result + ) -> Result, ClientInitError> where CA: AsRef, K: AsRef, @@ -199,17 +210,17 @@ impl Client { base_path: &str, protocol: Option<&'static str>, connector_fn: Box C + Send + Sync>, - ) -> Result + ) -> Result, ClientInitError> where C: hyper::client::Connect + hyper::client::Service, { let connector = connector_fn(&handle); - let hyper_client = Box::new(hyper::Client::configure().connector(connector).build( + let client_service = Box::new(hyper::Client::configure().connector(connector).build( &handle, )); Ok(Client { - hyper_client: Arc::new(hyper_client), + client_service: Arc::new(client_service), base_path: into_base_path(base_path, protocol)?, }) } @@ -223,19 +234,41 @@ impl Client { /// The reason for this function's existence is to support legacy test code, which did mocking at the hyper layer. /// This is not a recommended way to write new tests. If other reasons are found for using this function, they /// should be mentioned here. - pub fn try_new_with_hyper_client(hyper_client: Arc, Response=hyper::Response, Error=hyper::Error, Future=hyper::client::FutureResponse>>>, - handle: Handle, - base_path: &str) - -> Result + #[deprecated(note="Use try_new_with_client_service instead")] + pub fn try_new_with_hyper_client( + hyper_client: Arc, Response=hyper::Response, Error=hyper::Error, Future=hyper::client::FutureResponse>>>, + handle: Handle, + base_path: &str + ) -> Result, ClientInitError> { Ok(Client { - hyper_client: hyper_client, + client_service: hyper_client, base_path: into_base_path(base_path, None)?, }) } } -impl Api for Client where C: Has + Has>{ +impl Client where + F: Future + 'static +{ + /// Constructor for creating a `Client` by passing in a pre-made `hyper` client Service. + /// + /// This allows adding custom wrappers around the underlying transport, for example for logging. + pub fn try_new_with_client_service(client_service: Arc, Response=hyper::Response, Error=hyper::Error, Future=F>>>, + handle: Handle, + base_path: &str) + -> Result, ClientInitError> + { + Ok(Client { + client_service: client_service, + base_path: into_base_path(base_path, None)?, + }) + } +} + +impl Api for Client where + F: Future + 'static, + C: Has + Has>{ fn test_special_tags(&self, param_client: models::Client, context: &C) -> Box> { @@ -267,7 +300,7 @@ impl Api for Client where C: Has + Has>{ - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -347,7 +380,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -425,7 +458,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -503,7 +536,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -581,7 +614,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -661,7 +694,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -726,7 +759,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -839,7 +872,7 @@ if let Some(body) = body { request.set_body(body_string.into_bytes()); - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -923,7 +956,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -997,7 +1030,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -1063,7 +1096,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -1130,7 +1163,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -1208,7 +1241,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -1271,7 +1304,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -1334,7 +1367,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -1419,7 +1452,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -1500,7 +1533,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -1596,7 +1629,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -1680,7 +1713,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -1776,7 +1809,7 @@ if let Some(body) = body { request.set_body(body_string.into_bytes()); - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -1846,7 +1879,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -1914,7 +1947,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -1984,7 +2017,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -2080,7 +2113,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -2169,7 +2202,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -2234,7 +2267,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -2299,7 +2332,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -2358,7 +2391,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -2426,7 +2459,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -2522,7 +2555,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -2613,7 +2646,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { @@ -2678,7 +2711,7 @@ if let Some(body) = body { - Box::new(self.hyper_client.call(request) + Box::new(self.client_service.call(request) .map_err(|e| ApiError(format!("No response received: {}", e))) .and_then(|mut response| { match response.status().as_u16() { diff --git a/samples/server/petstore/rust-server/src/server/mod.rs b/samples/server/petstore/rust-server/src/server/mod.rs index a71a4ded43d..a0142c41520 100644 --- a/samples/server/petstore/rust-server/src/server/mod.rs +++ b/samples/server/petstore/rust-server/src/server/mod.rs @@ -36,7 +36,7 @@ use std::io; use std::collections::BTreeSet; pub use swagger::auth::Authorization; -use swagger::{ApiError, XSpanId, XSpanIdString, Has}; +use swagger::{ApiError, XSpanId, XSpanIdString, Has, RequestParser}; use swagger::auth::Scopes; use {Api, @@ -207,6 +207,9 @@ where let api_impl = self.api_impl.clone(); let (method, uri, _, headers, body) = req.deconstruct(); let path = paths::GLOBAL_REGEX_SET.matches(uri.path()); + + // This match statement is duplicated below in `parse_operation_id()`. + // Please update both places if changing how this code is autogenerated. match &method { // TestSpecialTags - PATCH /another-fake/dummy @@ -3149,3 +3152,111 @@ fn multipart_boundary<'a>(headers: &'a Headers) -> Option<&'a str> { } }) } + +/// Request parser for `Api`. +pub struct ApiRequestParser; + +impl RequestParser for ApiRequestParser { + fn parse_operation_id(request: &Request) -> Result<&'static str, ()> { + let path = paths::GLOBAL_REGEX_SET.matches(request.uri().path()); + match request.method() { + + // TestSpecialTags - PATCH /another-fake/dummy + &hyper::Method::Patch if path.matched(paths::ID_ANOTHER_FAKE_DUMMY) => Ok("TestSpecialTags"), + + // FakeOuterBooleanSerialize - POST /fake/outer/boolean + &hyper::Method::Post if path.matched(paths::ID_FAKE_OUTER_BOOLEAN) => Ok("FakeOuterBooleanSerialize"), + + // FakeOuterCompositeSerialize - POST /fake/outer/composite + &hyper::Method::Post if path.matched(paths::ID_FAKE_OUTER_COMPOSITE) => Ok("FakeOuterCompositeSerialize"), + + // FakeOuterNumberSerialize - POST /fake/outer/number + &hyper::Method::Post if path.matched(paths::ID_FAKE_OUTER_NUMBER) => Ok("FakeOuterNumberSerialize"), + + // FakeOuterStringSerialize - POST /fake/outer/string + &hyper::Method::Post if path.matched(paths::ID_FAKE_OUTER_STRING) => Ok("FakeOuterStringSerialize"), + + // TestBodyWithQueryParams - PUT /fake/body-with-query-params + &hyper::Method::Put if path.matched(paths::ID_FAKE_BODY_WITH_QUERY_PARAMS) => Ok("TestBodyWithQueryParams"), + + // TestClientModel - PATCH /fake + &hyper::Method::Patch if path.matched(paths::ID_FAKE) => Ok("TestClientModel"), + + // TestEndpointParameters - POST /fake + &hyper::Method::Post if path.matched(paths::ID_FAKE) => Ok("TestEndpointParameters"), + + // TestEnumParameters - GET /fake + &hyper::Method::Get if path.matched(paths::ID_FAKE) => Ok("TestEnumParameters"), + + // TestInlineAdditionalProperties - POST /fake/inline-additionalProperties + &hyper::Method::Post if path.matched(paths::ID_FAKE_INLINE_ADDITIONALPROPERTIES) => Ok("TestInlineAdditionalProperties"), + + // TestJsonFormData - GET /fake/jsonFormData + &hyper::Method::Get if path.matched(paths::ID_FAKE_JSONFORMDATA) => Ok("TestJsonFormData"), + + // TestClassname - PATCH /fake_classname_test + &hyper::Method::Patch if path.matched(paths::ID_FAKE_CLASSNAME_TEST) => Ok("TestClassname"), + + // AddPet - POST /pet + &hyper::Method::Post if path.matched(paths::ID_PET) => Ok("AddPet"), + + // DeletePet - DELETE /pet/{petId} + &hyper::Method::Delete if path.matched(paths::ID_PET_PETID) => Ok("DeletePet"), + + // FindPetsByStatus - GET /pet/findByStatus + &hyper::Method::Get if path.matched(paths::ID_PET_FINDBYSTATUS) => Ok("FindPetsByStatus"), + + // FindPetsByTags - GET /pet/findByTags + &hyper::Method::Get if path.matched(paths::ID_PET_FINDBYTAGS) => Ok("FindPetsByTags"), + + // GetPetById - GET /pet/{petId} + &hyper::Method::Get if path.matched(paths::ID_PET_PETID) => Ok("GetPetById"), + + // UpdatePet - PUT /pet + &hyper::Method::Put if path.matched(paths::ID_PET) => Ok("UpdatePet"), + + // UpdatePetWithForm - POST /pet/{petId} + &hyper::Method::Post if path.matched(paths::ID_PET_PETID) => Ok("UpdatePetWithForm"), + + // UploadFile - POST /pet/{petId}/uploadImage + &hyper::Method::Post if path.matched(paths::ID_PET_PETID_UPLOADIMAGE) => Ok("UploadFile"), + + // DeleteOrder - DELETE /store/order/{order_id} + &hyper::Method::Delete if path.matched(paths::ID_STORE_ORDER_ORDER_ID) => Ok("DeleteOrder"), + + // GetInventory - GET /store/inventory + &hyper::Method::Get if path.matched(paths::ID_STORE_INVENTORY) => Ok("GetInventory"), + + // GetOrderById - GET /store/order/{order_id} + &hyper::Method::Get if path.matched(paths::ID_STORE_ORDER_ORDER_ID) => Ok("GetOrderById"), + + // PlaceOrder - POST /store/order + &hyper::Method::Post if path.matched(paths::ID_STORE_ORDER) => Ok("PlaceOrder"), + + // CreateUser - POST /user + &hyper::Method::Post if path.matched(paths::ID_USER) => Ok("CreateUser"), + + // CreateUsersWithArrayInput - POST /user/createWithArray + &hyper::Method::Post if path.matched(paths::ID_USER_CREATEWITHARRAY) => Ok("CreateUsersWithArrayInput"), + + // CreateUsersWithListInput - POST /user/createWithList + &hyper::Method::Post if path.matched(paths::ID_USER_CREATEWITHLIST) => Ok("CreateUsersWithListInput"), + + // DeleteUser - DELETE /user/{username} + &hyper::Method::Delete if path.matched(paths::ID_USER_USERNAME) => Ok("DeleteUser"), + + // GetUserByName - GET /user/{username} + &hyper::Method::Get if path.matched(paths::ID_USER_USERNAME) => Ok("GetUserByName"), + + // LoginUser - GET /user/login + &hyper::Method::Get if path.matched(paths::ID_USER_LOGIN) => Ok("LoginUser"), + + // LogoutUser - GET /user/logout + &hyper::Method::Get if path.matched(paths::ID_USER_LOGOUT) => Ok("LogoutUser"), + + // UpdateUser - PUT /user/{username} + &hyper::Method::Put if path.matched(paths::ID_USER_USERNAME) => Ok("UpdateUser"), + _ => Err(()), + } + } +}