diff --git a/.travis.yml b/.travis.yml index 82d847004002..0a45e34de10b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -86,11 +86,11 @@ script: #- if [ $DOCKER_HUB_USERNAME ]; then docker login --email=$DOCKER_HUB_EMAIL --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD && docker build -t $DOCKER_CODEGEN_CLI_IMAGE_NAME ./modules/swagger-codegen-cli && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest $DOCKER_CODEGEN_CLI_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "master" ]; then docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME; fi; fi #after_success: - # push a snapshot version to maven repo - - if [ $SONATYPE_USERNAME ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_BRANCH" = "master" ]; then - mvn clean deploy --settings .travis/settings.xml; - echo "Finished mvn clean deploy for $TRAVIS_BRANCH"; - fi; +# # push a snapshot version to maven repo +# - if [ $SONATYPE_USERNAME ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_BRANCH" = "master" ]; then +# mvn clean deploy --settings .travis/settings.xml; +# echo "Finished mvn clean deploy for $TRAVIS_BRANCH"; +# fi; env: - DOCKER_GENERATOR_IMAGE_NAME=swaggerapi/swagger-generator DOCKER_CODEGEN_CLI_IMAGE_NAME=swaggerapi/swagger-codegen-cli diff --git a/README.md b/README.md index 0135cd503978..2581682674b0 100644 --- a/README.md +++ b/README.md @@ -929,6 +929,7 @@ Presentations/Videos/Tutorials/Books - 2017/12/07 - [API-driven development with OpenAPI and Swagger, Part 2](https://www.itworld.com/article/3199190/apis/api-driven-development-with-openapi-and-swagger-part-2.html) by Matthew Tyson - 2017/12/29 - [REST APIs代码生成指南](https://gumroad.com/l/swagger_codegen_beginner_zh)(eBook) by [William Cheng](https://github.com/wing328), [Xin Meng](https://github.com/xmeng1) - 2017/12/21 - [Using Protocol Buffer to Generate SDK at Hootsuite](http://code.hootsuite.com/using-protocol-buffer-to-generate-sdk-at-hoosuite/?lipi=urn%3Ali%3Apage%3Ad_flagship3_messaging%3By4ATz3SDRXyvXJJ14LQysQ%3D%3D) by [Joy Zhang](https://www.linkedin.com/in/joy8zhang/) +- 2018/01/11 - [Swagger 工具箱介绍及代码自动生成示例](https://github.com/qct/swagger-example) by [qct](https://github.com/qct) # Swagger Codegen Core Team diff --git a/bin/java-vertx-rx-petstore-server.sh b/bin/java-vertx-rx-petstore-server.sh index f569df51cc68..92c7c3550811 100755 --- a/bin/java-vertx-rx-petstore-server.sh +++ b/bin/java-vertx-rx-petstore-server.sh @@ -26,6 +26,6 @@ fi # 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 -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l java-vertx -o samples/server/petstore/java-vertx/rx -DvertxSwaggerRouterVersion=1.2.0,rxInterface=true" +ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l java-vertx --artifact-id swagger-java-vertx-rx-server -o samples/server/petstore/java-vertx/rx -DvertxSwaggerRouterVersion=1.2.0,rxInterface=true" java $JAVA_OPTS -jar $executable $ags diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractJavaCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractJavaCodegen.java index 4b51baeac63d..40af7e2111b8 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractJavaCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractJavaCodegen.java @@ -1269,13 +1269,13 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code } /** - * Output the Getter name for boolean property, e.g. isActive + * Output the partial Getter name for boolean property, e.g. Active * * @param name the name of the property - * @return getter name based on naming convention + * @return partial getter name based on naming convention */ public String toBooleanGetter(String name) { - return "is" + getterAndSetterCapitalize(name); + return getterAndSetterCapitalize(name); } @Override diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractScalaCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractScalaCodegen.java index 5628f0bc29be..584aff61e294 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractScalaCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractScalaCodegen.java @@ -6,6 +6,8 @@ import java.util.Iterator; import java.util.List; import java.util.Map; +import com.samskivert.mustache.Escapers; +import com.samskivert.mustache.Mustache; import io.swagger.codegen.CliOption; import io.swagger.codegen.CodegenConstants; import io.swagger.codegen.DefaultCodegen; @@ -44,7 +46,50 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen { "Any", "List", "Seq", - "Map")); + "Map", + "Array")); + + reservedWords.addAll(Arrays.asList( + "abstract", + "case", + "catch", + "class", + "def", + "do", + "else", + "extends", + "false", + "final", + "finally", + "for", + "forSome", + "if", + "implicit", + "import", + "lazy", + "match", + "new", + "null", + "object", + "override", + "package", + "private", + "protected", + "return", + "sealed", + "super", + "this", + "throw", + "trait", + "try", + "true", + "type", + "val", + "var", + "while", + "with", + "yield" + )); cliOptions.add(new CliOption(CodegenConstants.MODEL_PACKAGE, CodegenConstants.MODEL_PACKAGE_DESC)); cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC)); @@ -80,7 +125,30 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen { if (this.reservedWordsMappings().containsKey(name)) { return this.reservedWordsMappings().get(name); } - return "_" + name; + // Reserved words will be further escaped at the mustache compiler level. + // Scala escaping done here (via `, without compiler escaping) would otherwise be HTML encoded. + return "`" + name + "`"; + } + + @Override + public Mustache.Compiler processCompiler(Mustache.Compiler compiler) { + Mustache.Escaper SCALA = new Mustache.Escaper() { + @Override public String escape (String text) { + // Fix included as suggested by akkie in #6393 + // The given text is a reserved word which is escaped by enclosing it with grave accents. If we would + // escape that with the default Mustache `HTML` escaper, then the escaper would also escape our grave + // accents. So we remove the grave accents before the escaping and add it back after the escaping. + if (text.startsWith("`") && text.endsWith("`")) { + String unescaped = text.substring(1, text.length() - 1); + return "`" + Escapers.HTML.escape(unescaped) + "`"; + } + + // All none reserved words will be escaped with the default Mustache `HTML` escaper + return Escapers.HTML.escape(text); + } + }; + + return compiler.withEscaper(SCALA); } @Override diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ScalaClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ScalaClientCodegen.java index 7bd5d09256db..3e8a838ac580 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ScalaClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/ScalaClientCodegen.java @@ -5,7 +5,6 @@ import io.swagger.codegen.*; import java.io.File; import java.util.Arrays; import java.util.HashMap; -import java.util.Map; import org.apache.commons.lang3.StringUtils; @@ -97,6 +96,7 @@ public class ScalaClientCodegen extends AbstractScalaCodegen implements CodegenC typeMapping.put("file", "File"); typeMapping.put("binary", "Array[Byte]"); typeMapping.put("ByteArray", "Array[Byte]"); + typeMapping.put("ArrayByte", "Array[Byte]"); typeMapping.put("date-time", "Date"); typeMapping.put("DateTime", "Date"); diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/ApiClient.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/ApiClient.mustache index 261402281f8a..e6cd79c04168 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/ApiClient.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/ApiClient.mustache @@ -15,7 +15,6 @@ import org.glassfish.jersey.client.ClientConfig; import org.glassfish.jersey.client.ClientProperties; import org.glassfish.jersey.client.HttpUrlConnectorProvider; import org.glassfish.jersey.jackson.JacksonFeature; -import org.glassfish.jersey.logging.LoggingFeature; import org.glassfish.jersey.media.multipart.FormDataBodyPart; import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import org.glassfish.jersey.media.multipart.MultiPart; @@ -27,9 +26,11 @@ import java.io.InputStream; {{^supportJava6}} import java.nio.file.Files; import java.nio.file.StandardCopyOption; +import org.glassfish.jersey.logging.LoggingFeature; {{/supportJava6}} {{#supportJava6}} import org.apache.commons.io.FileUtils; +import org.glassfish.jersey.filter.LoggingFilter; {{/supportJava6}} import java.util.Collection; import java.util.Collections; @@ -771,10 +772,15 @@ public class ApiClient { clientConfig.register(JacksonFeature.class); clientConfig.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true); if (debugging) { +{{^supportJava6}} clientConfig.register(new LoggingFeature(java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME), java.util.logging.Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY, 1024*50 /* Log payloads up to 50K */)); clientConfig.property(LoggingFeature.LOGGING_FEATURE_VERBOSITY, LoggingFeature.Verbosity.PAYLOAD_ANY); // Set logger to ALL java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME).setLevel(java.util.logging.Level.ALL); +{{/supportJava6}} +{{#supportJava6}} + clientConfig.register(new LoggingFilter(java.util.logging.Logger.getLogger(LoggingFilter.class.getName()), true)); +{{/supportJava6}} } performAdditionalClientConfiguration(clientConfig); return ClientBuilder.newClient(clientConfig); diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/build.gradle.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/build.gradle.mustache index 8394d1253e48..3193c09b377c 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/build.gradle.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/build.gradle.mustache @@ -107,11 +107,14 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.15" jackson_version = "2.8.9" - jersey_version = "2.25.1" {{#supportJava6}} + jersey_version = "2.6" commons_io_version=2.5 commons_lang3_version=3.6 {{/supportJava6}} + {{^supportJava6}} + jersey_version = "2.25.1" + {{/supportJava6}} junit_version = "4.12" } diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/build.sbt.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/build.sbt.mustache index ba6f9e36e5ed..a53cc9d93860 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/build.sbt.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/build.sbt.mustache @@ -10,9 +10,9 @@ lazy val root = (project in file(".")). resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( "io.swagger" % "swagger-annotations" % "1.5.15", - "org.glassfish.jersey.core" % "jersey-client" % "2.25.1", - "org.glassfish.jersey.media" % "jersey-media-multipart" % "2.25.1", - "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.25.1", + "org.glassfish.jersey.core" % "jersey-client" % {{#supportJava6}}"2.6"{{/supportJava6}}{{^supportJava6}}"2.25.1"{{/supportJava6}}, + "org.glassfish.jersey.media" % "jersey-media-multipart" % {{#supportJava6}}"2.6"{{/supportJava6}}{{^supportJava6}}"2.25.1"{{/supportJava6}}, + "org.glassfish.jersey.media" % "jersey-media-json-jackson" % {{#supportJava6}}"2.6"{{/supportJava6}}{{^supportJava6}}"2.25.1"{{/supportJava6}}, "com.fasterxml.jackson.core" % "jackson-core" % "{{^threetenbp}}2.8.9{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}}" % "compile", "com.fasterxml.jackson.core" % "jackson-annotations" % "{{^threetenbp}}2.8.9{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}}" % "compile", "com.fasterxml.jackson.core" % "jackson-databind" % "{{^threetenbp}}2.8.9{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}}" % "compile", diff --git a/modules/swagger-codegen/src/main/resources/Java/pojo.mustache b/modules/swagger-codegen/src/main/resources/Java/pojo.mustache index a2929417b09c..88c6b8e4c3e7 100644 --- a/modules/swagger-codegen/src/main/resources/Java/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/pojo.mustache @@ -125,7 +125,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela {{#vendorExtensions.extraAnnotation}} {{{vendorExtensions.extraAnnotation}}} {{/vendorExtensions.extraAnnotation}} - public {{{datatypeWithEnum}}} {{getter}}() { + public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() { return {{name}}; } {{^isReadOnly}} diff --git a/modules/swagger-codegen/src/main/resources/JavaInflector/pojo.mustache b/modules/swagger-codegen/src/main/resources/JavaInflector/pojo.mustache index 74859ab39b45..8b50a3ded9e2 100644 --- a/modules/swagger-codegen/src/main/resources/JavaInflector/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaInflector/pojo.mustache @@ -42,7 +42,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali {{#vendorExtensions.extraAnnotation}}{{{vendorExtensions.extraAnnotation}}}{{/vendorExtensions.extraAnnotation}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") @JsonProperty("{{baseName}}") - public {{{datatypeWithEnum}}} {{getter}}() { + public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() { return {{name}}; } public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/pojo.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/pojo.mustache index 05543a0dd0e0..2b6b95a5dbc5 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/pojo.mustache @@ -33,7 +33,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali {{#vendorExtensions.extraAnnotation}}{{{vendorExtensions.extraAnnotation}}}{{/vendorExtensions.extraAnnotation}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") @JsonProperty("{{baseName}}") -{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() { +{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() { return {{name}}; } public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/pojo.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/pojo.mustache index f1bcb38e57d0..b3817e2c81f9 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/pojo.mustache @@ -64,16 +64,16 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} { {{#vendorExtensions.extraAnnotation}} {{{vendorExtensions.extraAnnotation}}} {{/vendorExtensions.extraAnnotation}} -{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} {{#isEnum}}{{^isListContainer}}{{^isMapContainer}}public {{datatype}} {{getter}}() { +{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} {{#isEnum}}{{^isListContainer}}{{^isMapContainer}}public {{datatype}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() { if ({{name}} == null) { return null; } return {{name}}.value(); - }{{/isMapContainer}}{{/isListContainer}}{{/isEnum}}{{#isEnum}}{{#isListContainer}}public {{{datatypeWithEnum}}} {{getter}}() { + }{{/isMapContainer}}{{/isListContainer}}{{/isEnum}}{{#isEnum}}{{#isListContainer}}public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() { return {{name}}; - }{{/isListContainer}}{{/isEnum}}{{#isEnum}}{{#isMapContainer}}public {{{datatypeWithEnum}}} {{getter}}() { + }{{/isListContainer}}{{/isEnum}}{{#isEnum}}{{#isMapContainer}}public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() { return {{name}}; - }{{/isMapContainer}}{{/isEnum}}{{^isEnum}}public {{{datatypeWithEnum}}} {{getter}}() { + }{{/isMapContainer}}{{/isEnum}}{{^isEnum}}public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() { return {{name}}; }{{/isEnum}} diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/pojo.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/pojo.mustache index 69a600031029..378ec210f2b5 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/pojo.mustache @@ -85,7 +85,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali @JsonProperty("{{baseName}}") {{/jackson}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") -{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() { +{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() { return {{name}}; } {{^isReadOnly}} diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/pojo.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/pojo.mustache index a2c7e8c000c7..8afc16cf9d8b 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/pojo.mustache @@ -28,7 +28,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali {{#vendorExtensions.extraAnnotation}}{{{vendorExtensions.extraAnnotation}}}{{/vendorExtensions.extraAnnotation}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") @JsonProperty("{{baseName}}") -{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() { +{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() { return {{name}}; } public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/pojo.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/pojo.mustache index 8abd4bcd94b8..99e0576bdbec 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/pojo.mustache @@ -28,7 +28,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali {{#vendorExtensions.extraAnnotation}}{{{vendorExtensions.extraAnnotation}}}{{/vendorExtensions.extraAnnotation}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") @JsonProperty("{{baseName}}") -{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() { +{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() { return {{name}}; } public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/pojo.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/pojo.mustache index 73d96a3b16bb..52c1df7c815d 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/pojo.mustache @@ -31,7 +31,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali {{#vendorExtensions.extraAnnotation}}{{{vendorExtensions.extraAnnotation}}}{{/vendorExtensions.extraAnnotation}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") @JsonProperty("{{baseName}}") -{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() { +{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() { return {{name}}; } public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { diff --git a/modules/swagger-codegen/src/main/resources/JavaPlayFramework/pojo.mustache b/modules/swagger-codegen/src/main/resources/JavaPlayFramework/pojo.mustache index c7ce1c4dadb0..3d1a7ca885a7 100644 --- a/modules/swagger-codegen/src/main/resources/JavaPlayFramework/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaPlayFramework/pojo.mustache @@ -83,7 +83,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali {{#vendorExtensions.extraAnnotation}} {{{vendorExtensions.extraAnnotation}}} {{/vendorExtensions.extraAnnotation}} - {{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() { + {{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() { return {{name}}; } diff --git a/modules/swagger-codegen/src/main/resources/JavaSpring/pojo.mustache b/modules/swagger-codegen/src/main/resources/JavaSpring/pojo.mustache index 96aea0b41c7b..3a49211f64eb 100644 --- a/modules/swagger-codegen/src/main/resources/JavaSpring/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaSpring/pojo.mustache @@ -87,7 +87,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali {{{vendorExtensions.extraAnnotation}}} {{/vendorExtensions.extraAnnotation}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}") -{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() { +{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() { return {{name}}; } diff --git a/modules/swagger-codegen/src/main/resources/JavaVertXServer/apiVerticle.mustache b/modules/swagger-codegen/src/main/resources/JavaVertXServer/apiVerticle.mustache index 715e7aa11f36..74b976f66a75 100644 --- a/modules/swagger-codegen/src/main/resources/JavaVertXServer/apiVerticle.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaVertXServer/apiVerticle.mustache @@ -19,8 +19,17 @@ public class {{classname}}Verticle extends AbstractVerticle { {{#operations}}{{#operation}}{{#vendorExtensions}}final static String {{x-serviceid-varname}} = "{{x-serviceid}}"; {{/vendorExtensions}}{{/operation}}{{/operations}} - //TODO : create Implementation - {{classname}} service = new {{classname}}Impl(); + final {{classname}} service; + + public {{classname}}Verticle() { + try { + Class serviceImplClass = getClass().getClassLoader().loadClass("{{package}}.{{classname}}Impl"); + service = ({{classname}})serviceImplClass.newInstance(); + } catch (Exception e) { + logUnexpectedError("{{classname}}Verticle constructor", e); + throw new RuntimeException(e); + } + } @Override public void start() throws Exception { diff --git a/modules/swagger-codegen/src/main/resources/JavaVertXServer/pojo.mustache b/modules/swagger-codegen/src/main/resources/JavaVertXServer/pojo.mustache index c3f95a095c2c..e2be0d8ba785 100644 --- a/modules/swagger-codegen/src/main/resources/JavaVertXServer/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaVertXServer/pojo.mustache @@ -20,7 +20,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali {{#vars}} {{#vendorExtensions.extraAnnotation}}{{vendorExtensions.extraAnnotation}}{{/vendorExtensions.extraAnnotation}} @JsonProperty("{{baseName}}") - public {{{datatypeWithEnum}}} {{getter}}() { + public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() { return {{name}}; } public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { diff --git a/modules/swagger-codegen/src/main/resources/MSF4J/pojo.mustache b/modules/swagger-codegen/src/main/resources/MSF4J/pojo.mustache index 3f1179dee460..b9fef349d811 100644 --- a/modules/swagger-codegen/src/main/resources/MSF4J/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/MSF4J/pojo.mustache @@ -78,11 +78,11 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali {{/maximum}} * @return {{name}} **/ - {{#vendorExtensions.extraAnnotation}} + {{#vendorExtensions.extraAnnotation}} {{{vendorExtensions.extraAnnotation}}} {{/vendorExtensions.extraAnnotation}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") - public {{{datatypeWithEnum}}} {{getter}}() { + public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() { return {{name}}; } {{^isReadOnly}} diff --git a/modules/swagger-codegen/src/main/resources/java-pkmst/pojo.mustache b/modules/swagger-codegen/src/main/resources/java-pkmst/pojo.mustache index 5830c643aebd..a57abed0ef16 100644 --- a/modules/swagger-codegen/src/main/resources/java-pkmst/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/java-pkmst/pojo.mustache @@ -87,7 +87,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali {{{vendorExtensions.extraAnnotation}}} {{/vendorExtensions.extraAnnotation}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}") -{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() { +{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() { return {{name}}; } diff --git a/modules/swagger-codegen/src/main/resources/undertow/pojo.mustache b/modules/swagger-codegen/src/main/resources/undertow/pojo.mustache index fd6a4b34fa15..cb83418b77da 100644 --- a/modules/swagger-codegen/src/main/resources/undertow/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/undertow/pojo.mustache @@ -22,7 +22,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali {{#vendorExtensions.extraAnnotation}}{{{vendorExtensions.extraAnnotation}}}{{/vendorExtensions.extraAnnotation}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") @JsonProperty("{{baseName}}") - public {{{datatypeWithEnum}}} {{getter}}() { + public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() { return {{name}}; } public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/java/JavaModelTest.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/java/JavaModelTest.java index e064a189ec4a..5a610b1fbea7 100644 --- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/java/JavaModelTest.java +++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/java/JavaModelTest.java @@ -715,7 +715,7 @@ public class JavaModelTest { Assert.assertEquals(cp.baseType, "Boolean"); Assert.assertTrue(cp.isNotContainer); Assert.assertTrue(cp.isBoolean); - Assert.assertEquals(cp.getter, "isProperty"); + Assert.assertEquals(cp.getter, "Property"); } -} \ No newline at end of file +} diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/languages/AbstractScalaCodegenTest.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/languages/AbstractScalaCodegenTest.java index 415f346c1d49..e29b9fd09c2b 100644 --- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/languages/AbstractScalaCodegenTest.java +++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/languages/AbstractScalaCodegenTest.java @@ -37,7 +37,8 @@ public class AbstractScalaCodegenTest { String result = abstractScalaCodegen.formatIdentifier(className, true); - Assert.assertTrue("_ReservedWord".equals(result)); + // NOTE: reserved words are further escaped at the compiler level. + Assert.assertTrue("`ReservedWord`".equals(result)); } @Test diff --git a/modules/swagger-codegen/src/test/resources/integrationtests/scala/client/required-attributes-expected/src/main/scala/io/swagger/client/api/HobbiesApi.scala b/modules/swagger-codegen/src/test/resources/integrationtests/scala/client/required-attributes-expected/src/main/scala/io/swagger/client/api/HobbiesApi.scala index 325b0069bbbd..3f8ca7c48809 100644 --- a/modules/swagger-codegen/src/test/resources/integrationtests/scala/client/required-attributes-expected/src/main/scala/io/swagger/client/api/HobbiesApi.scala +++ b/modules/swagger-codegen/src/test/resources/integrationtests/scala/client/required-attributes-expected/src/main/scala/io/swagger/client/api/HobbiesApi.scala @@ -86,6 +86,7 @@ class HobbiesApi( * Query hobbies with some additional optional meaningless parameters * * @param s a string (optional, default to some string) + * @param `class` a string, testing keyword escaping (optional, default to some string) * @param i an integer (optional, default to 1) * @param l a long (optional, default to 2) * @param bool a bool (optional, default to true) @@ -97,8 +98,8 @@ class HobbiesApi( * @param bin an octet string (optional, default to DEADBEEF) * @return Hobby */ - def getHobbies(s: Option[String] = Option("some string"), i: Option[Integer] = Option(1), l: Option[Long] = Option(2), bool: Option[Boolean] = Option(true), f: Option[Float] = Option(0.1), d: Option[Double] = Option(10.005), datetime: Option[Date] = Option(dateTimeFormatter.parse("2018-01-01T08:30:00Z-04:00")), date: Option[Date] = Option(dateFormatter.parse("2018-01-01")), b: Option[ArrayByte] = Option("c3dhZ2dlciBjb2RlZ2Vu".getBytes), bin: Option[ArrayByte] = Option("DEADBEEF".getBytes)): Option[Hobby] = { - val await = Try(Await.result(getHobbiesAsync(s, i, l, bool, f, d, datetime, date, b, bin), Duration.Inf)) + def getHobbies(s: Option[String] = Option("some string"), `class`: Option[String] = Option("some string"), i: Option[Integer] = Option(1), l: Option[Long] = Option(2), bool: Option[Boolean] = Option(true), f: Option[Float] = Option(0.1), d: Option[Double] = Option(10.005), datetime: Option[Date] = Option(dateTimeFormatter.parse("2018-01-01T08:30:00Z-04:00")), date: Option[Date] = Option(dateFormatter.parse("2018-01-01")), b: Option[Array[Byte]] = Option("c3dhZ2dlciBjb2RlZ2Vu".getBytes), bin: Option[Array[Byte]] = Option("DEADBEEF".getBytes)): Option[Hobby] = { + val await = Try(Await.result(getHobbiesAsync(s, `class`, i, l, bool, f, d, datetime, date, b, bin), Duration.Inf)) await match { case Success(i) => Some(await.get) case Failure(t) => None @@ -110,6 +111,7 @@ class HobbiesApi( * Query hobbies with some additional optional meaningless parameters * * @param s a string (optional, default to some string) + * @param `class` a string, testing keyword escaping (optional, default to some string) * @param i an integer (optional, default to 1) * @param l a long (optional, default to 2) * @param bool a bool (optional, default to true) @@ -121,8 +123,8 @@ class HobbiesApi( * @param bin an octet string (optional, default to DEADBEEF) * @return Future(Hobby) */ - def getHobbiesAsync(s: Option[String] = Option("some string"), i: Option[Integer] = Option(1), l: Option[Long] = Option(2), bool: Option[Boolean] = Option(true), f: Option[Float] = Option(0.1), d: Option[Double] = Option(10.005), datetime: Option[Date] = Option(dateTimeFormatter.parse("2018-01-01T08:30:00Z-04:00")), date: Option[Date] = Option(dateFormatter.parse("2018-01-01")), b: Option[ArrayByte] = Option("c3dhZ2dlciBjb2RlZ2Vu".getBytes), bin: Option[ArrayByte] = Option("DEADBEEF".getBytes)): Future[Hobby] = { - helper.getHobbies(s, i, l, bool, f, d, datetime, date, b, bin) + def getHobbiesAsync(s: Option[String] = Option("some string"), `class`: Option[String] = Option("some string"), i: Option[Integer] = Option(1), l: Option[Long] = Option(2), bool: Option[Boolean] = Option(true), f: Option[Float] = Option(0.1), d: Option[Double] = Option(10.005), datetime: Option[Date] = Option(dateTimeFormatter.parse("2018-01-01T08:30:00Z-04:00")), date: Option[Date] = Option(dateFormatter.parse("2018-01-01")), b: Option[Array[Byte]] = Option("c3dhZ2dlciBjb2RlZ2Vu".getBytes), bin: Option[Array[Byte]] = Option("DEADBEEF".getBytes)): Future[Hobby] = { + helper.getHobbies(s, `class`, i, l, bool, f, d, datetime, date, b, bin) } } @@ -130,6 +132,7 @@ class HobbiesApi( class HobbiesApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends ApiClient(client, config) { def getHobbies(s: Option[String] = Option("some string"), + `class`: Option[String] = Option("some string"), i: Option[Integer] = Option(1), l: Option[Long] = Option(2), bool: Option[Boolean] = Option(true), @@ -137,8 +140,8 @@ class HobbiesApiAsyncHelper(client: TransportClient, config: SwaggerConfig) exte d: Option[Double] = Option(10.005), datetime: Option[Date] = Option(dateTimeFormatter.parse("2018-01-01T08:30:00Z-04:00")), date: Option[Date] = Option(dateFormatter.parse("2018-01-01")), - b: Option[ArrayByte] = Option("c3dhZ2dlciBjb2RlZ2Vu".getBytes), - bin: Option[ArrayByte] = Option("DEADBEEF".getBytes) + b: Option[Array[Byte]] = Option("c3dhZ2dlciBjb2RlZ2Vu".getBytes), + bin: Option[Array[Byte]] = Option("DEADBEEF".getBytes) )(implicit reader: ClientResponseReader[Hobby]): Future[Hobby] = { // create path and map variables val path = (addFmt("/hobbies")) @@ -151,6 +154,10 @@ class HobbiesApiAsyncHelper(client: TransportClient, config: SwaggerConfig) exte case Some(param) => queryParams += "s" -> param.toString case _ => queryParams } + `class` match { + case Some(param) => queryParams += "class" -> param.toString + case _ => queryParams + } i match { case Some(param) => queryParams += "i" -> param.toString case _ => queryParams diff --git a/modules/swagger-codegen/src/test/resources/integrationtests/scala/client/required-attributes-expected/src/main/scala/io/swagger/client/model/Hobby.scala b/modules/swagger-codegen/src/test/resources/integrationtests/scala/client/required-attributes-expected/src/main/scala/io/swagger/client/model/Hobby.scala index 30782d0119f8..02f64681fa40 100644 --- a/modules/swagger-codegen/src/test/resources/integrationtests/scala/client/required-attributes-expected/src/main/scala/io/swagger/client/model/Hobby.scala +++ b/modules/swagger-codegen/src/test/resources/integrationtests/scala/client/required-attributes-expected/src/main/scala/io/swagger/client/model/Hobby.scala @@ -23,7 +23,7 @@ case class Hobby ( enabled: Option[Boolean] = None, created: Option[Date] = None, timestamp: Option[Date] = None, - bytes: Option[ArrayByte] = None, + bytes: Option[Array[Byte]] = None, binary: Option[String] = None ) diff --git a/modules/swagger-codegen/src/test/resources/integrationtests/scala/client/required-attributes-spec.json b/modules/swagger-codegen/src/test/resources/integrationtests/scala/client/required-attributes-spec.json index 00829eb2655d..db23005df4a5 100644 --- a/modules/swagger-codegen/src/test/resources/integrationtests/scala/client/required-attributes-spec.json +++ b/modules/swagger-codegen/src/test/resources/integrationtests/scala/client/required-attributes-spec.json @@ -167,6 +167,14 @@ "in": "query", "default": "some string" }, + { + "type": "string", + "description": "a string, testing keyword escaping", + "name": "class", + "required": false, + "in": "query", + "default": "some string" + }, { "type": "integer", "format": "int32", diff --git a/pom.xml.circleci b/pom.xml.circleci index f54ae23d6d22..fe24e2bfaea9 100644 --- a/pom.xml.circleci +++ b/pom.xml.circleci @@ -843,8 +843,10 @@ samples/client/petstore/go + samples/server/petstore/java-vertx/rx + samples/server/petstore/java-vertx/async samples/server/petstore/java-inflector - samples/server/petstore/java-pkmst + samples/server/petstore/java-pkmst samples/server/petstore/java-play-framework samples/server/petstore/undertow samples/server/petstore/jaxrs/jersey1 diff --git a/samples/client/petstore/java/feign/.swagger-codegen/VERSION b/samples/client/petstore/java/feign/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/client/petstore/java/feign/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/feign/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/google-api-client/.swagger-codegen/VERSION b/samples/client/petstore/java/google-api-client/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/client/petstore/java/google-api-client/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/google-api-client/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey1/.swagger-codegen/VERSION b/samples/client/petstore/java/jersey1/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/client/petstore/java/jersey1/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/jersey1/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java6/.swagger-codegen/VERSION b/samples/client/petstore/java/jersey2-java6/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/client/petstore/java/jersey2-java6/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/jersey2-java6/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java6/README.md b/samples/client/petstore/java/jersey2-java6/README.md index ea5261dff95e..b53485ad7d94 100644 --- a/samples/client/petstore/java/jersey2-java6/README.md +++ b/samples/client/petstore/java/jersey2-java6/README.md @@ -1,4 +1,4 @@ -# swagger-petstore-jersey2 +# swagger-petstore-jersey2-java6 ## Requirements @@ -27,7 +27,7 @@ Add this dependency to your project's POM: ```xml io.swagger - swagger-petstore-jersey2 + swagger-petstore-jersey2-java6 1.0.0 compile @@ -38,7 +38,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "io.swagger:swagger-petstore-jersey2:1.0.0" +compile "io.swagger:swagger-petstore-jersey2-java6:1.0.0" ``` ### Others @@ -49,7 +49,7 @@ At first generate the JAR by executing: Then manually install the following JARs: -* target/swagger-petstore-jersey2-1.0.0.jar +* target/swagger-petstore-jersey2-java6-1.0.0.jar * target/lib/*.jar ## Getting Started @@ -61,22 +61,22 @@ Please follow the [installation](#installation) instruction and execute the foll import io.swagger.client.*; import io.swagger.client.auth.*; import io.swagger.client.model.*; -import io.swagger.client.api.FakeApi; +import io.swagger.client.api.AnotherFakeApi; import java.io.File; import java.util.*; -public class FakeApiExample { +public class AnotherFakeApiExample { public static void main(String[] args) { - FakeApi apiInstance = new FakeApi(); + AnotherFakeApi apiInstance = new AnotherFakeApi(); Client body = new Client(); // Client | client model try { - Client result = apiInstance.testClientModel(body); + Client result = apiInstance.testSpecialTags(body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testClientModel"); + System.err.println("Exception when calling AnotherFakeApi#testSpecialTags"); e.printStackTrace(); } } @@ -86,13 +86,21 @@ public class FakeApiExample { ## Documentation for API Endpoints -All URIs are relative to *http://petstore.swagger.io/v2* +All URIs are relative to *http://petstore.swagger.io:80/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*AnotherFakeApi* | [**testSpecialTags**](docs/AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags +*FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | +*FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | +*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | +*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | *FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model *FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters +*FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case *PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store *PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet *PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status @@ -101,9 +109,9 @@ Class | Method | HTTP request | Description *PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet *PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image -*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID *StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet *UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user *UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array @@ -123,10 +131,10 @@ Class | Method | HTTP request | Description - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - - [Cat](docs/Cat.md) + - [Capitalization](docs/Capitalization.md) - [Category](docs/Category.md) + - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - - [Dog](docs/Dog.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) @@ -140,11 +148,15 @@ Class | Method | HTTP request | Description - [Name](docs/Name.md) - [NumberOnly](docs/NumberOnly.md) - [Order](docs/Order.md) + - [OuterComposite](docs/OuterComposite.md) + - [OuterEnum](docs/OuterEnum.md) - [Pet](docs/Pet.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - [SpecialModelName](docs/SpecialModelName.md) - [Tag](docs/Tag.md) - [User](docs/User.md) + - [Cat](docs/Cat.md) + - [Dog](docs/Dog.md) ## Documentation for Authorization @@ -156,6 +168,12 @@ Authentication schemes defined for the API: - **API key parameter name**: api_key - **Location**: HTTP header +### api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + ### http_basic_test - **Type**: HTTP basic authentication diff --git a/samples/client/petstore/java/jersey2-java6/build.gradle b/samples/client/petstore/java/jersey2-java6/build.gradle index 866f2172180d..c64dc492c466 100644 --- a/samples/client/petstore/java/jersey2-java6/build.gradle +++ b/samples/client/petstore/java/jersey2-java6/build.gradle @@ -95,7 +95,7 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.15" jackson_version = "2.8.9" - jersey_version = "2.25.1" + jersey_version = "2.6" commons_io_version=2.5 commons_lang3_version=3.6 junit_version = "4.12" diff --git a/samples/client/petstore/java/jersey2-java6/build.sbt b/samples/client/petstore/java/jersey2-java6/build.sbt index 164450b9f065..eecfab7a9842 100644 --- a/samples/client/petstore/java/jersey2-java6/build.sbt +++ b/samples/client/petstore/java/jersey2-java6/build.sbt @@ -10,9 +10,9 @@ lazy val root = (project in file(".")). resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( "io.swagger" % "swagger-annotations" % "1.5.15", - "org.glassfish.jersey.core" % "jersey-client" % "2.25.1", - "org.glassfish.jersey.media" % "jersey-media-multipart" % "2.25.1", - "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.25.1", + "org.glassfish.jersey.core" % "jersey-client" % "2.6", + "org.glassfish.jersey.media" % "jersey-media-multipart" % "2.6", + "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.6", "com.fasterxml.jackson.core" % "jackson-core" % "2.6.4" % "compile", "com.fasterxml.jackson.core" % "jackson-annotations" % "2.6.4" % "compile", "com.fasterxml.jackson.core" % "jackson-databind" % "2.6.4" % "compile", diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/ApiClient.java index c8f1623155e0..56486db2a14f 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/ApiClient.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/ApiClient.java @@ -15,7 +15,6 @@ import org.glassfish.jersey.client.ClientConfig; import org.glassfish.jersey.client.ClientProperties; import org.glassfish.jersey.client.HttpUrlConnectorProvider; import org.glassfish.jersey.jackson.JacksonFeature; -import org.glassfish.jersey.logging.LoggingFeature; import org.glassfish.jersey.media.multipart.FormDataBodyPart; import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import org.glassfish.jersey.media.multipart.MultiPart; @@ -25,6 +24,7 @@ import java.io.IOException; import java.io.InputStream; import org.apache.commons.io.FileUtils; +import org.glassfish.jersey.filter.LoggingFilter; import java.util.Collection; import java.util.Collections; import java.util.Map; @@ -761,10 +761,7 @@ public class ApiClient { clientConfig.register(JacksonFeature.class); clientConfig.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true); if (debugging) { - clientConfig.register(new LoggingFeature(java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME), java.util.logging.Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY, 1024*50 /* Log payloads up to 50K */)); - clientConfig.property(LoggingFeature.LOGGING_FEATURE_VERBOSITY, LoggingFeature.Verbosity.PAYLOAD_ANY); - // Set logger to ALL - java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME).setLevel(java.util.logging.Level.ALL); + clientConfig.register(new LoggingFilter(java.util.logging.Logger.getLogger(LoggingFilter.class.getName()), true)); } performAdditionalClientConfiguration(clientConfig); return ClientBuilder.newClient(clientConfig); diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/api/FakeApiTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/api/FakeApiTest.java index 6bfbad5dfac2..0e4979b29060 100644 --- a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/api/FakeApiTest.java @@ -8,29 +8,19 @@ * 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. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package io.swagger.client.api; import io.swagger.client.ApiException; -import io.swagger.client.model.Client; -import org.joda.time.LocalDate; -import org.joda.time.DateTime; import java.math.BigDecimal; +import io.swagger.client.model.Client; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +import io.swagger.client.model.OuterComposite; import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -40,15 +30,80 @@ import java.util.Map; /** * API tests for FakeApi */ +@Ignore public class FakeApiTest { private final FakeApi api = new FakeApi(); + /** + * + * + * Test serialization of outer boolean types + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeOuterBooleanSerializeTest() throws ApiException { + Boolean body = null; + Boolean response = api.fakeOuterBooleanSerialize(body); + + // TODO: test validations + } + + /** + * + * + * Test serialization of object with outer number type + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeOuterCompositeSerializeTest() throws ApiException { + OuterComposite body = null; + OuterComposite response = api.fakeOuterCompositeSerialize(body); + + // TODO: test validations + } + + /** + * + * + * Test serialization of outer number types + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeOuterNumberSerializeTest() throws ApiException { + BigDecimal body = null; + BigDecimal response = api.fakeOuterNumberSerialize(body); + + // TODO: test validations + } + + /** + * + * + * Test serialization of outer string types + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeOuterStringSerializeTest() throws ApiException { + String body = null; + String response = api.fakeOuterStringSerialize(body); + + // TODO: test validations + } + /** * To test \"client\" model * - * + * To test \"client\" model * * @throws ApiException * if the Api call fails @@ -56,7 +111,7 @@ public class FakeApiTest { @Test public void testClientModelTest() throws ApiException { Client body = null; - // Client response = api.testClientModel(body); + Client response = api.testClientModel(body); // TODO: test validations } @@ -82,10 +137,10 @@ public class FakeApiTest { String string = null; byte[] binary = null; LocalDate date = null; - DateTime dateTime = null; + OffsetDateTime dateTime = null; String password = null; String paramCallback = null; - // api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); // TODO: test validations } @@ -93,7 +148,7 @@ public class FakeApiTest { /** * To test enum parameters * - * + * To test enum parameters * * @throws ApiException * if the Api call fails @@ -106,9 +161,42 @@ public class FakeApiTest { String enumHeaderString = null; List enumQueryStringArray = null; String enumQueryString = null; - BigDecimal enumQueryInteger = null; + Integer enumQueryInteger = null; Double enumQueryDouble = null; - // api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); + api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); + + // TODO: test validations + } + + /** + * test inline additionalProperties + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testInlineAdditionalPropertiesTest() throws ApiException { + Object param = null; + api.testInlineAdditionalProperties(param); + + // TODO: test validations + } + + /** + * test json serialization of form data + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testJsonFormDataTest() throws ApiException { + String param = null; + String param2 = null; + api.testJsonFormData(param, param2); // TODO: test validations } diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/api/PetApiTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/api/PetApiTest.java index 87594e9a61f6..349a55d93dca 100644 --- a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/api/PetApiTest.java +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/api/PetApiTest.java @@ -8,28 +8,17 @@ * 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. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package io.swagger.client.api; import io.swagger.client.ApiException; -import io.swagger.client.model.Pet; import java.io.File; import io.swagger.client.model.ModelApiResponse; +import io.swagger.client.model.Pet; import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -39,6 +28,7 @@ import java.util.Map; /** * API tests for PetApi */ +@Ignore public class PetApiTest { private final PetApi api = new PetApi(); @@ -55,7 +45,7 @@ public class PetApiTest { @Test public void addPetTest() throws ApiException { Pet body = null; - // api.addPet(body); + api.addPet(body); // TODO: test validations } @@ -72,7 +62,7 @@ public class PetApiTest { public void deletePetTest() throws ApiException { Long petId = null; String apiKey = null; - // api.deletePet(petId, apiKey); + api.deletePet(petId, apiKey); // TODO: test validations } @@ -88,7 +78,7 @@ public class PetApiTest { @Test public void findPetsByStatusTest() throws ApiException { List status = null; - // List response = api.findPetsByStatus(status); + List response = api.findPetsByStatus(status); // TODO: test validations } @@ -104,7 +94,7 @@ public class PetApiTest { @Test public void findPetsByTagsTest() throws ApiException { List tags = null; - // List response = api.findPetsByTags(tags); + List response = api.findPetsByTags(tags); // TODO: test validations } @@ -120,7 +110,7 @@ public class PetApiTest { @Test public void getPetByIdTest() throws ApiException { Long petId = null; - // Pet response = api.getPetById(petId); + Pet response = api.getPetById(petId); // TODO: test validations } @@ -136,7 +126,7 @@ public class PetApiTest { @Test public void updatePetTest() throws ApiException { Pet body = null; - // api.updatePet(body); + api.updatePet(body); // TODO: test validations } @@ -154,7 +144,7 @@ public class PetApiTest { Long petId = null; String name = null; String status = null; - // api.updatePetWithForm(petId, name, status); + api.updatePetWithForm(petId, name, status); // TODO: test validations } @@ -172,7 +162,7 @@ public class PetApiTest { Long petId = null; String additionalMetadata = null; File file = null; - // ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); + ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); // TODO: test validations } diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/api/StoreApiTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/api/StoreApiTest.java index f644c1ec73ac..bef0884a2dad 100644 --- a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/api/StoreApiTest.java @@ -8,18 +8,6 @@ * 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. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -28,6 +16,7 @@ package io.swagger.client.api; import io.swagger.client.ApiException; import io.swagger.client.model.Order; import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -37,6 +26,7 @@ import java.util.Map; /** * API tests for StoreApi */ +@Ignore public class StoreApiTest { private final StoreApi api = new StoreApi(); @@ -53,7 +43,7 @@ public class StoreApiTest { @Test public void deleteOrderTest() throws ApiException { String orderId = null; - // api.deleteOrder(orderId); + api.deleteOrder(orderId); // TODO: test validations } @@ -68,7 +58,7 @@ public class StoreApiTest { */ @Test public void getInventoryTest() throws ApiException { - // Map response = api.getInventory(); + Map response = api.getInventory(); // TODO: test validations } @@ -84,7 +74,7 @@ public class StoreApiTest { @Test public void getOrderByIdTest() throws ApiException { Long orderId = null; - // Order response = api.getOrderById(orderId); + Order response = api.getOrderById(orderId); // TODO: test validations } @@ -100,7 +90,7 @@ public class StoreApiTest { @Test public void placeOrderTest() throws ApiException { Order body = null; - // Order response = api.placeOrder(body); + Order response = api.placeOrder(body); // TODO: test validations } diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/api/UserApiTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/api/UserApiTest.java index f86ba413cdbc..4455b3920b95 100644 --- a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/api/UserApiTest.java +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/api/UserApiTest.java @@ -8,18 +8,6 @@ * 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. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -28,6 +16,7 @@ package io.swagger.client.api; import io.swagger.client.ApiException; import io.swagger.client.model.User; import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -37,6 +26,7 @@ import java.util.Map; /** * API tests for UserApi */ +@Ignore public class UserApiTest { private final UserApi api = new UserApi(); @@ -53,7 +43,7 @@ public class UserApiTest { @Test public void createUserTest() throws ApiException { User body = null; - // api.createUser(body); + api.createUser(body); // TODO: test validations } @@ -69,7 +59,7 @@ public class UserApiTest { @Test public void createUsersWithArrayInputTest() throws ApiException { List body = null; - // api.createUsersWithArrayInput(body); + api.createUsersWithArrayInput(body); // TODO: test validations } @@ -85,7 +75,7 @@ public class UserApiTest { @Test public void createUsersWithListInputTest() throws ApiException { List body = null; - // api.createUsersWithListInput(body); + api.createUsersWithListInput(body); // TODO: test validations } @@ -101,7 +91,7 @@ public class UserApiTest { @Test public void deleteUserTest() throws ApiException { String username = null; - // api.deleteUser(username); + api.deleteUser(username); // TODO: test validations } @@ -117,7 +107,7 @@ public class UserApiTest { @Test public void getUserByNameTest() throws ApiException { String username = null; - // User response = api.getUserByName(username); + User response = api.getUserByName(username); // TODO: test validations } @@ -134,7 +124,7 @@ public class UserApiTest { public void loginUserTest() throws ApiException { String username = null; String password = null; - // String response = api.loginUser(username, password); + String response = api.loginUser(username, password); // TODO: test validations } @@ -149,7 +139,7 @@ public class UserApiTest { */ @Test public void logoutUserTest() throws ApiException { - // api.logoutUser(); + api.logoutUser(); // TODO: test validations } @@ -166,7 +156,7 @@ public class UserApiTest { public void updateUserTest() throws ApiException { String username = null; User body = null; - // api.updateUser(username, body); + api.updateUser(username, body); // TODO: test validations } diff --git a/samples/client/petstore/java/jersey2-java8/.swagger-codegen/VERSION b/samples/client/petstore/java/jersey2-java8/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/client/petstore/java/jersey2-java8/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/jersey2-java8/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java8/README.md b/samples/client/petstore/java/jersey2-java8/README.md index 78f4711d0605..8ceb02c6e3b0 100644 --- a/samples/client/petstore/java/jersey2-java8/README.md +++ b/samples/client/petstore/java/jersey2-java8/README.md @@ -61,32 +61,22 @@ Please follow the [installation](#installation) instruction and execute the foll import io.swagger.client.*; import io.swagger.client.auth.*; import io.swagger.client.model.*; -import io.swagger.client.api.FakeApi; +import io.swagger.client.api.AnotherFakeApi; import java.io.File; import java.util.*; -public class FakeApiExample { +public class AnotherFakeApiExample { public static void main(String[] args) { - FakeApi apiInstance = new FakeApi(); - BigDecimal number = new BigDecimal(); // BigDecimal | None - Double _double = 3.4D; // Double | None - String string = "string_example"; // String | None - byte[] _byte = B; // byte[] | None - Integer integer = 56; // Integer | None - Integer int32 = 56; // Integer | None - Long int64 = 789L; // Long | None - Float _float = 3.4F; // Float | None - byte[] binary = B; // byte[] | None - LocalDate date = new LocalDate(); // LocalDate | None - OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None - String password = "password_example"; // String | None + AnotherFakeApi apiInstance = new AnotherFakeApi(); + Client body = new Client(); // Client | client model try { - apiInstance.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password); + Client result = apiInstance.testSpecialTags(body); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEndpointParameters"); + System.err.println("Exception when calling AnotherFakeApi#testSpecialTags"); e.printStackTrace(); } } @@ -96,11 +86,21 @@ public class FakeApiExample { ## Documentation for API Endpoints -All URIs are relative to *http://petstore.swagger.io/v2* +All URIs are relative to *http://petstore.swagger.io:80/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*AnotherFakeApi* | [**testSpecialTags**](docs/AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags +*FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | +*FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | +*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | +*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | +*FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model *FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters +*FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case *PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store *PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet *PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status @@ -109,9 +109,9 @@ Class | Method | HTTP request | Description *PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet *PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image -*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID *StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet *UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user *UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array @@ -128,29 +128,56 @@ Class | Method | HTTP request | Description - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - [Animal](docs/Animal.md) - [AnimalFarm](docs/AnimalFarm.md) + - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - - [Cat](docs/Cat.md) + - [Capitalization](docs/Capitalization.md) - [Category](docs/Category.md) - - [Dog](docs/Dog.md) + - [ClassModel](docs/ClassModel.md) + - [Client](docs/Client.md) + - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) - [FormatTest](docs/FormatTest.md) + - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [MapTest](docs/MapTest.md) - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - [Model200Response](docs/Model200Response.md) - [ModelApiResponse](docs/ModelApiResponse.md) - [ModelReturn](docs/ModelReturn.md) - [Name](docs/Name.md) + - [NumberOnly](docs/NumberOnly.md) - [Order](docs/Order.md) + - [OuterComposite](docs/OuterComposite.md) + - [OuterEnum](docs/OuterEnum.md) - [Pet](docs/Pet.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - [SpecialModelName](docs/SpecialModelName.md) - [Tag](docs/Tag.md) - [User](docs/User.md) + - [Cat](docs/Cat.md) + - [Dog](docs/Dog.md) ## Documentation for Authorization Authentication schemes defined for the API: +### api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +### api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +### http_basic_test + +- **Type**: HTTP basic authentication + ### petstore_auth - **Type**: OAuth @@ -160,16 +187,10 @@ Authentication schemes defined for the API: - write:pets: modify pets in your account - read:pets: read your pets -### api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - ## Recommendation -It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issue. +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. ## Author diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/ApiClient.java index e3333284e2e9..b7341098733b 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/ApiClient.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/ApiClient.java @@ -15,7 +15,6 @@ import org.glassfish.jersey.client.ClientConfig; import org.glassfish.jersey.client.ClientProperties; import org.glassfish.jersey.client.HttpUrlConnectorProvider; import org.glassfish.jersey.jackson.JacksonFeature; -import org.glassfish.jersey.logging.LoggingFeature; import org.glassfish.jersey.media.multipart.FormDataBodyPart; import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import org.glassfish.jersey.media.multipart.MultiPart; @@ -26,6 +25,7 @@ import java.io.InputStream; import java.nio.file.Files; import java.nio.file.StandardCopyOption; +import org.glassfish.jersey.logging.LoggingFeature; import java.util.Collection; import java.util.Collections; import java.util.Map; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/api/FakeApiTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/api/FakeApiTest.java index 1ea1e270634a..9a7e76c1552e 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/api/FakeApiTest.java @@ -1,6 +1,6 @@ -/** +/* * Swagger Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io @@ -8,28 +8,19 @@ * 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. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package io.swagger.client.api; import io.swagger.client.ApiException; -import java.time.OffsetDateTime; -import java.time.LocalDate; import java.math.BigDecimal; +import io.swagger.client.model.Client; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import io.swagger.client.model.OuterComposite; import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -39,11 +30,92 @@ import java.util.Map; /** * API tests for FakeApi */ +@Ignore public class FakeApiTest { private final FakeApi api = new FakeApi(); + /** + * + * + * Test serialization of outer boolean types + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeOuterBooleanSerializeTest() throws ApiException { + Boolean body = null; + Boolean response = api.fakeOuterBooleanSerialize(body); + + // TODO: test validations + } + + /** + * + * + * Test serialization of object with outer number type + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeOuterCompositeSerializeTest() throws ApiException { + OuterComposite body = null; + OuterComposite response = api.fakeOuterCompositeSerialize(body); + + // TODO: test validations + } + + /** + * + * + * Test serialization of outer number types + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeOuterNumberSerializeTest() throws ApiException { + BigDecimal body = null; + BigDecimal response = api.fakeOuterNumberSerialize(body); + + // TODO: test validations + } + + /** + * + * + * Test serialization of outer string types + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeOuterStringSerializeTest() throws ApiException { + String body = null; + String response = api.fakeOuterStringSerialize(body); + + // TODO: test validations + } + + /** + * To test \"client\" model + * + * To test \"client\" model + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testClientModelTest() throws ApiException { + Client body = null; + Client response = api.testClientModel(body); + + // TODO: test validations + } + /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @@ -56,17 +128,75 @@ public class FakeApiTest { public void testEndpointParametersTest() throws ApiException { BigDecimal number = null; Double _double = null; - String string = null; + String patternWithoutDelimiter = null; byte[] _byte = null; Integer integer = null; Integer int32 = null; Long int64 = null; Float _float = null; + String string = null; byte[] binary = null; LocalDate date = null; OffsetDateTime dateTime = null; String password = null; - // api.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password); + String paramCallback = null; + api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + + // TODO: test validations + } + + /** + * To test enum parameters + * + * To test enum parameters + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testEnumParametersTest() throws ApiException { + List enumFormStringArray = null; + String enumFormString = null; + List enumHeaderStringArray = null; + String enumHeaderString = null; + List enumQueryStringArray = null; + String enumQueryString = null; + Integer enumQueryInteger = null; + Double enumQueryDouble = null; + api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); + + // TODO: test validations + } + + /** + * test inline additionalProperties + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testInlineAdditionalPropertiesTest() throws ApiException { + Object param = null; + api.testInlineAdditionalProperties(param); + + // TODO: test validations + } + + /** + * test json serialization of form data + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testJsonFormDataTest() throws ApiException { + String param = null; + String param2 = null; + api.testJsonFormData(param, param2); // TODO: test validations } diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/api/PetApiTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/api/PetApiTest.java index 694e9c152b05..349a55d93dca 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/api/PetApiTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/api/PetApiTest.java @@ -1,288 +1,170 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * 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. + */ + + package io.swagger.client.api; -import com.fasterxml.jackson.databind.ObjectMapper; - -import io.swagger.TestUtils; - -import io.swagger.client.*; -import io.swagger.client.api.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; - -import java.io.BufferedWriter; +import io.swagger.client.ApiException; import java.io.File; -import java.io.FileWriter; +import io.swagger.client.model.ModelApiResponse; +import io.swagger.client.model.Pet; +import org.junit.Test; +import org.junit.Ignore; + import java.util.ArrayList; -import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.Map; -import org.junit.*; -import static org.junit.Assert.*; - +/** + * API tests for PetApi + */ +@Ignore public class PetApiTest { - PetApi api = null; - @Before - public void setup() { - api = new PetApi(); - // setup authentication - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) api.getApiClient().getAuthentication("api_key"); - apiKeyAuth.setApiKey("special-key"); - } + private final PetApi api = new PetApi(); + + /** + * Add a new pet to the store + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testApiClient() { - // the default api client is used - assertEquals(Configuration.getDefaultApiClient(), api.getApiClient()); - assertNotNull(api.getApiClient()); - assertEquals("http://petstore.swagger.io:80/v2", api.getApiClient().getBasePath()); - assertFalse(api.getApiClient().isDebugging()); + public void addPetTest() throws ApiException { + Pet body = null; + api.addPet(body); - ApiClient oldClient = api.getApiClient(); - - ApiClient newClient = new ApiClient(); - newClient.setBasePath("http://example.com"); - newClient.setDebugging(true); - - // set api client via constructor - api = new PetApi(newClient); - assertNotNull(api.getApiClient()); - assertEquals("http://example.com", api.getApiClient().getBasePath()); - assertTrue(api.getApiClient().isDebugging()); - - // set api client via setter method - api.setApiClient(oldClient); - assertNotNull(api.getApiClient()); - assertEquals("http://petstore.swagger.io:80/v2", api.getApiClient().getBasePath()); - assertFalse(api.getApiClient().isDebugging()); + // TODO: test validations } - + + /** + * Deletes a pet + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testCreateAndGetPet() throws Exception { - Pet pet = createRandomPet(); - api.addPet(pet); + public void deletePetTest() throws ApiException { + Long petId = null; + String apiKey = null; + api.deletePet(petId, apiKey); - Pet fetched = api.getPetById(pet.getId()); - assertNotNull(fetched); - assertEquals(pet.getId(), fetched.getId()); - assertNotNull(fetched.getCategory()); - assertEquals(fetched.getCategory().getName(), pet.getCategory().getName()); + // TODO: test validations } - - /* + + /** + * Finds Pets by status + * + * Multiple status values can be provided with comma separated strings + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testCreateAndGetPetWithByteArray() throws Exception { - Pet pet = createRandomPet(); - byte[] bytes = serializeJson(pet, api.getApiClient()).getBytes(); - api.addPetUsingByteArray(bytes); + public void findPetsByStatusTest() throws ApiException { + List status = null; + List response = api.findPetsByStatus(status); - byte[] fetchedBytes = api.petPetIdtestingByteArraytrueGet(pet.getId()); - Pet fetched = deserializeJson(new String(fetchedBytes), Pet.class, api.getApiClient()); - assertNotNull(fetched); - assertEquals(pet.getId(), fetched.getId()); - assertNotNull(fetched.getCategory()); - assertEquals(fetched.getCategory().getName(), pet.getCategory().getName()); + // TODO: test validations } - + + /** + * Finds Pets by tags + * + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testGetPetByIdInObject() throws Exception { - Pet pet = new Pet(); - pet.setId(TestUtils.nextId()); - pet.setName("pet " + pet.getId()); + public void findPetsByTagsTest() throws ApiException { + List tags = null; + List response = api.findPetsByTags(tags); - Category category = new Category(); - category.setId(TestUtils.nextId()); - category.setName("category " + category.getId()); - pet.setCategory(category); - - pet.setStatus(Pet.StatusEnum.PENDING); - List photos = Arrays.asList(new String[]{"http://foo.bar.com/1"}); - pet.setPhotoUrls(photos); - - api.addPet(pet); - - InlineResponse200 fetched = api.getPetByIdInObject(pet.getId()); - assertEquals(pet.getId(), fetched.getId()); - assertEquals(pet.getName(), fetched.getName()); - - Object categoryObj = fetched.getCategory(); - assertNotNull(categoryObj); - assertTrue(categoryObj instanceof Map); - - Map categoryMap = (Map) categoryObj; - Object categoryIdObj = categoryMap.get("id"); - assertTrue(categoryIdObj instanceof Integer); - Integer categoryIdInt = (Integer) categoryIdObj; - assertEquals(category.getId(), Long.valueOf(categoryIdInt)); - assertEquals(category.getName(), categoryMap.get("name")); + // TODO: test validations } - */ - + + /** + * Find pet by ID + * + * Returns a single pet + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testUpdatePet() throws Exception { - Pet pet = createRandomPet(); - pet.setName("programmer"); + public void getPetByIdTest() throws ApiException { + Long petId = null; + Pet response = api.getPetById(petId); - api.updatePet(pet); - - Pet fetched = api.getPetById(pet.getId()); - assertNotNull(fetched); - assertEquals(pet.getId(), fetched.getId()); - assertNotNull(fetched.getCategory()); - assertEquals(fetched.getCategory().getName(), pet.getCategory().getName()); + // TODO: test validations } - + + /** + * Update an existing pet + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testFindPetsByStatus() throws Exception { - Pet pet = createRandomPet(); - pet.setName("programmer"); - pet.setStatus(Pet.StatusEnum.AVAILABLE); + public void updatePetTest() throws ApiException { + Pet body = null; + api.updatePet(body); - api.updatePet(pet); - - List pets = api.findPetsByStatus(Arrays.asList(new String[]{"available"})); - assertNotNull(pets); - - boolean found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - - assertTrue(found); + // TODO: test validations } - + + /** + * Updates a pet in the store with form data + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testFindPetsByTags() throws Exception { - Pet pet = createRandomPet(); - pet.setName("monster"); - pet.setStatus(Pet.StatusEnum.AVAILABLE); + public void updatePetWithFormTest() throws ApiException { + Long petId = null; + String name = null; + String status = null; + api.updatePetWithForm(petId, name, status); - List tags = new ArrayList(); - Tag tag1 = new Tag(); - tag1.setName("friendly"); - tags.add(tag1); - pet.setTags(tags); - - api.updatePet(pet); - - List pets = api.findPetsByTags(Arrays.asList(new String[]{"friendly"})); - assertNotNull(pets); - - boolean found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - assertTrue(found); + // TODO: test validations } - + + /** + * uploads an image + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testUpdatePetWithForm() throws Exception { - Pet pet = createRandomPet(); - pet.setName("frank"); - api.addPet(pet); + public void uploadFileTest() throws ApiException { + Long petId = null; + String additionalMetadata = null; + File file = null; + ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); - Pet fetched = api.getPetById(pet.getId()); - - api.updatePetWithForm(fetched.getId(), "furt", null); - Pet updated = api.getPetById(fetched.getId()); - - assertEquals(updated.getName(), "furt"); - } - - @Test - public void testDeletePet() throws Exception { - Pet pet = createRandomPet(); - api.addPet(pet); - - Pet fetched = api.getPetById(pet.getId()); - api.deletePet(fetched.getId(), null); - - try { - fetched = api.getPetById(fetched.getId()); - fail("expected an error"); - } catch (ApiException e) { - assertEquals(404, e.getCode()); - } - } - - @Test - public void testUploadFile() throws Exception { - Pet pet = createRandomPet(); - api.addPet(pet); - - File file = new File("hello.txt"); - BufferedWriter writer = new BufferedWriter(new FileWriter(file)); - writer.write("Hello world!"); - writer.close(); - - api.uploadFile(pet.getId(), "a test file", new File(file.getAbsolutePath())); - } - - @Test - public void testEqualsAndHashCode() { - Pet pet1 = new Pet(); - Pet pet2 = new Pet(); - assertTrue(pet1.equals(pet2)); - assertTrue(pet2.equals(pet1)); - assertTrue(pet1.hashCode() == pet2.hashCode()); - assertTrue(pet1.equals(pet1)); - assertTrue(pet1.hashCode() == pet1.hashCode()); - - pet2.setName("really-happy"); - pet2.setPhotoUrls(Arrays.asList(new String[]{"http://foo.bar.com/1", "http://foo.bar.com/2"})); - assertFalse(pet1.equals(pet2)); - assertFalse(pet2.equals(pet1)); - assertFalse(pet1.hashCode() == (pet2.hashCode())); - assertTrue(pet2.equals(pet2)); - assertTrue(pet2.hashCode() == pet2.hashCode()); - - pet1.setName("really-happy"); - pet1.setPhotoUrls(Arrays.asList(new String[]{"http://foo.bar.com/1", "http://foo.bar.com/2"})); - assertTrue(pet1.equals(pet2)); - assertTrue(pet2.equals(pet1)); - assertTrue(pet1.hashCode() == pet2.hashCode()); - assertTrue(pet1.equals(pet1)); - assertTrue(pet1.hashCode() == pet1.hashCode()); - } - - private Pet createRandomPet() { - Pet pet = new Pet(); - pet.setId(TestUtils.nextId()); - pet.setName("gorilla"); - - Category category = new Category(); - category.setName("really-happy"); - - pet.setCategory(category); - pet.setStatus(Pet.StatusEnum.AVAILABLE); - List photos = Arrays.asList(new String[]{"http://foo.bar.com/1", "http://foo.bar.com/2"}); - pet.setPhotoUrls(photos); - - return pet; - } - - private String serializeJson(Object o, ApiClient apiClient) { - ObjectMapper mapper = apiClient.getJSON().getContext(null); - try { - return mapper.writeValueAsString(o); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - private T deserializeJson(String json, Class klass, ApiClient apiClient) { - ObjectMapper mapper = apiClient.getJSON().getContext(null); - try { - return mapper.readValue(json, klass); - } catch (Exception e) { - throw new RuntimeException(e); - } + // TODO: test validations } + } diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/api/StoreApiTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/api/StoreApiTest.java index 2d32880c43d0..bef0884a2dad 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/api/StoreApiTest.java @@ -1,101 +1,98 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * 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. + */ + + package io.swagger.client.api; -import io.swagger.TestUtils; +import io.swagger.client.ApiException; +import io.swagger.client.model.Order; +import org.junit.Test; +import org.junit.Ignore; -import io.swagger.client.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; - -import java.lang.reflect.Field; -import java.time.ZoneId; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; import java.util.Map; -import java.text.SimpleDateFormat; - -import java.time.OffsetDateTime; -import org.junit.*; -import static org.junit.Assert.*; +/** + * API tests for StoreApi + */ +@Ignore public class StoreApiTest { - StoreApi api = null; - @Before - public void setup() { - api = new StoreApi(); - // setup authentication - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) api.getApiClient().getAuthentication("api_key"); - apiKeyAuth.setApiKey("special-key"); - // set custom date format that is used by the petstore server - api.getApiClient().setDateFormat(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ")); - } + private final StoreApi api = new StoreApi(); + + /** + * Delete purchase order by ID + * + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testGetInventory() throws Exception { - Map inventory = api.getInventory(); - assertTrue(inventory.keySet().size() > 0); - } + public void deleteOrderTest() throws ApiException { + String orderId = null; + api.deleteOrder(orderId); - /* + // TODO: test validations + } + + /** + * Returns pet inventories by status + * + * Returns a map of status codes to quantities + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testGetInventoryInObject() throws Exception { - Object inventoryObj = api.getInventoryInObject(); - assertTrue(inventoryObj instanceof Map); + public void getInventoryTest() throws ApiException { + Map response = api.getInventory(); - Map inventoryMap = (Map) inventoryObj; - assertTrue(inventoryMap.keySet().size() > 0); - - Map.Entry firstEntry = (Map.Entry) inventoryMap.entrySet().iterator().next(); - assertTrue(firstEntry.getKey() instanceof String); - assertTrue(firstEntry.getValue() instanceof Integer); + // TODO: test validations } - */ - + + /** + * Find purchase order by ID + * + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testPlaceOrder() throws Exception { - Order order = createOrder(); - api.placeOrder(order); + public void getOrderByIdTest() throws ApiException { + Long orderId = null; + Order response = api.getOrderById(orderId); - Order fetched = api.getOrderById(order.getId()); - assertEquals(order.getId(), fetched.getId()); - assertEquals(order.getPetId(), fetched.getPetId()); - assertEquals(order.getQuantity(), fetched.getQuantity()); - assertEquals(order.getShipDate().toInstant(), fetched.getShipDate().toInstant()); + // TODO: test validations } - + + /** + * Place an order for a pet + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testDeleteOrder() throws Exception { - Order order = createOrder(); - api.placeOrder(order); + public void placeOrderTest() throws ApiException { + Order body = null; + Order response = api.placeOrder(body); - Order fetched = api.getOrderById(order.getId()); - assertEquals(fetched.getId(), order.getId()); - - api.deleteOrder(String.valueOf(order.getId())); - - try { - api.getOrderById(order.getId()); - // fail("expected an error"); - } catch (ApiException e) { - // ok - } - } - - private Order createOrder() { - Order order = new Order(); - order.setPetId(200L); - order.setQuantity(13); - //Ensure 3 fractional digits because of a bug in the petstore server - order.setShipDate(OffsetDateTime.now().withNano(123000000)); - order.setStatus(Order.StatusEnum.PLACED); - order.setComplete(true); - - try { - Field idField = Order.class.getDeclaredField("id"); - idField.setAccessible(true); - idField.set(order, TestUtils.nextId()); - } catch (Exception e) { - throw new RuntimeException(e); - } - - return order; + // TODO: test validations } + } diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/api/UserApiTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/api/UserApiTest.java index c7fb92d25529..4455b3920b95 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/api/UserApiTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/api/UserApiTest.java @@ -1,88 +1,164 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * 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. + */ + + package io.swagger.client.api; -import io.swagger.TestUtils; +import io.swagger.client.ApiException; +import io.swagger.client.model.User; +import org.junit.Test; +import org.junit.Ignore; -import io.swagger.client.api.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; - -import java.util.Arrays; - -import org.junit.*; -import static org.junit.Assert.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +/** + * API tests for UserApi + */ +@Ignore public class UserApiTest { - UserApi api = null; - @Before - public void setup() { - api = new UserApi(); - // setup authentication - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) api.getApiClient().getAuthentication("api_key"); - apiKeyAuth.setApiKey("special-key"); - } + private final UserApi api = new UserApi(); + + /** + * Create user + * + * This can only be done by the logged in user. + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testCreateUser() throws Exception { - User user = createUser(); + public void createUserTest() throws ApiException { + User body = null; + api.createUser(body); - api.createUser(user); - - User fetched = api.getUserByName(user.getUsername()); - assertEquals(user.getId(), fetched.getId()); + // TODO: test validations } - + + /** + * Creates list of users with given input array + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testCreateUsersWithArray() throws Exception { - User user1 = createUser(); - user1.setUsername("user" + user1.getId()); - User user2 = createUser(); - user2.setUsername("user" + user2.getId()); + public void createUsersWithArrayInputTest() throws ApiException { + List body = null; + api.createUsersWithArrayInput(body); - api.createUsersWithArrayInput(Arrays.asList(new User[]{user1, user2})); - - User fetched = api.getUserByName(user1.getUsername()); - assertEquals(user1.getId(), fetched.getId()); + // TODO: test validations } - + + /** + * Creates list of users with given input array + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testCreateUsersWithList() throws Exception { - User user1 = createUser(); - user1.setUsername("user" + user1.getId()); - User user2 = createUser(); - user2.setUsername("user" + user2.getId()); + public void createUsersWithListInputTest() throws ApiException { + List body = null; + api.createUsersWithListInput(body); - api.createUsersWithListInput(Arrays.asList(new User[]{user1, user2})); - - User fetched = api.getUserByName(user1.getUsername()); - assertEquals(user1.getId(), fetched.getId()); + // TODO: test validations } - + + /** + * Delete user + * + * This can only be done by the logged in user. + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testLoginUser() throws Exception { - User user = createUser(); - api.createUser(user); + public void deleteUserTest() throws ApiException { + String username = null; + api.deleteUser(username); - String token = api.loginUser(user.getUsername(), user.getPassword()); - assertTrue(token.startsWith("logged in user session:")); + // TODO: test validations } - + + /** + * Get user by user name + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void logoutUser() throws Exception { + public void getUserByNameTest() throws ApiException { + String username = null; + User response = api.getUserByName(username); + + // TODO: test validations + } + + /** + * Logs user into the system + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void loginUserTest() throws ApiException { + String username = null; + String password = null; + String response = api.loginUser(username, password); + + // TODO: test validations + } + + /** + * Logs out current logged in user session + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void logoutUserTest() throws ApiException { api.logoutUser(); - } - private User createUser() { - User user = new User(); - user.setId(TestUtils.nextId()); - user.setUsername("fred" + user.getId()); - user.setFirstName("Fred"); - user.setLastName("Meyer"); - user.setEmail("fred@fredmeyer.com"); - user.setPassword("xxXXxx"); - user.setPhone("408-867-5309"); - user.setUserStatus(123); - - return user; + // TODO: test validations } + + /** + * Updated user + * + * This can only be done by the logged in user. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateUserTest() throws ApiException { + String username = null; + User body = null; + api.updateUser(username, body); + + // TODO: test validations + } + } diff --git a/samples/client/petstore/java/jersey2/.swagger-codegen/VERSION b/samples/client/petstore/java/jersey2/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/client/petstore/java/jersey2/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/jersey2/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2/README.md b/samples/client/petstore/java/jersey2/README.md index a1088603f3f9..8ceb02c6e3b0 100644 --- a/samples/client/petstore/java/jersey2/README.md +++ b/samples/client/petstore/java/jersey2/README.md @@ -61,30 +61,22 @@ Please follow the [installation](#installation) instruction and execute the foll import io.swagger.client.*; import io.swagger.client.auth.*; import io.swagger.client.model.*; -import io.swagger.client.api.PetApi; +import io.swagger.client.api.AnotherFakeApi; import java.io.File; import java.util.*; -public class PetApiExample { +public class AnotherFakeApiExample { public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - - // Configure OAuth2 access token for authorization: petstore_auth - OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); - petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - - - - PetApi apiInstance = new PetApi(); - - Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + AnotherFakeApi apiInstance = new AnotherFakeApi(); + Client body = new Client(); // Client | client model try { - apiInstance.addPet(body); + Client result = apiInstance.testSpecialTags(body); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Exception when calling AnotherFakeApi#testSpecialTags"); e.printStackTrace(); } } @@ -94,26 +86,32 @@ public class PetApiExample { ## Documentation for API Endpoints -All URIs are relative to *http://petstore.swagger.io/v2* +All URIs are relative to *http://petstore.swagger.io:80/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*AnotherFakeApi* | [**testSpecialTags**](docs/AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags +*FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | +*FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | +*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | +*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | +*FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model +*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters +*FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case *PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store -*PetApi* | [**addPetUsingByteArray**](docs/PetApi.md#addPetUsingByteArray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store *PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet *PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status *PetApi* | [**findPetsByTags**](docs/PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags *PetApi* | [**getPetById**](docs/PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID -*PetApi* | [**getPetByIdInObject**](docs/PetApi.md#getPetByIdInObject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID' -*PetApi* | [**petPetIdtestingByteArraytrueGet**](docs/PetApi.md#petPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID' *PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet *PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data *PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image -*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID -*StoreApi* | [**findOrdersByStatus**](docs/StoreApi.md#findOrdersByStatus) | **GET** /store/findByStatus | Finds orders by status +*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**getInventoryInObject**](docs/StoreApi.md#getInventoryInObject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory' -*StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID *StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet *UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user *UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array @@ -127,21 +125,59 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [Animal](docs/Animal.md) + - [AnimalFarm](docs/AnimalFarm.md) + - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [ArrayTest](docs/ArrayTest.md) + - [Capitalization](docs/Capitalization.md) - [Category](docs/Category.md) - - [InlineResponse200](docs/InlineResponse200.md) + - [ClassModel](docs/ClassModel.md) + - [Client](docs/Client.md) + - [EnumArrays](docs/EnumArrays.md) + - [EnumClass](docs/EnumClass.md) + - [EnumTest](docs/EnumTest.md) + - [FormatTest](docs/FormatTest.md) + - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [MapTest](docs/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - [Model200Response](docs/Model200Response.md) + - [ModelApiResponse](docs/ModelApiResponse.md) - [ModelReturn](docs/ModelReturn.md) - [Name](docs/Name.md) + - [NumberOnly](docs/NumberOnly.md) - [Order](docs/Order.md) + - [OuterComposite](docs/OuterComposite.md) + - [OuterEnum](docs/OuterEnum.md) - [Pet](docs/Pet.md) + - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - [SpecialModelName](docs/SpecialModelName.md) - [Tag](docs/Tag.md) - [User](docs/User.md) + - [Cat](docs/Cat.md) + - [Dog](docs/Dog.md) ## Documentation for Authorization Authentication schemes defined for the API: +### api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +### api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +### http_basic_test + +- **Type**: HTTP basic authentication + ### petstore_auth - **Type**: OAuth @@ -151,44 +187,10 @@ Authentication schemes defined for the API: - write:pets: modify pets in your account - read:pets: read your pets -### test_api_client_id - -- **Type**: API key -- **API key parameter name**: x-test_api_client_id -- **Location**: HTTP header - -### test_api_client_secret - -- **Type**: API key -- **API key parameter name**: x-test_api_client_secret -- **Location**: HTTP header - -### api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - -### test_http_basic - -- **Type**: HTTP basic authentication - -### test_api_key_query - -- **Type**: API key -- **API key parameter name**: test_api_key_query -- **Location**: URL query string - -### test_api_key_header - -- **Type**: API key -- **API key parameter name**: test_api_key_header -- **Location**: HTTP header - ## Recommendation -It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issue. +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. ## Author diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/ApiClient.java index e3333284e2e9..b7341098733b 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/ApiClient.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/ApiClient.java @@ -15,7 +15,6 @@ import org.glassfish.jersey.client.ClientConfig; import org.glassfish.jersey.client.ClientProperties; import org.glassfish.jersey.client.HttpUrlConnectorProvider; import org.glassfish.jersey.jackson.JacksonFeature; -import org.glassfish.jersey.logging.LoggingFeature; import org.glassfish.jersey.media.multipart.FormDataBodyPart; import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import org.glassfish.jersey.media.multipart.MultiPart; @@ -26,6 +25,7 @@ import java.io.InputStream; import java.nio.file.Files; import java.nio.file.StandardCopyOption; +import org.glassfish.jersey.logging.LoggingFeature; import java.util.Collection; import java.util.Collections; import java.util.Map; diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/api/FakeApiTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/api/FakeApiTest.java index c564001ad705..0e4979b29060 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/api/FakeApiTest.java @@ -1,9 +1,26 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * 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. + */ + + package io.swagger.client.api; import io.swagger.client.ApiException; import java.math.BigDecimal; -import java.util.Date; +import io.swagger.client.model.Client; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +import io.swagger.client.model.OuterComposite; import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -13,11 +30,92 @@ import java.util.Map; /** * API tests for FakeApi */ +@Ignore public class FakeApiTest { private final FakeApi api = new FakeApi(); + /** + * + * + * Test serialization of outer boolean types + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeOuterBooleanSerializeTest() throws ApiException { + Boolean body = null; + Boolean response = api.fakeOuterBooleanSerialize(body); + + // TODO: test validations + } + + /** + * + * + * Test serialization of object with outer number type + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeOuterCompositeSerializeTest() throws ApiException { + OuterComposite body = null; + OuterComposite response = api.fakeOuterCompositeSerialize(body); + + // TODO: test validations + } + + /** + * + * + * Test serialization of outer number types + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeOuterNumberSerializeTest() throws ApiException { + BigDecimal body = null; + BigDecimal response = api.fakeOuterNumberSerialize(body); + + // TODO: test validations + } + + /** + * + * + * Test serialization of outer string types + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeOuterStringSerializeTest() throws ApiException { + String body = null; + String response = api.fakeOuterStringSerialize(body); + + // TODO: test validations + } + + /** + * To test \"client\" model + * + * To test \"client\" model + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testClientModelTest() throws ApiException { + Client body = null; + Client response = api.testClientModel(body); + + // TODO: test validations + } + /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @@ -30,17 +128,75 @@ public class FakeApiTest { public void testEndpointParametersTest() throws ApiException { BigDecimal number = null; Double _double = null; - String string = null; + String patternWithoutDelimiter = null; byte[] _byte = null; Integer integer = null; Integer int32 = null; Long int64 = null; Float _float = null; + String string = null; byte[] binary = null; - Date date = null; - Date dateTime = null; + LocalDate date = null; + OffsetDateTime dateTime = null; String password = null; - // api.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password); + String paramCallback = null; + api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + + // TODO: test validations + } + + /** + * To test enum parameters + * + * To test enum parameters + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testEnumParametersTest() throws ApiException { + List enumFormStringArray = null; + String enumFormString = null; + List enumHeaderStringArray = null; + String enumHeaderString = null; + List enumQueryStringArray = null; + String enumQueryString = null; + Integer enumQueryInteger = null; + Double enumQueryDouble = null; + api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); + + // TODO: test validations + } + + /** + * test inline additionalProperties + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testInlineAdditionalPropertiesTest() throws ApiException { + Object param = null; + api.testInlineAdditionalProperties(param); + + // TODO: test validations + } + + /** + * test json serialization of form data + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testJsonFormDataTest() throws ApiException { + String param = null; + String param2 = null; + api.testJsonFormData(param, param2); // TODO: test validations } diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/api/PetApiTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/api/PetApiTest.java index 694e9c152b05..349a55d93dca 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/api/PetApiTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/api/PetApiTest.java @@ -1,288 +1,170 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * 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. + */ + + package io.swagger.client.api; -import com.fasterxml.jackson.databind.ObjectMapper; - -import io.swagger.TestUtils; - -import io.swagger.client.*; -import io.swagger.client.api.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; - -import java.io.BufferedWriter; +import io.swagger.client.ApiException; import java.io.File; -import java.io.FileWriter; +import io.swagger.client.model.ModelApiResponse; +import io.swagger.client.model.Pet; +import org.junit.Test; +import org.junit.Ignore; + import java.util.ArrayList; -import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.Map; -import org.junit.*; -import static org.junit.Assert.*; - +/** + * API tests for PetApi + */ +@Ignore public class PetApiTest { - PetApi api = null; - @Before - public void setup() { - api = new PetApi(); - // setup authentication - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) api.getApiClient().getAuthentication("api_key"); - apiKeyAuth.setApiKey("special-key"); - } + private final PetApi api = new PetApi(); + + /** + * Add a new pet to the store + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testApiClient() { - // the default api client is used - assertEquals(Configuration.getDefaultApiClient(), api.getApiClient()); - assertNotNull(api.getApiClient()); - assertEquals("http://petstore.swagger.io:80/v2", api.getApiClient().getBasePath()); - assertFalse(api.getApiClient().isDebugging()); + public void addPetTest() throws ApiException { + Pet body = null; + api.addPet(body); - ApiClient oldClient = api.getApiClient(); - - ApiClient newClient = new ApiClient(); - newClient.setBasePath("http://example.com"); - newClient.setDebugging(true); - - // set api client via constructor - api = new PetApi(newClient); - assertNotNull(api.getApiClient()); - assertEquals("http://example.com", api.getApiClient().getBasePath()); - assertTrue(api.getApiClient().isDebugging()); - - // set api client via setter method - api.setApiClient(oldClient); - assertNotNull(api.getApiClient()); - assertEquals("http://petstore.swagger.io:80/v2", api.getApiClient().getBasePath()); - assertFalse(api.getApiClient().isDebugging()); + // TODO: test validations } - + + /** + * Deletes a pet + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testCreateAndGetPet() throws Exception { - Pet pet = createRandomPet(); - api.addPet(pet); + public void deletePetTest() throws ApiException { + Long petId = null; + String apiKey = null; + api.deletePet(petId, apiKey); - Pet fetched = api.getPetById(pet.getId()); - assertNotNull(fetched); - assertEquals(pet.getId(), fetched.getId()); - assertNotNull(fetched.getCategory()); - assertEquals(fetched.getCategory().getName(), pet.getCategory().getName()); + // TODO: test validations } - - /* + + /** + * Finds Pets by status + * + * Multiple status values can be provided with comma separated strings + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testCreateAndGetPetWithByteArray() throws Exception { - Pet pet = createRandomPet(); - byte[] bytes = serializeJson(pet, api.getApiClient()).getBytes(); - api.addPetUsingByteArray(bytes); + public void findPetsByStatusTest() throws ApiException { + List status = null; + List response = api.findPetsByStatus(status); - byte[] fetchedBytes = api.petPetIdtestingByteArraytrueGet(pet.getId()); - Pet fetched = deserializeJson(new String(fetchedBytes), Pet.class, api.getApiClient()); - assertNotNull(fetched); - assertEquals(pet.getId(), fetched.getId()); - assertNotNull(fetched.getCategory()); - assertEquals(fetched.getCategory().getName(), pet.getCategory().getName()); + // TODO: test validations } - + + /** + * Finds Pets by tags + * + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testGetPetByIdInObject() throws Exception { - Pet pet = new Pet(); - pet.setId(TestUtils.nextId()); - pet.setName("pet " + pet.getId()); + public void findPetsByTagsTest() throws ApiException { + List tags = null; + List response = api.findPetsByTags(tags); - Category category = new Category(); - category.setId(TestUtils.nextId()); - category.setName("category " + category.getId()); - pet.setCategory(category); - - pet.setStatus(Pet.StatusEnum.PENDING); - List photos = Arrays.asList(new String[]{"http://foo.bar.com/1"}); - pet.setPhotoUrls(photos); - - api.addPet(pet); - - InlineResponse200 fetched = api.getPetByIdInObject(pet.getId()); - assertEquals(pet.getId(), fetched.getId()); - assertEquals(pet.getName(), fetched.getName()); - - Object categoryObj = fetched.getCategory(); - assertNotNull(categoryObj); - assertTrue(categoryObj instanceof Map); - - Map categoryMap = (Map) categoryObj; - Object categoryIdObj = categoryMap.get("id"); - assertTrue(categoryIdObj instanceof Integer); - Integer categoryIdInt = (Integer) categoryIdObj; - assertEquals(category.getId(), Long.valueOf(categoryIdInt)); - assertEquals(category.getName(), categoryMap.get("name")); + // TODO: test validations } - */ - + + /** + * Find pet by ID + * + * Returns a single pet + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testUpdatePet() throws Exception { - Pet pet = createRandomPet(); - pet.setName("programmer"); + public void getPetByIdTest() throws ApiException { + Long petId = null; + Pet response = api.getPetById(petId); - api.updatePet(pet); - - Pet fetched = api.getPetById(pet.getId()); - assertNotNull(fetched); - assertEquals(pet.getId(), fetched.getId()); - assertNotNull(fetched.getCategory()); - assertEquals(fetched.getCategory().getName(), pet.getCategory().getName()); + // TODO: test validations } - + + /** + * Update an existing pet + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testFindPetsByStatus() throws Exception { - Pet pet = createRandomPet(); - pet.setName("programmer"); - pet.setStatus(Pet.StatusEnum.AVAILABLE); + public void updatePetTest() throws ApiException { + Pet body = null; + api.updatePet(body); - api.updatePet(pet); - - List pets = api.findPetsByStatus(Arrays.asList(new String[]{"available"})); - assertNotNull(pets); - - boolean found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - - assertTrue(found); + // TODO: test validations } - + + /** + * Updates a pet in the store with form data + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testFindPetsByTags() throws Exception { - Pet pet = createRandomPet(); - pet.setName("monster"); - pet.setStatus(Pet.StatusEnum.AVAILABLE); + public void updatePetWithFormTest() throws ApiException { + Long petId = null; + String name = null; + String status = null; + api.updatePetWithForm(petId, name, status); - List tags = new ArrayList(); - Tag tag1 = new Tag(); - tag1.setName("friendly"); - tags.add(tag1); - pet.setTags(tags); - - api.updatePet(pet); - - List pets = api.findPetsByTags(Arrays.asList(new String[]{"friendly"})); - assertNotNull(pets); - - boolean found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - assertTrue(found); + // TODO: test validations } - + + /** + * uploads an image + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testUpdatePetWithForm() throws Exception { - Pet pet = createRandomPet(); - pet.setName("frank"); - api.addPet(pet); + public void uploadFileTest() throws ApiException { + Long petId = null; + String additionalMetadata = null; + File file = null; + ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); - Pet fetched = api.getPetById(pet.getId()); - - api.updatePetWithForm(fetched.getId(), "furt", null); - Pet updated = api.getPetById(fetched.getId()); - - assertEquals(updated.getName(), "furt"); - } - - @Test - public void testDeletePet() throws Exception { - Pet pet = createRandomPet(); - api.addPet(pet); - - Pet fetched = api.getPetById(pet.getId()); - api.deletePet(fetched.getId(), null); - - try { - fetched = api.getPetById(fetched.getId()); - fail("expected an error"); - } catch (ApiException e) { - assertEquals(404, e.getCode()); - } - } - - @Test - public void testUploadFile() throws Exception { - Pet pet = createRandomPet(); - api.addPet(pet); - - File file = new File("hello.txt"); - BufferedWriter writer = new BufferedWriter(new FileWriter(file)); - writer.write("Hello world!"); - writer.close(); - - api.uploadFile(pet.getId(), "a test file", new File(file.getAbsolutePath())); - } - - @Test - public void testEqualsAndHashCode() { - Pet pet1 = new Pet(); - Pet pet2 = new Pet(); - assertTrue(pet1.equals(pet2)); - assertTrue(pet2.equals(pet1)); - assertTrue(pet1.hashCode() == pet2.hashCode()); - assertTrue(pet1.equals(pet1)); - assertTrue(pet1.hashCode() == pet1.hashCode()); - - pet2.setName("really-happy"); - pet2.setPhotoUrls(Arrays.asList(new String[]{"http://foo.bar.com/1", "http://foo.bar.com/2"})); - assertFalse(pet1.equals(pet2)); - assertFalse(pet2.equals(pet1)); - assertFalse(pet1.hashCode() == (pet2.hashCode())); - assertTrue(pet2.equals(pet2)); - assertTrue(pet2.hashCode() == pet2.hashCode()); - - pet1.setName("really-happy"); - pet1.setPhotoUrls(Arrays.asList(new String[]{"http://foo.bar.com/1", "http://foo.bar.com/2"})); - assertTrue(pet1.equals(pet2)); - assertTrue(pet2.equals(pet1)); - assertTrue(pet1.hashCode() == pet2.hashCode()); - assertTrue(pet1.equals(pet1)); - assertTrue(pet1.hashCode() == pet1.hashCode()); - } - - private Pet createRandomPet() { - Pet pet = new Pet(); - pet.setId(TestUtils.nextId()); - pet.setName("gorilla"); - - Category category = new Category(); - category.setName("really-happy"); - - pet.setCategory(category); - pet.setStatus(Pet.StatusEnum.AVAILABLE); - List photos = Arrays.asList(new String[]{"http://foo.bar.com/1", "http://foo.bar.com/2"}); - pet.setPhotoUrls(photos); - - return pet; - } - - private String serializeJson(Object o, ApiClient apiClient) { - ObjectMapper mapper = apiClient.getJSON().getContext(null); - try { - return mapper.writeValueAsString(o); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - private T deserializeJson(String json, Class klass, ApiClient apiClient) { - ObjectMapper mapper = apiClient.getJSON().getContext(null); - try { - return mapper.readValue(json, klass); - } catch (Exception e) { - throw new RuntimeException(e); - } + // TODO: test validations } + } diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/api/StoreApiTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/api/StoreApiTest.java index b29acf6c3e22..bef0884a2dad 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/api/StoreApiTest.java @@ -1,101 +1,98 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * 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. + */ + + package io.swagger.client.api; -import io.swagger.TestUtils; +import io.swagger.client.ApiException; +import io.swagger.client.model.Order; +import org.junit.Test; +import org.junit.Ignore; -import io.swagger.client.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; - -import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; import java.util.Map; -import java.text.SimpleDateFormat; - -import org.junit.*; -import org.threeten.bp.OffsetDateTime; - -import static org.junit.Assert.*; +/** + * API tests for StoreApi + */ +@Ignore public class StoreApiTest { - private StoreApi api = null; - @Before - public void setup() { - api = new StoreApi(); - // setup authentication - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) api.getApiClient().getAuthentication("api_key"); - apiKeyAuth.setApiKey("special-key"); - // set custom date format that is used by the petstore server - api.getApiClient().setDateFormat(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ")); - } + private final StoreApi api = new StoreApi(); + + /** + * Delete purchase order by ID + * + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testGetInventory() throws Exception { - Map inventory = api.getInventory(); - assertTrue(inventory.keySet().size() > 0); - } + public void deleteOrderTest() throws ApiException { + String orderId = null; + api.deleteOrder(orderId); - /* + // TODO: test validations + } + + /** + * Returns pet inventories by status + * + * Returns a map of status codes to quantities + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testGetInventoryInObject() throws Exception { - Object inventoryObj = api.getInventoryInObject(); - assertTrue(inventoryObj instanceof Map); + public void getInventoryTest() throws ApiException { + Map response = api.getInventory(); - Map inventoryMap = (Map) inventoryObj; - assertTrue(inventoryMap.keySet().size() > 0); - - Map.Entry firstEntry = (Map.Entry) inventoryMap.entrySet().iterator().next(); - assertTrue(firstEntry.getKey() instanceof String); - assertTrue(firstEntry.getValue() instanceof Integer); + // TODO: test validations } - */ - + + /** + * Find purchase order by ID + * + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testPlaceOrder() throws Exception { - Order order = createOrder(); - api.placeOrder(order); + public void getOrderByIdTest() throws ApiException { + Long orderId = null; + Order response = api.getOrderById(orderId); - Order fetched = api.getOrderById(order.getId()); - assertEquals(order.getId(), fetched.getId()); - assertEquals(order.getPetId(), fetched.getPetId()); - assertEquals(order.getQuantity(), fetched.getQuantity()); - assertTrue(order.getShipDate().isEqual(fetched.getShipDate())); + // TODO: test validations } - + + /** + * Place an order for a pet + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testDeleteOrder() throws Exception { - Order order = createOrder(); - api.placeOrder(order); + public void placeOrderTest() throws ApiException { + Order body = null; + Order response = api.placeOrder(body); - Order fetched = api.getOrderById(order.getId()); - assertEquals(fetched.getId(), order.getId()); - - api.deleteOrder(String.valueOf(order.getId())); - - try { - api.getOrderById(order.getId()); - // fail("expected an error"); - } catch (ApiException e) { - // ok - } - } - - private Order createOrder() { - Order order = new Order(); - order.setPetId(200L); - order.setQuantity(13); - //Ensure 3 fractional digits because of a bug in the petstore server - order.setShipDate(OffsetDateTime.now().withNano(123000000)); - order.setStatus(Order.StatusEnum.PLACED); - order.setComplete(true); - - try { - Field idField = Order.class.getDeclaredField("id"); - idField.setAccessible(true); - idField.set(order, TestUtils.nextId()); - } catch (Exception e) { - throw new RuntimeException(e); - } - - return order; + // TODO: test validations } + } diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/api/UserApiTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/api/UserApiTest.java index c7fb92d25529..4455b3920b95 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/api/UserApiTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/api/UserApiTest.java @@ -1,88 +1,164 @@ +/* + * Swagger Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * 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. + */ + + package io.swagger.client.api; -import io.swagger.TestUtils; +import io.swagger.client.ApiException; +import io.swagger.client.model.User; +import org.junit.Test; +import org.junit.Ignore; -import io.swagger.client.api.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; - -import java.util.Arrays; - -import org.junit.*; -import static org.junit.Assert.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +/** + * API tests for UserApi + */ +@Ignore public class UserApiTest { - UserApi api = null; - @Before - public void setup() { - api = new UserApi(); - // setup authentication - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) api.getApiClient().getAuthentication("api_key"); - apiKeyAuth.setApiKey("special-key"); - } + private final UserApi api = new UserApi(); + + /** + * Create user + * + * This can only be done by the logged in user. + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testCreateUser() throws Exception { - User user = createUser(); + public void createUserTest() throws ApiException { + User body = null; + api.createUser(body); - api.createUser(user); - - User fetched = api.getUserByName(user.getUsername()); - assertEquals(user.getId(), fetched.getId()); + // TODO: test validations } - + + /** + * Creates list of users with given input array + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testCreateUsersWithArray() throws Exception { - User user1 = createUser(); - user1.setUsername("user" + user1.getId()); - User user2 = createUser(); - user2.setUsername("user" + user2.getId()); + public void createUsersWithArrayInputTest() throws ApiException { + List body = null; + api.createUsersWithArrayInput(body); - api.createUsersWithArrayInput(Arrays.asList(new User[]{user1, user2})); - - User fetched = api.getUserByName(user1.getUsername()); - assertEquals(user1.getId(), fetched.getId()); + // TODO: test validations } - + + /** + * Creates list of users with given input array + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testCreateUsersWithList() throws Exception { - User user1 = createUser(); - user1.setUsername("user" + user1.getId()); - User user2 = createUser(); - user2.setUsername("user" + user2.getId()); + public void createUsersWithListInputTest() throws ApiException { + List body = null; + api.createUsersWithListInput(body); - api.createUsersWithListInput(Arrays.asList(new User[]{user1, user2})); - - User fetched = api.getUserByName(user1.getUsername()); - assertEquals(user1.getId(), fetched.getId()); + // TODO: test validations } - + + /** + * Delete user + * + * This can only be done by the logged in user. + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testLoginUser() throws Exception { - User user = createUser(); - api.createUser(user); + public void deleteUserTest() throws ApiException { + String username = null; + api.deleteUser(username); - String token = api.loginUser(user.getUsername(), user.getPassword()); - assertTrue(token.startsWith("logged in user session:")); + // TODO: test validations } - + + /** + * Get user by user name + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void logoutUser() throws Exception { + public void getUserByNameTest() throws ApiException { + String username = null; + User response = api.getUserByName(username); + + // TODO: test validations + } + + /** + * Logs user into the system + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void loginUserTest() throws ApiException { + String username = null; + String password = null; + String response = api.loginUser(username, password); + + // TODO: test validations + } + + /** + * Logs out current logged in user session + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void logoutUserTest() throws ApiException { api.logoutUser(); - } - private User createUser() { - User user = new User(); - user.setId(TestUtils.nextId()); - user.setUsername("fred" + user.getId()); - user.setFirstName("Fred"); - user.setLastName("Meyer"); - user.setEmail("fred@fredmeyer.com"); - user.setPassword("xxXXxx"); - user.setPhone("408-867-5309"); - user.setUserStatus(123); - - return user; + // TODO: test validations } + + /** + * Updated user + * + * This can only be done by the logged in user. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateUserTest() throws ApiException { + String username = null; + User body = null; + api.updateUser(username, body); + + // TODO: test validations + } + } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/.swagger-codegen/VERSION b/samples/client/petstore/java/okhttp-gson-parcelableModel/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson/.swagger-codegen/VERSION b/samples/client/petstore/java/okhttp-gson/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/client/petstore/java/okhttp-gson/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/okhttp-gson/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resteasy/.swagger-codegen/VERSION b/samples/client/petstore/java/resteasy/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/client/petstore/java/resteasy/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/resteasy/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate-withXml/.swagger-codegen/VERSION b/samples/client/petstore/java/resttemplate-withXml/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/client/petstore/java/resttemplate-withXml/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/resttemplate-withXml/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate/.swagger-codegen/VERSION b/samples/client/petstore/java/resttemplate/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/client/petstore/java/resttemplate/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/resttemplate/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit/.swagger-codegen/VERSION b/samples/client/petstore/java/retrofit/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/client/petstore/java/retrofit/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/retrofit/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play24/.swagger-codegen/VERSION b/samples/client/petstore/java/retrofit2-play24/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/client/petstore/java/retrofit2-play24/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/retrofit2-play24/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2/.swagger-codegen/VERSION b/samples/client/petstore/java/retrofit2/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/client/petstore/java/retrofit2/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/retrofit2/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx/.swagger-codegen/VERSION b/samples/client/petstore/java/retrofit2rx/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/client/petstore/java/retrofit2rx/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/retrofit2rx/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx2/.swagger-codegen/VERSION b/samples/client/petstore/java/retrofit2rx2/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/client/petstore/java/retrofit2rx2/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/retrofit2rx2/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/jaxrs-cxf-client/.swagger-codegen/VERSION b/samples/client/petstore/jaxrs-cxf-client/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/client/petstore/jaxrs-cxf-client/.swagger-codegen/VERSION +++ b/samples/client/petstore/jaxrs-cxf-client/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Category.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Category.java index 9a1956aae8cf..0e190cbe457c 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Category.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Category.java @@ -21,9 +21,9 @@ public class Category { @ApiModelProperty(value = "") private Long id = null; + @ApiModelProperty(value = "") private String name = null; - /** * Get id * @return id diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/ModelApiResponse.java index 51ffbeff6da6..c6aab8b6a074 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -21,11 +21,12 @@ public class ModelApiResponse { @ApiModelProperty(value = "") private Integer code = null; + @ApiModelProperty(value = "") private String type = null; + @ApiModelProperty(value = "") private String message = null; - /** * Get code * @return code diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Order.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Order.java index dac33686761c..973b0260b368 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Order.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Order.java @@ -22,13 +22,17 @@ public class Order { @ApiModelProperty(value = "") private Long id = null; + @ApiModelProperty(value = "") private Long petId = null; + @ApiModelProperty(value = "") private Integer quantity = null; + @ApiModelProperty(value = "") private Date shipDate = null; + @XmlType(name="StatusEnum") @XmlEnum(String.class) public enum StatusEnum { @@ -66,9 +70,9 @@ public enum StatusEnum { * Order Status **/ private StatusEnum status = null; + @ApiModelProperty(value = "") private Boolean complete = false; - /** * Get id * @return id diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Pet.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Pet.java index 3c8ab5da478a..6e3fcf954ecc 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Pet.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Pet.java @@ -25,14 +25,19 @@ public class Pet { @ApiModelProperty(value = "") private Long id = null; + @ApiModelProperty(value = "") private Category category = null; + @ApiModelProperty(example = "doggie", required = true, value = "") private String name = null; + @ApiModelProperty(required = true, value = "") private List photoUrls = new ArrayList(); + @ApiModelProperty(value = "") - private List tags = new ArrayList(); + private List tags = null; + @XmlType(name="StatusEnum") @XmlEnum(String.class) @@ -71,7 +76,6 @@ public enum StatusEnum { * pet status in the store **/ private StatusEnum status = null; - /** * Get id * @return id diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Tag.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Tag.java index 24fd1d55d2ae..71801d143d33 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Tag.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Tag.java @@ -21,9 +21,9 @@ public class Tag { @ApiModelProperty(value = "") private Long id = null; + @ApiModelProperty(value = "") private String name = null; - /** * Get id * @return id diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/User.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/User.java index 858e8e14268a..e7d2773ea703 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/User.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/User.java @@ -21,24 +21,30 @@ public class User { @ApiModelProperty(value = "") private Long id = null; + @ApiModelProperty(value = "") private String username = null; + @ApiModelProperty(value = "") private String firstName = null; + @ApiModelProperty(value = "") private String lastName = null; + @ApiModelProperty(value = "") private String email = null; + @ApiModelProperty(value = "") private String password = null; + @ApiModelProperty(value = "") private String phone = null; + @ApiModelProperty(value = "User Status") /** * User Status **/ private Integer userStatus = null; - /** * Get id * @return id diff --git a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/ApiResponse.scala b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/ApiResponse.scala index 220a5e48d9e3..2717e1bcb72a 100644 --- a/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/ApiResponse.scala +++ b/samples/client/petstore/scala/src/main/scala/io/swagger/client/model/ApiResponse.scala @@ -15,7 +15,7 @@ package io.swagger.client.model case class ApiResponse ( code: Option[Integer] = None, - _type: Option[String] = None, + `type`: Option[String] = None, message: Option[String] = None ) diff --git a/samples/client/petstore/spring-cloud/.swagger-codegen/VERSION b/samples/client/petstore/spring-cloud/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/client/petstore/spring-cloud/.swagger-codegen/VERSION +++ b/samples/client/petstore/spring-cloud/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/PetApi.java index 155bdaef8ecd..b165892d7854 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/StoreApi.java index df17ba5a45ca..fab9391fad22 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/UserApi.java index 1c451b04cb44..18cb1a04bc49 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/.swagger-codegen/VERSION b/samples/client/petstore/spring-stubs/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/client/petstore/spring-stubs/.swagger-codegen/VERSION +++ b/samples/client/petstore/spring-stubs/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/PetApi.java index 507c7441aa4f..464827b61e75 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/PetApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/StoreApi.java b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/StoreApi.java index 9f2f3590be21..360a7c79221d 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/UserApi.java b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/UserApi.java index 2dd573f1c066..e4ce3bbecf07 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/UserApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-inflector/.swagger-codegen/VERSION b/samples/server/petstore/java-inflector/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/java-inflector/.swagger-codegen/VERSION +++ b/samples/server/petstore/java-inflector/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-inflector/src/main/swagger/swagger.yaml b/samples/server/petstore/java-inflector/src/main/swagger/swagger.yaml index f584c04d993c..74c3c4911941 100644 --- a/samples/server/petstore/java-inflector/src/main/swagger/swagger.yaml +++ b/samples/server/petstore/java-inflector/src/main/swagger/swagger.yaml @@ -128,7 +128,6 @@ paths: - petstore_auth: - "write:pets" - "read:pets" - x-contentType: "application/json" x-accepts: "application/json" /pet/findByTags: get: @@ -164,7 +163,6 @@ paths: - "write:pets" - "read:pets" deprecated: true - x-contentType: "application/json" x-accepts: "application/json" /pet/{petId}: get: @@ -194,7 +192,6 @@ paths: description: "Pet not found" security: - api_key: [] - x-contentType: "application/json" x-accepts: "application/json" post: tags: @@ -260,7 +257,6 @@ paths: - petstore_auth: - "write:pets" - "read:pets" - x-contentType: "application/json" x-accepts: "application/json" /pet/{petId}/uploadImage: post: @@ -321,7 +317,6 @@ paths: format: "int32" security: - api_key: [] - x-contentType: "application/json" x-accepts: "application/json" /store/order: post: @@ -378,7 +373,6 @@ paths: description: "Invalid ID supplied" 404: description: "Order not found" - x-contentType: "application/json" x-accepts: "application/json" delete: tags: @@ -401,7 +395,6 @@ paths: description: "Invalid ID supplied" 404: description: "Order not found" - x-contentType: "application/json" x-accepts: "application/json" /user: post: @@ -510,7 +503,6 @@ paths: description: "date in UTC when toekn expires" 400: description: "Invalid username/password supplied" - x-contentType: "application/json" x-accepts: "application/json" /user/logout: get: @@ -526,7 +518,6 @@ paths: responses: default: description: "successful operation" - x-contentType: "application/json" x-accepts: "application/json" /user/{username}: get: @@ -553,7 +544,6 @@ paths: description: "Invalid username supplied" 404: description: "User not found" - x-contentType: "application/json" x-accepts: "application/json" put: tags: @@ -603,7 +593,6 @@ paths: description: "Invalid username supplied" 404: description: "User not found" - x-contentType: "application/json" x-accepts: "application/json" /fake_classname_test: patch: diff --git a/samples/server/petstore/java-msf4j/.swagger-codegen/VERSION b/samples/server/petstore/java-msf4j/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/java-msf4j/.swagger-codegen/VERSION +++ b/samples/server/petstore/java-msf4j/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-pkmst/.swagger-codegen/VERSION b/samples/server/petstore/java-pkmst/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/java-pkmst/.swagger-codegen/VERSION +++ b/samples/server/petstore/java-pkmst/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java index b1105fa803b4..147f4fcf2deb 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java index 3f877e9157a3..5163fbbb35b0 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApi.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApi.java index 56a58162c19e..656933d0486d 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApi.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-play-framework-controller-only/.swagger-codegen/VERSION b/samples/server/petstore/java-play-framework-controller-only/.swagger-codegen/VERSION index cc6612c36e05..276cbf9e2858 100644 --- a/samples/server/petstore/java-play-framework-controller-only/.swagger-codegen/VERSION +++ b/samples/server/petstore/java-play-framework-controller-only/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0 \ No newline at end of file +2.3.0 diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/.swagger-codegen/VERSION b/samples/server/petstore/java-play-framework-fake-endpoints/.swagger-codegen/VERSION index cc6612c36e05..276cbf9e2858 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/.swagger-codegen/VERSION +++ b/samples/server/petstore/java-play-framework-fake-endpoints/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0 \ No newline at end of file +2.3.0 diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/.swagger-codegen/VERSION b/samples/server/petstore/java-play-framework-no-bean-validation/.swagger-codegen/VERSION index cc6612c36e05..276cbf9e2858 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/.swagger-codegen/VERSION +++ b/samples/server/petstore/java-play-framework-no-bean-validation/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0 \ No newline at end of file +2.3.0 diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/.swagger-codegen/VERSION b/samples/server/petstore/java-play-framework-no-exception-handling/.swagger-codegen/VERSION index cc6612c36e05..276cbf9e2858 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/.swagger-codegen/VERSION +++ b/samples/server/petstore/java-play-framework-no-exception-handling/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0 \ No newline at end of file +2.3.0 diff --git a/samples/server/petstore/java-play-framework-no-interface/.swagger-codegen/VERSION b/samples/server/petstore/java-play-framework-no-interface/.swagger-codegen/VERSION index cc6612c36e05..276cbf9e2858 100644 --- a/samples/server/petstore/java-play-framework-no-interface/.swagger-codegen/VERSION +++ b/samples/server/petstore/java-play-framework-no-interface/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0 \ No newline at end of file +2.3.0 diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/.swagger-codegen/VERSION b/samples/server/petstore/java-play-framework-no-swagger-ui/.swagger-codegen/VERSION index cc6612c36e05..276cbf9e2858 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/.swagger-codegen/VERSION +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0 \ No newline at end of file +2.3.0 diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/.swagger-codegen/VERSION b/samples/server/petstore/java-play-framework-no-wrap-calls/.swagger-codegen/VERSION index cc6612c36e05..276cbf9e2858 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/.swagger-codegen/VERSION +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0 \ No newline at end of file +2.3.0 diff --git a/samples/server/petstore/java-play-framework/.swagger-codegen/VERSION b/samples/server/petstore/java-play-framework/.swagger-codegen/VERSION index cc6612c36e05..276cbf9e2858 100644 --- a/samples/server/petstore/java-play-framework/.swagger-codegen/VERSION +++ b/samples/server/petstore/java-play-framework/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0 \ No newline at end of file +2.3.0 diff --git a/samples/server/petstore/java-vertx/async/.swagger-codegen/VERSION b/samples/server/petstore/java-vertx/async/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/java-vertx/async/.swagger-codegen/VERSION +++ b/samples/server/petstore/java-vertx/async/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/async/pom.xml b/samples/server/petstore/java-vertx/async/pom.xml index 8e1a96f88efc..ba6f38e39d94 100644 --- a/samples/server/petstore/java-vertx/async/pom.xml +++ b/samples/server/petstore/java-vertx/async/pom.xml @@ -15,7 +15,7 @@ 4.12 3.4.1 3.3 - 1.2.0 + 1.4.0 2.3 2.7.4 @@ -28,25 +28,24 @@ test - - io.vertx - vertx-unit - ${vertx.version} - test - + + io.vertx + vertx-unit + ${vertx.version} + test + - com.github.phiz71 - vertx-swagger-router - ${vertx-swagger-router.version} - - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - ${jackson-datatype-jsr310.version} - + com.github.phiz71 + vertx-swagger-router + ${vertx-swagger-router.version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-datatype-jsr310.version} + @@ -88,4 +87,4 @@ - \ No newline at end of file + diff --git a/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/verticle/PetApiVerticle.java b/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/verticle/PetApiVerticle.java index fb3c20944f17..f97369e6ad33 100644 --- a/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/verticle/PetApiVerticle.java +++ b/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/verticle/PetApiVerticle.java @@ -28,8 +28,17 @@ public class PetApiVerticle extends AbstractVerticle { final static String UPDATEPETWITHFORM_SERVICE_ID = "updatePetWithForm"; final static String UPLOADFILE_SERVICE_ID = "uploadFile"; - //TODO : create Implementation - PetApi service = new PetApiImpl(); + final PetApi service; + + public PetApiVerticle() { + try { + Class serviceImplClass = getClass().getClassLoader().loadClass("io.swagger.server.api.verticle.PetApiImpl"); + service = (PetApi)serviceImplClass.newInstance(); + } catch (Exception e) { + logUnexpectedError("PetApiVerticle constructor", e); + throw new RuntimeException(e); + } + } @Override public void start() throws Exception { diff --git a/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/verticle/StoreApiVerticle.java b/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/verticle/StoreApiVerticle.java index 9299a08e0137..cc11fa49a2ce 100644 --- a/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/verticle/StoreApiVerticle.java +++ b/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/verticle/StoreApiVerticle.java @@ -22,8 +22,17 @@ public class StoreApiVerticle extends AbstractVerticle { final static String GETORDERBYID_SERVICE_ID = "getOrderById"; final static String PLACEORDER_SERVICE_ID = "placeOrder"; - //TODO : create Implementation - StoreApi service = new StoreApiImpl(); + final StoreApi service; + + public StoreApiVerticle() { + try { + Class serviceImplClass = getClass().getClassLoader().loadClass("io.swagger.server.api.verticle.StoreApiImpl"); + service = (StoreApi)serviceImplClass.newInstance(); + } catch (Exception e) { + logUnexpectedError("StoreApiVerticle constructor", e); + throw new RuntimeException(e); + } + } @Override public void start() throws Exception { diff --git a/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/verticle/UserApiVerticle.java b/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/verticle/UserApiVerticle.java index 0ad1f5eb9801..70070fd59b47 100644 --- a/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/verticle/UserApiVerticle.java +++ b/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/verticle/UserApiVerticle.java @@ -26,8 +26,17 @@ public class UserApiVerticle extends AbstractVerticle { final static String LOGOUTUSER_SERVICE_ID = "logoutUser"; final static String UPDATEUSER_SERVICE_ID = "updateUser"; - //TODO : create Implementation - UserApi service = new UserApiImpl(); + final UserApi service; + + public UserApiVerticle() { + try { + Class serviceImplClass = getClass().getClassLoader().loadClass("io.swagger.server.api.verticle.UserApiImpl"); + service = (UserApi)serviceImplClass.newInstance(); + } catch (Exception e) { + logUnexpectedError("UserApiVerticle constructor", e); + throw new RuntimeException(e); + } + } @Override public void start() throws Exception { diff --git a/samples/server/petstore/java-vertx/rx/.swagger-codegen/VERSION b/samples/server/petstore/java-vertx/rx/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/java-vertx/rx/.swagger-codegen/VERSION +++ b/samples/server/petstore/java-vertx/rx/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/rx/pom.xml b/samples/server/petstore/java-vertx/rx/pom.xml index 8e1a96f88efc..ac1842d1aaa6 100644 --- a/samples/server/petstore/java-vertx/rx/pom.xml +++ b/samples/server/petstore/java-vertx/rx/pom.xml @@ -3,7 +3,7 @@ 4.0.0 io.swagger - swagger-java-vertx-server + swagger-java-vertx-server-rx 1.0.0-SNAPSHOT jar @@ -15,7 +15,7 @@ 4.12 3.4.1 3.3 - 1.2.0 + 1.4.0 2.3 2.7.4 @@ -28,25 +28,24 @@ test - - io.vertx - vertx-unit - ${vertx.version} - test - + + io.vertx + vertx-unit + ${vertx.version} + test + - com.github.phiz71 - vertx-swagger-router - ${vertx-swagger-router.version} - - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - ${jackson-datatype-jsr310.version} - + com.github.phiz71 + vertx-swagger-router + ${vertx-swagger-router.version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-datatype-jsr310.version} + @@ -88,4 +87,4 @@ - \ No newline at end of file + diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/verticle/PetApiVerticle.java b/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/verticle/PetApiVerticle.java index 6eada5ae461f..1b7e08c336e5 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/verticle/PetApiVerticle.java +++ b/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/verticle/PetApiVerticle.java @@ -28,8 +28,17 @@ public class PetApiVerticle extends AbstractVerticle { final static String UPDATEPETWITHFORM_SERVICE_ID = "updatePetWithForm"; final static String UPLOADFILE_SERVICE_ID = "uploadFile"; - //TODO : create Implementation - PetApi service = new PetApiImpl(); + final PetApi service; + + public PetApiVerticle() { + try { + Class serviceImplClass = getClass().getClassLoader().loadClass("io.swagger.server.api.verticle.PetApiImpl"); + service = (PetApi)serviceImplClass.newInstance(); + } catch (Exception e) { + logUnexpectedError("PetApiVerticle constructor", e); + throw new RuntimeException(e); + } + } @Override public void start() throws Exception { diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/verticle/StoreApiVerticle.java b/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/verticle/StoreApiVerticle.java index b648fef05932..67353e8ac875 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/verticle/StoreApiVerticle.java +++ b/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/verticle/StoreApiVerticle.java @@ -22,8 +22,17 @@ public class StoreApiVerticle extends AbstractVerticle { final static String GETORDERBYID_SERVICE_ID = "getOrderById"; final static String PLACEORDER_SERVICE_ID = "placeOrder"; - //TODO : create Implementation - StoreApi service = new StoreApiImpl(); + final StoreApi service; + + public StoreApiVerticle() { + try { + Class serviceImplClass = getClass().getClassLoader().loadClass("io.swagger.server.api.verticle.StoreApiImpl"); + service = (StoreApi)serviceImplClass.newInstance(); + } catch (Exception e) { + logUnexpectedError("StoreApiVerticle constructor", e); + throw new RuntimeException(e); + } + } @Override public void start() throws Exception { diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/verticle/UserApiVerticle.java b/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/verticle/UserApiVerticle.java index 0bdd10a153b4..a6d8f69da064 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/verticle/UserApiVerticle.java +++ b/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/verticle/UserApiVerticle.java @@ -26,8 +26,17 @@ public class UserApiVerticle extends AbstractVerticle { final static String LOGOUTUSER_SERVICE_ID = "logoutUser"; final static String UPDATEUSER_SERVICE_ID = "updateUser"; - //TODO : create Implementation - UserApi service = new UserApiImpl(); + final UserApi service; + + public UserApiVerticle() { + try { + Class serviceImplClass = getClass().getClassLoader().loadClass("io.swagger.server.api.verticle.UserApiImpl"); + service = (UserApi)serviceImplClass.newInstance(); + } catch (Exception e) { + logUnexpectedError("UserApiVerticle constructor", e); + throw new RuntimeException(e); + } + } @Override public void start() throws Exception { diff --git a/samples/server/petstore/jaxrs-cxf-cdi/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs-cxf-cdi/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/.swagger-codegen/VERSION +++ b/samples/server/petstore/jaxrs-cxf-cdi/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/default/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs-resteasy/default/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/.swagger-codegen/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/default/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-java8/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/.swagger-codegen/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-joda/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/.swagger-codegen/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs-resteasy/eap/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/.swagger-codegen/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/joda/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs-resteasy/joda/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/.swagger-codegen/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/joda/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-interface/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs-spec-interface/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/jaxrs-spec-interface/.swagger-codegen/VERSION +++ b/samples/server/petstore/jaxrs-spec-interface/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/FakeApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/FakeApi.java index e9c28d5da5f9..1c9903022bda 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/FakeApi.java @@ -76,6 +76,14 @@ public interface FakeApi { @ApiResponse(code = 404, message = "Not found", response = Void.class) }) void testEnumParameters(@FormParam(value = "enum_form_string_array") List enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString,@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@FormParam(value = "enum_query_double") Double enumQueryDouble) throws Exception; + @POST + @Path("/inline-additionalProperties") + @Consumes({ "application/json" }) + @ApiOperation(value = "test inline additionalProperties", notes = "", tags={ "fake", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) + void testInlineAdditionalProperties(@Valid Object param) throws Exception; + @GET @Path("/jsonFormData") @Consumes({ "application/json" }) diff --git a/samples/server/petstore/jaxrs-spec-interface/swagger.json b/samples/server/petstore/jaxrs-spec-interface/swagger.json index 5b53d7108d0b..318ac581fce2 100644 --- a/samples/server/petstore/jaxrs-spec-interface/swagger.json +++ b/samples/server/petstore/jaxrs-spec-interface/swagger.json @@ -108,8 +108,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" + "default" : "available", + "enum" : [ "available", "pending", "sold" ] }, "collectionFormat" : "csv" } ], @@ -680,8 +680,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ ">", "$" ], - "default" : "$" + "default" : "$", + "enum" : [ ">", "$" ] } }, { "name" : "enum_form_string", @@ -699,8 +699,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ ">", "$" ], - "default" : "$" + "default" : "$", + "enum" : [ ">", "$" ] } }, { "name" : "enum_header_string", @@ -718,8 +718,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ ">", "$" ], - "default" : "$" + "default" : "$", + "enum" : [ ">", "$" ] } }, { "name" : "enum_query_string", @@ -1030,6 +1030,32 @@ } } }, + "/fake/inline-additionalProperties" : { + "post" : { + "tags" : [ "fake" ], + "summary" : "test inline additionalProperties", + "description" : "", + "operationId" : "testInlineAdditionalProperties", + "consumes" : [ "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "param", + "description" : "request body", + "required" : true, + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + } + } ], + "responses" : { + "200" : { + "description" : "successful operation" + } + } + } + }, "/another-fake/dummy" : { "patch" : { "tags" : [ "$another-fake?" ], diff --git a/samples/server/petstore/jaxrs-spec/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs-spec/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/jaxrs-spec/.swagger-codegen/VERSION +++ b/samples/server/petstore/jaxrs-spec/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/FakeApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/FakeApi.java index 39f7c4948934..8c345d48cb63 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/FakeApi.java @@ -90,6 +90,16 @@ public class FakeApi { return Response.ok().entity("magic!").build(); } + @POST + @Path("/inline-additionalProperties") + @Consumes({ "application/json" }) + @ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) + public Response testInlineAdditionalProperties(@Valid Object param) { + return Response.ok().entity("magic!").build(); + } + @GET @Path("/jsonFormData") @Consumes({ "application/json" }) diff --git a/samples/server/petstore/jaxrs-spec/swagger.json b/samples/server/petstore/jaxrs-spec/swagger.json index 5b53d7108d0b..318ac581fce2 100644 --- a/samples/server/petstore/jaxrs-spec/swagger.json +++ b/samples/server/petstore/jaxrs-spec/swagger.json @@ -108,8 +108,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" + "default" : "available", + "enum" : [ "available", "pending", "sold" ] }, "collectionFormat" : "csv" } ], @@ -680,8 +680,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ ">", "$" ], - "default" : "$" + "default" : "$", + "enum" : [ ">", "$" ] } }, { "name" : "enum_form_string", @@ -699,8 +699,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ ">", "$" ], - "default" : "$" + "default" : "$", + "enum" : [ ">", "$" ] } }, { "name" : "enum_header_string", @@ -718,8 +718,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ ">", "$" ], - "default" : "$" + "default" : "$", + "enum" : [ ">", "$" ] } }, { "name" : "enum_query_string", @@ -1030,6 +1030,32 @@ } } }, + "/fake/inline-additionalProperties" : { + "post" : { + "tags" : [ "fake" ], + "summary" : "test inline additionalProperties", + "description" : "", + "operationId" : "testInlineAdditionalProperties", + "consumes" : [ "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "param", + "description" : "request body", + "required" : true, + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + } + } ], + "responses" : { + "200" : { + "description" : "successful operation" + } + } + } + }, "/another-fake/dummy" : { "patch" : { "tags" : [ "$another-fake?" ], diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs/jersey1-useTags/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/.swagger-codegen/VERSION +++ b/samples/server/petstore/jaxrs/jersey1-useTags/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/FakeApi.java index a04f054727e3..3cf2646a3880 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/FakeApi.java @@ -152,6 +152,19 @@ public class FakeApi { throws NotFoundException { return delegate.testEnumParameters(enumFormStringArray,enumFormString,enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,securityContext); } + @POST + + @Consumes({ "application/json" }) + + @io.swagger.annotations.ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) + public Response testInlineAdditionalProperties( + @ApiParam(value = "request body" ,required=true) Object param, + @Context SecurityContext securityContext) + throws NotFoundException { + return delegate.testInlineAdditionalProperties(param,securityContext); + } @GET @Consumes({ "application/json" }) diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/FakeApiService.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/FakeApiService.java index e5c185eef8ec..3c7b947ca728 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/FakeApiService.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/api/FakeApiService.java @@ -37,6 +37,8 @@ public abstract class FakeApiService { throws NotFoundException; public abstract Response testEnumParameters(List enumFormStringArray,String enumFormString,List enumHeaderStringArray,String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger,Double enumQueryDouble,SecurityContext securityContext) throws NotFoundException; + public abstract Response testInlineAdditionalProperties(Object param,SecurityContext securityContext) + throws NotFoundException; public abstract Response testJsonFormData(String param,String param2,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java index 54aa3577d523..4cae4c62be5d 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java @@ -66,6 +66,12 @@ public class FakeApiServiceImpl extends FakeApiService { return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override + public Response testInlineAdditionalProperties(Object param, SecurityContext securityContext) + throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override public Response testJsonFormData(String param, String param2, SecurityContext securityContext) throws NotFoundException { // do some magic! diff --git a/samples/server/petstore/jaxrs/jersey1/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs/jersey1/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/jaxrs/jersey1/.swagger-codegen/VERSION +++ b/samples/server/petstore/jaxrs/jersey1/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/FakeApi.java index 2bbe7e144677..f93b18347c22 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/FakeApi.java @@ -152,6 +152,19 @@ public class FakeApi { throws NotFoundException { return delegate.testEnumParameters(enumFormStringArray,enumFormString,enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,securityContext); } + @POST + @Path("/inline-additionalProperties") + @Consumes({ "application/json" }) + + @io.swagger.annotations.ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) + public Response testInlineAdditionalProperties( + @ApiParam(value = "request body" ,required=true) Object param, + @Context SecurityContext securityContext) + throws NotFoundException { + return delegate.testInlineAdditionalProperties(param,securityContext); + } @GET @Path("/jsonFormData") @Consumes({ "application/json" }) diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/FakeApiService.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/FakeApiService.java index e5c185eef8ec..3c7b947ca728 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/FakeApiService.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/api/FakeApiService.java @@ -37,6 +37,8 @@ public abstract class FakeApiService { throws NotFoundException; public abstract Response testEnumParameters(List enumFormStringArray,String enumFormString,List enumHeaderStringArray,String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger,Double enumQueryDouble,SecurityContext securityContext) throws NotFoundException; + public abstract Response testInlineAdditionalProperties(Object param,SecurityContext securityContext) + throws NotFoundException; public abstract Response testJsonFormData(String param,String param2,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs/jersey1/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey1/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java index 54aa3577d523..4cae4c62be5d 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey1/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java @@ -66,6 +66,12 @@ public class FakeApiServiceImpl extends FakeApiService { return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override + public Response testInlineAdditionalProperties(Object param, SecurityContext securityContext) + throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override public Response testJsonFormData(String param, String param2, SecurityContext securityContext) throws NotFoundException { // do some magic! diff --git a/samples/server/petstore/jaxrs/jersey2/.swagger-codegen/VERSION b/samples/server/petstore/jaxrs/jersey2/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/jaxrs/jersey2/.swagger-codegen/VERSION +++ b/samples/server/petstore/jaxrs/jersey2/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/FakeApi.java index 7e933d3d0c08..d16817cce9b5 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/FakeApi.java @@ -167,6 +167,18 @@ public class FakeApi { throws NotFoundException { return delegate.testEnumParameters(enumFormStringArray,enumFormString,enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,securityContext); } + @POST + @Path("/inline-additionalProperties") + @Consumes({ "application/json" }) + + @io.swagger.annotations.ApiOperation(value = "test inline additionalProperties", notes = "", response = Void.class, tags={ "fake", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) + public Response testInlineAdditionalProperties(@ApiParam(value = "request body" ,required=true) Object param +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.testInlineAdditionalProperties(param,securityContext); + } @GET @Path("/jsonFormData") @Consumes({ "application/json" }) diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/FakeApiService.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/FakeApiService.java index 71148802573c..16ef0a8dbfb0 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/FakeApiService.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/api/FakeApiService.java @@ -27,5 +27,6 @@ public abstract class FakeApiService { public abstract Response testClientModel(Client body,SecurityContext securityContext) throws NotFoundException; public abstract Response testEndpointParameters(BigDecimal number,Double _double,String patternWithoutDelimiter,byte[] _byte,Integer integer,Integer int32,Long int64,Float _float,String string,byte[] binary,Date date,Date dateTime,String password,String paramCallback,SecurityContext securityContext) throws NotFoundException; public abstract Response testEnumParameters(List enumFormStringArray,String enumFormString,List enumHeaderStringArray,String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger,Double enumQueryDouble,SecurityContext securityContext) throws NotFoundException; + public abstract Response testInlineAdditionalProperties(Object param,SecurityContext securityContext) throws NotFoundException; public abstract Response testJsonFormData(String param,String param2,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs/jersey2/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java index 529420f7f700..bd8eb54209c3 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java @@ -56,6 +56,11 @@ public class FakeApiServiceImpl extends FakeApiService { return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override + public Response testInlineAdditionalProperties(Object param, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override public Response testJsonFormData(String param, String param2, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/spring-mvc-j8-async/.swagger-codegen/VERSION b/samples/server/petstore/spring-mvc-j8-async/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/spring-mvc-j8-async/.swagger-codegen/VERSION +++ b/samples/server/petstore/spring-mvc-j8-async/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/AnotherFakeApi.java index c2e845dce90a..c8feff901832 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/FakeApi.java index fa83c88995e4..38a7b4fe2cce 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/FakeClassnameTestApi.java index 1382f6a44f97..f18ad98e5fc3 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/PetApi.java index 744d64d1e14c..562cc907e63f 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/StoreApi.java index 9690ed8c1450..80ce4a0d5c93 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/UserApi.java index 4e755a2a73d0..cfbdeb6e72f9 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/.swagger-codegen/VERSION b/samples/server/petstore/spring-mvc/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/spring-mvc/.swagger-codegen/VERSION +++ b/samples/server/petstore/spring-mvc/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/AnotherFakeApi.java index 6f6dd9209135..24c711166911 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeApi.java index 5eafb6065199..bc212797fda6 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeClassnameTestApi.java index 8316190673c8..0885527e63fa 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/PetApi.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/PetApi.java index 5b1cf9187297..2d0f8af53674 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/StoreApi.java index 154926c7b012..474195a24e2f 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/UserApi.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/UserApi.java index 3dbcf7293cd9..fa7ab76ced3c 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/.swagger-codegen/VERSION b/samples/server/petstore/springboot-beanvalidation/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/springboot-beanvalidation/.swagger-codegen/VERSION +++ b/samples/server/petstore/springboot-beanvalidation/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/AnotherFakeApi.java index 6f6dd9209135..24c711166911 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/FakeApi.java index 5eafb6065199..bc212797fda6 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/FakeClassnameTestApi.java index 8316190673c8..0885527e63fa 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/PetApi.java index 5b1cf9187297..2d0f8af53674 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/StoreApi.java index 154926c7b012..474195a24e2f 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/UserApi.java index 3dbcf7293cd9..fa7ab76ced3c 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/.swagger-codegen/VERSION b/samples/server/petstore/springboot-delegate-j8/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/springboot-delegate-j8/.swagger-codegen/VERSION +++ b/samples/server/petstore/springboot-delegate-j8/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/AnotherFakeApi.java index 3c73a0fc9e8c..5c83b17fc527 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/FakeApi.java index 0d017dcf03a5..0c7242f70f52 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/FakeClassnameTestApi.java index ef017ee1dc84..c227de57d36d 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/PetApi.java index a93561a2ee88..c4dcb643254c 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/StoreApi.java index 345795a92143..cbc1c34f20a8 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/UserApi.java index db6ab0443be1..ccfac7d3364a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/.swagger-codegen/VERSION b/samples/server/petstore/springboot-delegate/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/springboot-delegate/.swagger-codegen/VERSION +++ b/samples/server/petstore/springboot-delegate/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/AnotherFakeApi.java index 6f6dd9209135..24c711166911 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/FakeApi.java index 5eafb6065199..bc212797fda6 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/FakeClassnameTestApi.java index 8316190673c8..0885527e63fa 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/PetApi.java index 5b1cf9187297..2d0f8af53674 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/StoreApi.java index 154926c7b012..474195a24e2f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/UserApi.java index 3dbcf7293cd9..fa7ab76ced3c 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/.swagger-codegen/VERSION b/samples/server/petstore/springboot-implicitHeaders/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/springboot-implicitHeaders/.swagger-codegen/VERSION +++ b/samples/server/petstore/springboot-implicitHeaders/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/AnotherFakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/AnotherFakeApi.java index b64d01acfd1f..bc2a48dd7e3f 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeApi.java index 5efacf31e1cb..2502e3a45658 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeClassnameTestApi.java index 6fd233b0e395..05b5aa91b31a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/PetApi.java index 24e97f3e45e3..03769462d978 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/StoreApi.java index 6dc1d03ca01c..2741754882ee 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/UserApi.java index 04bd05d99739..1256e5bc299c 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/.swagger-codegen/VERSION b/samples/server/petstore/springboot-useoptional/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/springboot-useoptional/.swagger-codegen/VERSION +++ b/samples/server/petstore/springboot-useoptional/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/AnotherFakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/AnotherFakeApi.java index 8364594a3ee3..f1b5a0a2f273 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/FakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/FakeApi.java index dbc6657504da..9d44f00d2395 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/FakeClassnameTestApi.java index a2041e4522a3..2cc715a0b74a 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/PetApi.java index 58d2732d665e..ac2c92dd0421 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/StoreApi.java index be0fee9cbc10..5f3e55504d29 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/UserApi.java index bf116aa378ca..40dba34ed98b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/.swagger-codegen/VERSION b/samples/server/petstore/springboot/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/springboot/.swagger-codegen/VERSION +++ b/samples/server/petstore/springboot/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/api/AnotherFakeApi.java b/samples/server/petstore/springboot/src/main/java/io/swagger/api/AnotherFakeApi.java index 6f6dd9209135..24c711166911 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/io/swagger/api/FakeApi.java index 5eafb6065199..bc212797fda6 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot/src/main/java/io/swagger/api/FakeClassnameTestApi.java index 8316190673c8..0885527e63fa 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/io/swagger/api/PetApi.java index 5b1cf9187297..2d0f8af53674 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/springboot/src/main/java/io/swagger/api/StoreApi.java index 154926c7b012..474195a24e2f 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/io/swagger/api/UserApi.java index 3dbcf7293cd9..fa7ab76ced3c 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by the swagger code generator program (2.3.0-SNAPSHOT). + * NOTE: This class is auto generated by the swagger code generator program (2.3.1-SNAPSHOT). * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ diff --git a/samples/server/petstore/undertow/.swagger-codegen/VERSION b/samples/server/petstore/undertow/.swagger-codegen/VERSION index f9f7450d1359..50794f17f1a5 100644 --- a/samples/server/petstore/undertow/.swagger-codegen/VERSION +++ b/samples/server/petstore/undertow/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/undertow/src/main/resources/config/swagger.json b/samples/server/petstore/undertow/src/main/resources/config/swagger.json index 7c571eca3fef..0f5defa60266 100644 --- a/samples/server/petstore/undertow/src/main/resources/config/swagger.json +++ b/samples/server/petstore/undertow/src/main/resources/config/swagger.json @@ -112,8 +112,8 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" + "default" : "available", + "enum" : [ "available", "pending", "sold" ] }, "collectionFormat" : "csv" } ], @@ -134,7 +134,6 @@ "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -174,7 +173,6 @@ "petstore_auth" : [ "write:pets", "read:pets" ] } ], "deprecated" : true, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -210,7 +208,6 @@ "security" : [ { "api_key" : [ ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "post" : { @@ -278,7 +275,6 @@ "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -348,7 +344,6 @@ "security" : [ { "api_key" : [ ] } ], - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -414,7 +409,6 @@ "description" : "Order not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "delete" : { @@ -438,7 +432,6 @@ "description" : "Order not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -566,7 +559,6 @@ "description" : "Invalid username/password supplied" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -583,7 +575,6 @@ "description" : "successful operation" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }, @@ -615,7 +606,6 @@ "description" : "User not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" }, "put" : { @@ -671,7 +661,6 @@ "description" : "User not found" } }, - "x-contentType" : "application/json", "x-accepts" : "application/json" } }